[Dovecot] Dovecot generate file when over quota detected

Timo Sirainen tss at iki.fi
Fri Aug 31 17:26:23 EEST 2012


On 31.8.2012, at 17.23, Dominic Malolepszy wrote:

> On 31/08/2012 11:40 PM, Timo Sirainen wrote:
>> On 23.8.2012, at 9.48, Dominic Malolepszy wrote:
>> 
>>> I am curious if Dovecot can add an empty file into a Maildir folder as soon as a mailbox has exceeded 100% capacity, and later when it detects the quota has fallen below 100% unlink the file. The idea is the Dovecot LDA would deliver the message and if this caused the mailbox to reach 100%+, add a file into the maibox say "username/Maildir/overquota". Interactions via Dovecot IMAP/POP3 that lower the mailbox usage, for example the user popping, or deleting mail from the mailbox would trigger Dovecot to unlink the file.
>> Quota warning scripts can do that. http://wiki2.dovecot.org/Quota/Configuration#Quota_warnings
>> 
>> 
> They appear to trigger during maildelivers say via the LDA, however IMAP mailbox interactions (say deleting an email or copying an email) do not trigger them. I ended up having this patched into the quota plugin and works a treat.

The quota plugin, including quota warnings, works identically in LDA and IMAP. So I wonder what your patch does.

Of course in IMAP a mail deletion is often a copy+mark as deleted with the expunge happening sometimes later.




More information about the dovecot mailing list