[Home]

Summary:ASTERISK-17768: [patch] MaxMsg Quota Only Enforced on INBOX Messages for Filesystem Based Voice Mail Boxes
Reporter:Jamuel Starkey (jamuel)Labels:patch
Date Opened:2011-04-28 19:13:41Date Closed:
Priority:MinorRegression?No
Status:Open/NewComponents:Applications/app_voicemail
Versions:1.6.2.18 13.18.4 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) app_voicemail-mantis_0019199.patch
Description:When a caller attempts to leave a message for a VM user app_voicemail does not count messages in other folders in the user's mailbox (e.g. Old, Urgent, Friends, Family, CustX) in consideration of maxmsg limit.  

The maxmsg setting which is supposed limit total messages per folder does not work as anticipated as a user could individually (or in aggregate) have more messages than maxmsg allows just as long as the number contained in INBOX is less than maxmsg.  It appears that the file-based count_messages function only ever checks INBOX.

NB: the maxmsg setting has been interpreted to be a setting to control the total number messages for each user (mailbox) folder and not each sub-folder that may optionally be contained within the user's mailbox folder.

****** ADDITIONAL INFORMATION ******

Patch for 1.6.2.18 to be provided.
Comments:By: Jamuel Starkey (jamuel) 2011-04-28 19:23:19

Patch (unified diff) created that modifies the file system based count_messages() function so that the path sent to it is recursively scanned for *.txt files.  The total number of files is returned.

Instead of sending $VM_SPOOL_DIR/$VM_CONTEXT/$MAILBOX/INBOX as the path for  count_messages() during leave_voicemail() $VM_SPOOL_DIR/$VM_CONTEXT/$MAILBOX/INBOX is sent.

By: Jamuel Starkey (jamuel) 2011-04-28 19:53:14

The last note should have been:

Instead of sending $VM_SPOOL_DIR/$VM_CONTEXT/$MAILBOX/INBOX as the path parameter for count_messages(), during leave_voicemail() $VM_SPOOL_DIR/$VM_CONTEXT/$MAILBOX is sent which allows count_messages() to seach the entire user's mailbox space for vm messages.

By: Michael L. Young (elguero) 2011-04-28 22:39:44

To me this is a nice feature to add, but obviously it will not go into the 1.6.2 branch.

This patch, to me, is not the right way to add this feature.  Perhaps you should look at trunk and think about how to implement an overall quota limit per mailbox.  I could see a global setting and a per user setting.  I wouldn't touch count_messages at all.  That needs to keep the same functionality that it was written to do.

Nice idea... just wrong approach.

BTW: All the code documentation and the sample config file state clearly that maxmsg is per folder, not per mailbox.  Perhaps a different name could be proposed for the setting which would be applied to trunk to clarify the setting such as maxmsgsperfolder or something along those lines.

By: Jonathan Rose (jrose) 2011-05-04 09:38:50

At the moment I'm thinking it'd be better to create a whole new option to handle this and keep the existing maxmsg option and just change terminology so that it's clear that these are folder message limits and not mailbox message limits.

It's true though that most of what the user is presented with suggests that the intent is for the message limits to be applied to the mailbox and not to the folders.  Really I think the best option is to have individual folder size limits as well as an overall maximum messages limit.  So if you could, leave the current per-folder stuff in place and add this as a second option with a new name (like maxmsg_total) which can be applied which uses this recursive counting of messages to determine whether or not a new message can be added.  Then the current behavior would remain in place... which is important since we don't really want to mess with current expected behavior.

We'll talk internally about changing some terminology and possibly getting some new recordings or mixing some of the stuff we have to help address the fact that Allison is telling the user "Mailbox is full" rather than something more accurate like "Inbox is full"