[asterisk-bugs] [Asterisk 0014298]: [patch] per-mailbox imapfolder option

Asterisk Bug Tracker noreply at bugs.digium.com
Fri Feb 20 18:08:10 CST 2009


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=14298 
====================================================================== 
Reported By:                jablko
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   14298
Category:                   Applications/app_voicemail/IMAP
Reproducibility:            always
Severity:                   feature
Priority:                   normal
Status:                     new
Asterisk Version:           1.4.23 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2009-01-21 11:16 CST
Last Modified:              2009-02-20 18:08 CST
====================================================================== 
Summary:                    [patch] per-mailbox imapfolder option
Description: 
[ Link Removed - See Notes ]

I recently switched from file system to IMAP voicemail storage and it
worked great for most users. Mostly I have a typical IMAP setup, so the
defaults worked. I just set in voicemail.conf:

authuser=administrator
authpassword=password

- then added "imapuser" to each mailbox:

[...]
6005 => 1234,Jack Bates,ms419 at freezone.co.uk,,imapuser=jbates
[...]

One challenge was my general delivery mailbox, which I wanted stored in a
shared IMAP mailbox. I tried to configure that as follows:

6000 =>
1234,House,house at campcoop.com,,imapfolder=shared.house|imapuser=administrator

- but I got these errors:

[Jan  4 15:23:32] ERROR[3270] app_voicemail_imap.c: Error while sending
the mess
age to
{localhost:143/imap/authuser=administrator/user=administrator}INBOX

As I discovered, this was because Asterisk tried to store in the
administrator user's INBOX, and my administrator user does not have an IMAP
mailbox. In fact I wanted the message stored in the "shared.house" shared
mailbox.

After a look at app_voicemail.c, I realized my problem was that
"imapfolder" is a per-context option, not a per-mailbox option. However I
want to set "imapfolder" for only one mailbox - the default, "INBOX", works
otherwise.

So I created the linked patch to make "imapfolder" a per-mailbox option.
Now the general delivery mailbox successfully stores messages in
{localhost:143/imap/authuser=administrator/user=administrator}shared.house

To create this patch, I basically copied the code for "imapuser", which is
a per-mailbox option, for "imapfolder"
====================================================================== 

---------------------------------------------------------------------- 
 (0100488) Corydon76 (administrator) - 2009-02-20 18:08
 http://bugs.digium.com/view.php?id=14298#c100488 
---------------------------------------------------------------------- 
The code is far from sufficient.  You've missed several places where
changing the folder would make a huge difference.  For example:

1) When selecting a mailbox from VoicemailMain, you will be unable to go
back to the inbox, once left, because the mbox() function doesn't handle
this change.

2) When checking the number of new messages for MWI, it does not check the
set folder.  See inboxcount2(). 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-02-20 18:08 Corydon76      Note Added: 0100488                          
======================================================================




More information about the asterisk-bugs mailing list