Filesystem quota
Dovecot does not work too well with filesystem quotas enabled in situations where a user exceeds his quota. But there are a few things you can do to improve Dovecot's behaviour:
- Set the index file location to some partition where there are no quota limits. Dovecot cannot currently handle out-of-quota error conditions when updating indexes.
mbox should work nicely as long as mbox_lazy_writes=yes is set in the configuration file, but if the user does not expunge any messages before closing the mailbox, Dovecot will give an "internal error" failure.
Maildir needs to update dovecot-uidlist file, which cannot handle out-of-quota errors. Its location can be set using the "CONTROL" parameter in default_mail_env.
So, use something like:
# mbox: default_mail_env = mbox:%h/mail:INBOX=/var/mail/%u:INDEX=/var/no-quotas/index/%u # maildir: default_mail_env = maildir:%h/Maildir:INDEX=/var/no-quotas/index/%u:CONTROL=/var/no-quotas/control/%u
Quota reporting
Dovecot supports filesystem quota reporting using a quota plugin. This may still be buggy in some operating systems, so do not rely on it before you have tried it. Example configuration:
protocol imap { mail_plugins = quota imap_quota } plugin { quota = fs }