This documentation is for Dovecot v2.x, see wiki1 for v1.x documentation.
Differences between revisions 2 and 3
Revision 2 as of 2006-06-13 15:09:04
Size: 1315
Comment: minor linguistic improvements
Revision 3 as of 2007-03-11 18:36:21
Size: 2118
Editor: TimoSirainen
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
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: == Index files ==
Line 5: Line 5:
 * 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.
It's a good idea to keep index files in a partition where there are no filesystem quota limits. The index files exist to speed up mailbox operations, so Dovecot runs more slowly if it can't keep them updated. You can specify the index file location by appending {{{:INDEX=/somewhere}}} to [:MailLocation:mail_location].
Line 9: Line 7:
So, use something like: Since v1.0.rc27 Dovecot can handle "out of disk space" errors in index file handling and transparently move to in-memory indexes. It'll use the in-memory indexes until the mailbox is re-opened. Earlier versions will break more or less badly.

== mbox ==

It's a good idea to have {{{mbox_lazy_writes=yes}}} (default), otherwise Dovecot might give "Not enough disk space" errors when opening the mailbox, making it impossible to expunge any mails.

If user has run out of quota and index files are also in memory (because they're also over quota), it's possible that message flag changes are lost. This should be pretty rare though because Dovecot keeps some extra space allocated inside the mbox file for flag changes.

Example preferred configuration:
Line 12: Line 18:
# mbox:
default_
mail_env = mbox:%h/mail:INBOX=/var/mail/%u:INDEX=/var/no-quotas/index/%u
mail_location = mbox:~/mail:INBOX=/var/mail/%u:INDEX=/var/no-quotas/index/%u
}}}
Line 15: Line 21:
# maildir:
default_mail_env = maildir:%h/Maildir:INDEX=/var/no-quotas/index/%u:CONTROL=/var/no-quotas/control/%u
== Maildir ==

Maildir needs to be able to add UIDs of new messages to {{{dovecot-uidlist}}} file. If it can't do this, it can give an error when opening the mailbox, making it impossible to expunge any mails.

Currently the only way to avoid this is to use a separate partition for the uidlist files where there are no filesystem quota limits. You can do this by appending {{{:CONTROL=/somewhere}}} to [:MailLocation:mail_location].

Example preferred configuration:

{{{
mail_location = maildir:~/Maildir:INDEX=/var/no-quotas/index/%u:CONTROL=/var/no-quotas/control/%u

Filesystem quota

Index files

It's a good idea to keep index files in a partition where there are no filesystem quota limits. The index files exist to speed up mailbox operations, so Dovecot runs more slowly if it can't keep them updated. You can specify the index file location by appending :INDEX=/somewhere to [:MailLocation:mail_location].

Since v1.0.rc27 Dovecot can handle "out of disk space" errors in index file handling and transparently move to in-memory indexes. It'll use the in-memory indexes until the mailbox is re-opened. Earlier versions will break more or less badly.

mbox

It's a good idea to have mbox_lazy_writes=yes (default), otherwise Dovecot might give "Not enough disk space" errors when opening the mailbox, making it impossible to expunge any mails.

If user has run out of quota and index files are also in memory (because they're also over quota), it's possible that message flag changes are lost. This should be pretty rare though because Dovecot keeps some extra space allocated inside the mbox file for flag changes.

Example preferred configuration:

mail_location = mbox:~/mail:INBOX=/var/mail/%u:INDEX=/var/no-quotas/index/%u

Maildir

Maildir needs to be able to add UIDs of new messages to dovecot-uidlist file. If it can't do this, it can give an error when opening the mailbox, making it impossible to expunge any mails.

Currently the only way to avoid this is to use a separate partition for the uidlist files where there are no filesystem quota limits. You can do this by appending :CONTROL=/somewhere to [:MailLocation:mail_location].

Example preferred configuration:

mail_location = maildir:~/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
} 

None: Quota/FS (last edited 2021-07-07 23:36:47 by MichaelSlusarz)