6984da6f63071523c7c1595a1ec244f383d58edb
[sysconfig/dovecot.git] / conf.d / 90-quota.conf
1 ##
2 ## Quota configuration.
3 ##
4
5 # Note that you also have to enable quota plugin in mail_plugins setting.
6 # <doc/wiki/Quota.txt>
7
8 ##
9 ## Quota limits
10 ##
11
12 # Quota limits are set using "quota_rule" parameters. To get per-user quota
13 # limits, you can set/override them by returning "quota_rule" extra field
14 # from userdb. It's also possible to give mailbox-specific limits, for example
15 # to give additional 100 MB when saving to Trash:
16
17 plugin {
18   #quota_rule = *:storage=1G
19   #quota_rule2 = Trash:storage=+100M
20 }
21
22 ##
23 ## Quota warnings
24 ##
25
26 # You can execute a given command when user exceeds a specified quota limit.
27 # Each quota root has separate limits. Only the command for the first
28 # exceeded limit is excecuted, so put the highest limit first.
29 # The commands are executed via script service by connecting to the named
30 # UNIX socket (quota-warning below).
31 # Note that % needs to be escaped as %%, otherwise "% " expands to empty.
32
33 plugin {
34   #quota_warning = storage=95%% quota-warning 95 %u
35   #quota_warning2 = storage=80%% quota-warning 80 %u
36 }
37
38 # Example quota-warning service. The unix listener's permissions should be
39 # set in a way that mail processes can connect to it. Below example assumes
40 # that mail processes run as vmail user. If you use mode=0666, all system users
41 # can generate quota warnings to anyone.
42 #service quota-warning {
43 #  executable = script /usr/local/bin/quota-warning.sh
44 #  user = dovecot
45 #  unix_listener quota-warning {
46 #    user = vmail
47 #  }
48 #}
49
50 ##
51 ## Quota backends
52 ##
53
54 # Multiple backends are supported:
55 #   dirsize: Find and sum all the files found from mail directory.
56 #            Extremely SLOW with Maildir. It'll eat your CPU and disk I/O.
57 #   dict: Keep quota stored in dictionary (eg. SQL)
58 #   maildir: Maildir++ quota
59 #   fs: Read-only support for filesystem quota
60
61 plugin {
62   #quota = dirsize:User quota
63   #quota = maildir:User quota
64   #quota = dict:User quota::proxy::quota
65   #quota = fs:User quota
66 }
67
68 # Multiple quota roots are also possible, for example this gives each user
69 # their own 100MB quota and one shared 1GB quota within the domain:
70 plugin {
71   #quota = dict:user::proxy::quota
72   #quota2 = dict:domain:%d:proxy::quota_domain
73   #quota_rule = *:storage=102400
74   #quota2_rule = *:storage=1048576
75 }