44## Mailbox locations and namespaces
55##
66
7- # Location for users' mailboxes. The
7+ # Location for users' mailboxes. The default is empty, which means that Dovecot
88# tries to find the mailboxes automatically. This won't work if the user
99# doesn't yet have any mail, so you should explicitly tell Dovecot the full
1010# location.
1414# kept. This is called the "root mail directory", and it must be the first
1515# path given in the mail_location setting.
1616#
17- # There are a few special variables you can use, eg.:
17+ # %{user} - username
18+ # %{user|username} - user part in user@domain, same as %u if there's no domain
19+ # %{user|domain} - domain part in user@domain, empty if there's no domain
20+ # %{home} - home directory
1821#
19- # %u - username
20- # %n - user part in user@domain, same as %u if there's no domain
21- # %d - domain part in user@domain, empty if there's no domain
22- # %h - home directory
22+ # See https://doc.dovecot.org/latest/core/settings/variables.html for full list
23+ # of variables.
2324#
24- # See doc/wiki/Variables.txt for full list. Some examples:
25- #
26- # mail_location = maildir:~/Maildir
27- # mail_location = mbox:~/mail:INBOX=/var/mail/%u
28- # mail_location = mbox:/var/mail/%d/%1n/%n:INDEX=/var/indexes/%d/%1n/%n
29- #
30- # <doc /wiki /MailLocation.txt >
25+ # Example:
26+ # mail_driver = maildir
27+ # mail_path = ~/Maildir
28+ # mail_inbox_path = ~/Maildir/.INBOX
3129#
30+
31+ # Debian defaults
32+ # Note that upstream considers mbox deprecated and strongly recommends
33+ # against its use in production environments. See further information
34+ # at
35+ # https://doc.dovecot.org/2.4.0/core/config/mailbox/formats/mbox.html
3236mail_home = /var/vmail/%{user}
3337mail_driver = Maildir
3438mail_path = %{home}/mail
@@ -59,7 +63,8 @@ namespace inbox {
5963
6064 # Physical location of the mailbox. This is in same format as
6165 # mail_location, which is also the default for it.
62- #location =
66+ # mail_driver =
67+ # mail_path =
6368
6469 # There can be only one INBOX, and this setting defines which namespace
6570 # has it.
@@ -85,18 +90,20 @@ namespace inbox {
8590}
8691
8792# Example shared namespace configuration
88- #namespace {
93+ #namespace shared {
8994 #type = shared
9095 #separator = /
9196
9297 # Mailboxes are visible under "shared/user@domain/"
93- # %%n, %%d and %%u are expanded to the destination user.
94- #prefix = shared/%%u /
98+ # $user, $domain and $username are expanded to the destination user.
99+ #prefix = shared/$user /
95100
96- # Mail location for other users' mailboxes. Note that %variables and ~/
97- # expands to the logged in user's data. %%n, %%d, %%u and %%h expand to the
101+ # Mail location for other users' mailboxes. Note that %{ variables} and ~/
102+ # expands to the logged in user's data. %{owner_user} and %{owner_home}
98103 # destination user's data.
99- #location = maildir:%%h/Maildir:INDEX=~/Maildir/shared/%%u
104+ #mail_driver = maildir
105+ #mail_path = %{owner_home}/Maildir
106+ #mail_index_path = ~/Maildir/shared/%{owner_user}
100107
101108 # Use the default namespace for saving subscriptions.
102109 #subscriptions = no
@@ -109,11 +116,11 @@ namespace inbox {
109116
110117# System user and group used to access mails. If you use multiple, userdb
111118# can override these by returning uid or gid fields. You can use either numbers
112- # or names. <doc / wiki / UserIds.txt >
119+ # or names. <https: // doc.dovecot.org / latest / core / config / system_users.html#uids >
113120mail_uid = {{ dovecot_vmail_uid }}
114121mail_gid = {{ dovecot_vmail_uid }}
115122
116- # Group to enable temporarily for privileged operations. Currently this is
123+ # Group to enable temporarily for privileged operations. Currently this is
117124# used only with INBOX when either its initial creation or dotlocking fails.
118125# Typically this is set to "mail" to give access to /var/mail.
119126mail_privileged_group = mail
@@ -133,7 +140,11 @@ mail_privileged_group = mail
133140
134141# Dictionary for key=value mailbox attributes. This is used for example by
135142# URLAUTH and METADATA extensions.
136- #mail_attribute_dict =
143+ #mail_attribute {
144+ # dict file {
145+ # path = %{home}/Maildir/dovecot-attributes
146+ # }
147+ #}
137148
138149# A comment or note that is associated with the server. This value is
139150# accessible for authenticated users through the IMAP METADATA server
@@ -216,10 +227,16 @@ mail_privileged_group = mail
216227#auth_socket_path = /var/run/dovecot/auth-userdb
217228
218229# Directory where to look up mail plugins.
219- #mail_plugin_dir = /usr/lib/dovecot/modules
230+ #mail_plugin_dir = /usr/lib/dovecot
220231
221232# Space separated list of plugins to load for all services. Plugins specific to
222233# IMAP, LDA, etc. are added to this list in their own .conf files.
234+ #mail_plugins =
235+ #
236+ # To add plugins, use
237+ #mail_plugins {
238+ # plugin = yes
239+ #}
223240mail_plugins {
224241 welcome = yes
225242 notify = yes
@@ -249,7 +266,7 @@ mail_plugins {
249266
250267# When IDLE command is running, mailbox is checked once in a while to see if
251268# there are any new mails or other changes. This setting defines the minimum
252- # time to wait between those checks.
269+ # time to wait between those checks. Dovecot can also use inotify and
253270# kqueue to find out immediately when changes occur.
254271#mailbox_idle_check_interval = 30 secs
255272
@@ -328,14 +345,8 @@ protocol !indexer-worker {
328345# in is important to avoid deadlocks if other MTAs/MUAs are using multiple
329346# locking methods as well. Some operating systems don't allow using some of
330347# them simultaneously.
331- #
332- # The Debian value for mbox_write_locks differs from upstream Dovecot. It is
333- # changed to be compliant with Debian Policy (section 11.6) for NFS safety.
334- # Dovecot: mbox_write_locks = dotlock fcntl
335- # Debian: mbox_write_locks = fcntl dotlock
336- #
337348#mbox_read_locks = fcntl
338- #mbox_write_locks = fcntl dotlock
349+ #mbox_write_locks = dotlock fcntl
339350
340351# Maximum time to wait for lock (all of them) before aborting.
341352#mbox_lock_timeout = 5 mins
@@ -391,32 +402,6 @@ protocol !indexer-worker {
391402# filesystems (ext4, xfs).
392403#mdbox_preallocate_space = no
393404
394- ##
395- ## Mail attachments
396- ##
397-
398- # sdbox and mdbox support saving mail attachments to external files, which
399- # also allows single instance storage for them. Other backends don't support
400- # this for now.
401-
402- # Directory root where to store mail attachments. Disabled, if empty.
403- #mail_attachment_dir =
404-
405- # Attachments smaller than this aren't saved externally. It's also possible to
406- # write a plugin to disable saving specific attachments externally.
407- #mail_attachment_min_size = 128k
408-
409- # Filesystem backend to use for saving attachments:
410- # posix : No SiS done by Dovecot (but this might help FS's own deduplication)
411- # sis posix : SiS with immediate byte-by-byte comparison during saving
412- # sis-queue posix : SiS with delayed comparison and deduplication
413- #mail_attachment_fs = sis posix
414-
415- # Hash format to use in attachment filenames. You can add any text and
416- # variables: %{md4}, %{md5}, %{sha1}, %{sha256}, %{sha512}, %{size}.
417- # Variables can be truncated, e.g. %{sha256:80} returns only first 80 bits
418- #mail_attachment_hash = %{sha1}
419-
420405# Settings to control adding $HasAttachment or $HasNoAttachment keywords.
421406# By default, all MIME parts with Content-Disposition=attachment, or inlines
422407# with filename parameter are consired attachments.
0 commit comments