1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
|
Filesystem quota
================
Filesystem quota supports both local filesystems and rquota (NFS).
If you are using systemd, please make sure you /turn off/ 'PrivateDevices=yes',
otherwise it won't work properly. Best way to do this is to use 'systemctl edit
dovecot' command or add file
'/etc/systemd/system/dovecot.service.d/override.conf' with
---%<-------------------------------------------------------------------------
[Service]
PrivateDevices=off
---%<-------------------------------------------------------------------------
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>
[MailLocation.txt].
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.
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> [MailLocation.txt].
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.
Parameters
----------
By default only user quota is shown, or if it doesn't exist, group quota is
used as fallback.
* 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. This can be
useful with Maildir or single-dbox.
* 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
--------
---%<-------------------------------------------------------------------------
mail_plugins = $mail_plugins quota
protocol imap {
mail_plugins = mail_plugins imap_quota
}
plugin {
quota = fs:user
}
---%<-------------------------------------------------------------------------
If you want to see both user and group quotas as separate quota roots, you can
use this:
---%<-------------------------------------------------------------------------
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:
---%<-------------------------------------------------------------------------
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
}
---%<-------------------------------------------------------------------------
(This file was created from the wiki on 2019-06-19 12:42)
|