Mercurial > dovecot > core-2.2
changeset 11463:913e8d4d07b9 HEAD
example-config: Moved quota configuration to a separate .conf file and improved the comments.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 02 Jun 2010 19:17:08 +0100 |
parents | a179fcbbf960 |
children | 1f8251fc8db5 |
files | doc/example-config/conf.d/90-plugin.conf doc/example-config/conf.d/90-quota.conf |
diffstat | 2 files changed, 75 insertions(+), 30 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/example-config/conf.d/90-plugin.conf Wed Jun 02 18:52:12 2010 +0100 +++ b/doc/example-config/conf.d/90-plugin.conf Wed Jun 02 19:17:08 2010 +0100 @@ -11,36 +11,6 @@ # This is mostly meant for passing parameters to plugins. %variable # expansion is done for all values. - # Quota plugin. Multiple backends are supported: - # dirsize: Find and sum all the files found from mail directory. - # Extremely SLOW with Maildir. It'll eat your CPU and disk I/O. - # dict: Keep quota stored in dictionary (eg. SQL) - # maildir: Maildir++ quota - # fs: Read-only support for filesystem quota - # - # Quota limits are set using "quota_rule" parameters, either in here or in - # userdb. It's also possible to give mailbox-specific limits, for example: - # quota_rule = *:storage=1048576 - # quota_rule2 = Trash:storage=102400 - # User has now 1GB quota, but when saving to Trash mailbox the user gets - # additional 100MB. - # - # Multiple quota roots are also possible, for example: - # quota = dict:user::proxy::quota - # quota2 = dict:domain:%d:proxy::quota_domain - # quota_rule = *:storage=102400 - # quota2_rule = *:storage=1048576 - # Gives each user their own 100MB quota and one shared 1GB quota within - # the domain. - # - # You can execute a given command when user exceeds a specified quota limit. - # Each quota root has separate limits. Only the command for the first - # exceeded limit is excecuted, so put the highest limit first. - # Note that % needs to be escaped as %%, otherwise "% " expands to empty. - # quota_warning = storage=95%% /usr/local/bin/quota-warning.sh 95 - # quota_warning2 = storage=80%% /usr/local/bin/quota-warning.sh 80 - #quota = maildir - # ACL plugin. vfile backend reads ACLs from "dovecot-acl" file from maildir # directory. You can also optionally give a global ACL directory path where # ACLs are applied to all users' mailboxes. The global ACL directory contains
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/example-config/conf.d/90-quota.conf Wed Jun 02 19:17:08 2010 +0100 @@ -0,0 +1,75 @@ +## +## Quota configuration. +## + +# Note that you also have to enable quota plugin in mail_plugins setting. +# <doc/wiki/Quota.txt> + +## +## Quota limits +## + +# Quota limits are set using "quota_rule" parameters. To get per-user quota +# limits, you can set/override them by returning "quota_rule" extra field +# from userdb. It's also possible to give mailbox-specific limits, for example +# to give additional 100 MB when saving to Trash: + +plugin { + #quota_rule = *:storage=1G + #quota_rule2 = Trash:storage=+100M +} + +## +## Quota warnings +## + +# You can execute a given command when user exceeds a specified quota limit. +# Each quota root has separate limits. Only the command for the first +# exceeded limit is excecuted, so put the highest limit first. +# The commands are executed via script service by connecting to the named +# UNIX socket (quota-warning below). +# Note that % needs to be escaped as %%, otherwise "% " expands to empty. + +plugin { + #quota_warning = storage=95%% quota-warning 95 %u + #quota_warning2 = storage=80%% quota-warning 80 %u +} + +# Example quota-warning service. The unix listener's permissions should be +# set in a way that mail processes can connect to it. Below example assumes +# that mail processes run as vmail user. If you use mode=0666, all system users +# can generate quota warnings to anyone. +#service quota-warning { +# executable = script /usr/local/bin/quota-warning.sh +# user = dovecot +# unix_listener quota-warning { +# user = vmail +# } +#} + +## +## Quota backends +## + +# Multiple backends are supported: +# dirsize: Find and sum all the files found from mail directory. +# Extremely SLOW with Maildir. It'll eat your CPU and disk I/O. +# dict: Keep quota stored in dictionary (eg. SQL) +# maildir: Maildir++ quota +# fs: Read-only support for filesystem quota + +plugin { + #quota = dirsize:User quota + #quota = maildir:User quota + #quota = dict:User quota::proxy::quota + #quota = fs:User quota +} + +# Multiple quota roots are also possible, for example this gives each user +# their own 100MB quota and one shared 1GB quota within the domain: +plugin { + #quota = dict:user::proxy::quota + #quota2 = dict:domain:%d:proxy::quota_domain + #quota_rule = *:storage=102400 + #quota2_rule = *:storage=1048576 +}