[Home]

Summary:ASTERISK-10677: IMAP: Mailbox does not exist
Reporter:Matt Selsky (selsky)Labels:
Date Opened:2007-11-02 13:53:09Date Closed:2007-11-07 17:16:25.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Applications/app_voicemail
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 11151.patch
Description:I have voicemail.conf configured with "imapfolder=voicemail", but I still get error messages in my logs:

[Nov  2 14:46:15] ERROR[25200] app_voicemail.c: IMAP Error: Mailbox does not exist

My Cyrus telemetry logs have this:

<1194028379<00000003 SELECT INBOX
>1194028379>00000003 NO Mailbox does not exist

Why is Asterisk trying to select my INBOX when I have an imap folder explicitly defined?
Comments:By: Jason Parker (jparker) 2007-11-02 14:01:44

There is a comment in the code (in init_mailstream()) that says "Connect to INBOX first to get folders delimiter".  It appears that this is done on purpose.

By: Matt Selsky (selsky) 2007-11-02 14:09:10

Why not use a LIST * command?  Or a NAMESPACE command?

By: Mark Michelson (mmichelson) 2007-11-02 15:33:20

The LIST idea seems sensible. I'll post a patch soon.

By: Mark Michelson (mmichelson) 2007-11-02 15:58:54

And as soon as I posted that last comment, I realized what was going on...

A LIST is actually already used to get the delimiter, but in order to execute this, you have to have a mailstream to operate on. In order to get a mailstream, Asterisk attempts to connect to the INBOX mailbox.

Unless I'm missing something here, this seems somewhat silly, and we should just use the folder specified in voicemail.conf instead every time we connect.

Patch forthcoming.

By: Mark Michelson (mmichelson) 2007-11-02 16:02:41

Patch uploaded. Hopefully this will rid your logs of those errors.

By: Matt Selsky (selsky) 2007-11-07 17:12:12.000-0600

Confirmed.  INBOX is no longer incorrectly SELECTed.

By: Digium Subversion (svnbot) 2007-11-07 17:16:25.000-0600

Repository: asterisk
Revision: 89092

U   trunk/apps/app_voicemail.c

------------------------------------------------------------------------
r89092 | mmichelson | 2007-11-07 17:16:25 -0600 (Wed, 07 Nov 2007) | 6 lines

If imapfolder has been specified in voicemail.conf, we should not connect to INBOX...
ever. It may not exist.

(closes issue ASTERISK-10677, reported by selsky, patched by me)


------------------------------------------------------------------------