Hi, I've been bitten by an issue running Squirrelmail on top of Dovecot using Maildir++ quotas. Having configured these quotas in Dovecot, I notice that Dovecot appears not to exclude the 'Trash' folder from its quota calculation (which it should do, according to the Maildir++ spec). Unfortunately this breaks Squirrelmail if I try to delete a message from a close-to-quota mailbox - as per July's thread: "Maildir++ quota - how to handle a full mailbox" Which unfortunately means that a fairly full mailbox can become 'Wedged' with Dovecot/Squirrelmail in this situation with its owner unable to delete messages if that's the only way they access their mailbox. I took a look at the source and found the 'Quota exceeded' lines in src/plugins/quota/quota-storage.c but didn't understand it well enough to dive in... except to notice that the 'Trash' folder doesn't appear to get excluded from the calculations. cheers, Andrew.
On Friday 11 August 2006 19:24, Andrew Richards wrote:> I've been bitten by an issue running Squirrelmail on top of Dovecot > using Maildir++ quotas. > > Having configured these quotas in Dovecot, I notice that Dovecot > appears not to exclude the 'Trash' folder from its quota > calculation (which it should do, according to the Maildir++ spec). > Unfortunately this breaks Squirrelmail if I try to delete a message > from a close-to-quota mailbox - as per July's thread: > "Maildir++ quota - how to handle a full mailbox" > > Which unfortunately means that a fairly full mailbox can become > 'Wedged' with Dovecot/Squirrelmail in this situation with its owner > unable to delete messages if that's the only way they access their > mailbox. > > I took a look at the source and found the 'Quota exceeded' lines in > src/plugins/quota/quota-storage.c but didn't understand it well > enough to dive in... except to notice that the 'Trash' folder > doesn't appear to get excluded from the calculations.To reply to my own query: - I've mis-quoted the Maildir++ spec - the Maildir++ Trash folder is ".Trash", which differs from ".INBOX.Trash" - so the latter shouldn't necessarily be excluded from the quota calculation. - I still wanted to get Squirrelmail working (with deleting mails when near/at quota when using Maildir++ quotas), even to the extent that quotas might not be enforced during the Squirrelmail/IMAP session. Therefore I've dug into the source and worked out how to temporarily double the quota during the session (well I think that's the effect of my modification) - I've attached the relevant patch file for this should anyone else be struggling with the same problem - your mileage may vary. This at least gets Squirrelmail working. I think a good feature to avoid having to do a kludge like this would be to add an option to the quota section of dovecot.conf where the Trash folder could be specified as not counting towards the quota. cheers, Andrew. -------------- next part -------------- A non-text attachment was scrubbed... Name: dovecot-1.0.rc6.hack.patch Type: text/x-diff Size: 2022 bytes Desc: not available URL: <http://dovecot.org/pipermail/dovecot/attachments/20060815/852f414e/attachment-0002.bin>
On Tuesday 15 August 2006 13:28, Andrew Richards wrote:> On Friday 11 August 2006 19:24, Andrew Richards wrote: > > I've been bitten by an issue running Squirrelmail on top of > > Dovecot using Maildir++ quotas. > > > > Having configured these quotas in Dovecot, I notice that Dovecot > > appears not to exclude the 'Trash' folder from its quota > > calculation (which it should do, according to the Maildir++ > > spec). Unfortunately this breaks Squirrelmail if I try to delete > > a message from a close-to-quota mailbox - as per July's thread: > > "Maildir++ quota - how to handle a full mailbox" > > > > Which unfortunately means that a fairly full mailbox can become > > 'Wedged' with Dovecot/Squirrelmail in this situation with its > > owner unable to delete messages if that's the only way they > > access their mailbox. > > > > I took a look at the source and found the 'Quota exceeded' lines > > in src/plugins/quota/quota-storage.c but didn't understand it > > well enough to dive in... except to notice that the 'Trash' > > folder doesn't appear to get excluded from the calculations. > > To reply to my own query: > > - I've mis-quoted the Maildir++ spec - the Maildir++ Trash folder > is ".Trash", which differs from ".INBOX.Trash" - so the latter > shouldn't necessarily be excluded from the quota calculation. > > - I still wanted to get Squirrelmail working (with deleting mails > when near/at quota when using Maildir++ quotas), even to the > extent that quotas might not be enforced during the > Squirrelmail/IMAP session. Therefore I've dug into the source and > worked out how to temporarily double the quota during the session > (well I think that's the effect of my modification) - I've attached > the relevant patch file for this should anyone else be struggling > with the same problem - your mileage may vary. This at least gets > Squirrelmail working. > > I think a good feature to avoid having to do a kludge like this > would be to add an option to the quota section of dovecot.conf > where the Trash folder could be specified as not counting towards > the quota.Doh, I've just found the following, I should have looked here first: http://www.squirrelmail.org/wiki/DisableTrashcan which is a much simpler approach to the same problem. cheers, Andrew.
On Fri, 2006-08-11 at 19:24 +0100, Andrew Richards wrote:> Having configured these quotas in Dovecot, I notice that Dovecot > appears not to exclude the 'Trash' folder from its quota calculation > (which it should do, according to the Maildir++ spec).Well, I don't agree with Maildir++ spec in here since Dovecot doesn't do automatic cleaning of Trash. For Dovecot v1.1 you can configure quota separately for different mailboxes: # Quota limits are set using "quota_rule" parameters, either in here or in # userdb. It's also possible to give mailbox-specific limits, for example: # quota_rule = *:storage=1048576 # quota_rule2 = Trash:storage=102400 # User has now 1GB quota, but when saving to Trash mailbox the user gets # additional 100MB. It also contains expire plugin: # Expire plugin. Mails are expunged from mailboxes after being there the # configurable time. The first expiration date for each mailbox is stored in # a dictionary so it can be quickly determined which mailboxes contain # expired mails. The actual expunging is done in a nightly cronjob, which # you must set up: # dovecot --exec-mail ext /usr/libexec/dovecot/expire-tool #expire = Trash 7 Spam 30 #expire_dict = db:/var/lib/dovecot/expire.db -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 191 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20060816/ceafaf15/attachment.bin>