[asterisk-bugs] [Asterisk 0013673]: [patch] Addition of a Mailbox id facility to allow shared mailboxes to work

Asterisk Bug Tracker noreply at bugs.digium.com
Mon Oct 20 17:07:34 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=13673 
====================================================================== 
Reported By:                howardwilkinson
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   13673
Category:                   Applications/app_voicemail/IMAP
Reproducibility:            N/A
Severity:                   feature
Priority:                   normal
Status:                     confirmed
Asterisk Version:           1.4.21.2 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             2008-10-11 06:27 CDT
Last Modified:              2008-10-20 17:07 CDT
====================================================================== 
Summary:                    [patch] Addition of a Mailbox id facility to allow
shared mailboxes to work
Description: 
When a user is set up to share a mailbox using IMAP as the backing store
then messages posted into the mailbox are only visible to that user. For
example
with 2 users having the following voice mailbox definitions:

6000 => 6000,Shared mailbox,shared at example.com,,|imapuser=sharedmail
6001 => 6001,Shared mailbox,shared at example.com,,|imapuser=sharedmail

the voicemail is stored in a common folder and can be accessed via a mail
client as common data but each user receives just the messages that were
left for them.

I have implemented a patch against 1.4.21.2 which adds a new option
'imapmbxid' that allows all users to see all messages left for that mbxid.

This is used as follows.

6000 => 6000,Shared
mailbox,shared at example.com,,|imapuser=sharedmail,imapmbxid=6000
6001 => 6001,Shared
mailbox,shared at example.com,,|imapuser=sharedmail,imapmbxid=6000

and then when retrieving records the users are presented with all of the
records.

======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
child of            0013653 [patch] Shared IMAP mailboxes can cause...
====================================================================== 

---------------------------------------------------------------------- 
 (0094006) putnopvut (administrator) - 2008-10-20 17:07
 http://bugs.digium.com/view.php?id=13673#c94006 
---------------------------------------------------------------------- 
Thanks for the patch. I've taken a look at it and from a technical
standpoint, it is well done. There are two problems with the patch, though,
and neither are really that big.

1. There are several places where you go against Asterisk's coding
guidelines. For instance the first line of the patch is indented using 8
spaces instead of a tab. The second line of the second hunk of the patch
also includes 8 spaces instead of a tab. The other thing that leapt out at
me is the lack of spaces around the '?' and ':' in your ternary
conditionals.

2. Instead of using the comparison vmu->imapmbxid[0] != '\0' please use
!ast_strlen_zero(vmu->imapmbxid).

I agree with blitzrage about making the name of the option better imply
what it is used for. I'm not going to try to suggest another name since I'm
definitely no UI expert and I'd probably just come up with something worse
:) 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-10-20 17:07 putnopvut      Note Added: 0094006                          
======================================================================




More information about the asterisk-bugs mailing list