This documentation is for Dovecot v2.x, see wiki1 for v1.x documentation.
Differences between revisions 9 and 10
Revision 9 as of 2008-10-20 11:02:11
Size: 3542
Editor: TimoSirainen
Comment:
Revision 10 as of 2009-03-15 22:35:07
Size: 3546
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
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]. 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 25: Line 25:
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]. 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]].
Line 40: Line 40:
 * Inode quota is reported as message count quota for [:MailboxFormat/Maildir:Maildir] and [:MailboxFormat/Cydir:Cydir] formats.  * Inode quota is reported as message count quota for [[MailboxFormat/Maildir|Maildir]] and [[MailboxFormat/Cydir|Cydir]] formats.

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 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 mail_location.

Example preferred configuration:

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

Note that if you change the location of the control files, Dovecot will look in the new CONTROL directory (/var/no-quotas/control/%u) for the subscriptions file.

Quota reporting

Dovecot supports filesystem quota reporting using a quota plugin. New features in Dovecot v1.1 include:

  • RPC quota (for NFS) support.
  • Inode quota is reported as message count quota for Maildir and Cydir formats.

  • Group quota is supported. It's used if user quota doesn't exist, or if quota parameters contains "group".

Parameters

All of these require v1.1+:

  • user: Report only user quotas, don't fallback to showing group quotas.
  • group: Report only group quotas
  • inode_per_mail: Report inode quota as "number of message" quota.
  • noenforcing: Don't try to enforce quotas by calculating if saving would get user over quota. Only handle write failures.
  • mount=<path>: Report quota from given path. Default is to use the path for the mail root directory.

If you want to give multiple parameters, separate them with ':' (e.g. "inode_per_mail:noenforcing").

Examples

protocol imap {
  mail_plugins = quota imap_quota
}

plugin {
  quota = fs:user
}

If you want to see both user and group quotas as separate quota roots, you can use this with v1.1:

plugin {
  quota = fs:User quota:user
  quota2 = fs:Group quota:group
}

If you have your mails in two filesystems, you can create two quota roots with v1.1:

plugin {
  # Assuming INBOX in /var/mail/ which is mounted to /
  quota = fs:INBOX:mount=/
  # Assuming other mailboxes are in /home mount
  quota2 = fs:Others:mount=/home
}

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