

Maildir++ quota
===============


Maildir++ is the most commonly used quota backend with Maildir format. Dovecot implements the standard Maildir++ [None], so it's compatible with Courier [None], maildrop [None], Exim [None], etc. 
There are two ways to configure Maildir++ quota limits: 

 1. Configure the limits in Dovecot. You most likely want to do this. See >>quota main page<< for how to do this configuration. 
 2. Make Dovecot get the limits from existing 'maildirsize' files. 
Only Maildir++-specific settings are described below. See >>Quota<< for more generic configuration. 
Maildir++ quota relies on 'maildirsize' file having correct information, so if your users can modify the file in some way (e.g. shell access), you're relying on the goodwill of your users for the quota to work. 


Maildirsize file
================


The 'maildirsize' file in the Maildir root directory contains both the quota limit information and the current quota status. It contains a header in format: 

---%<-------------------------------------------------------------------------
<storage limit>S,<messages limit>C
---%<-------------------------------------------------------------------------

If you don't configure any quota limits in Dovecot ('quota=maildir' with no other settings), Dovecot takes the limits from the header. If the file does not exist, quota isn't enforced. 
If you configure quota limits in Dovecot (e.g. 'quota=maildir:storage=102400'), Dovecot makes sure that this header is kept up to date. If the file does not exist, it's simply rebuilt. 
Once the 'maildirsize' reaches 5120 bytes, the quota is recalculated and the file is recreated. This makes sure that if quota happens to be broken (e.g. externally deleted files) it won't stay that way forever. 


Trash mailbox
=============


This feature works only with v1.0rc16 .. v1.0.x. >>v1.1 quota<< has replaced this setting with quota rules. 
A "delete" operation in many clients means that the mail is copied to Trash mailbox and then expunged from the original mailbox. This means that the delete operation will fail if user is already over quota. If you wish to make this work, you can use 'ignore' setting, which doesn't count the quota at all for the given mailbox: 

---%<-------------------------------------------------------------------------
plugin {
  quota = maildir:storage=10240:ignore=Trash
}
---%<-------------------------------------------------------------------------

Note that there can be only one ignore setting. 
(This file was created from the wiki on 2007-12-11 04:42)
