Subversion Repositories configs

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
192 - 1
##
2
## Mailbox locations and namespaces
3
##
4
 
5
# Location for users' mailboxes. The default is empty, which means that Dovecot
6
# tries to find the mailboxes automatically. This won't work if the user
7
# doesn't yet have any mail, so you should explicitly tell Dovecot the full
8
# location.
9
#
10
# If you're using mbox, giving a path to the INBOX file (eg. /var/mail/%u)
11
# isn't enough. You'll also need to tell Dovecot where the other mailboxes are
12
# kept. This is called the "root mail directory", and it must be the first
13
# path given in the mail_location setting.
14
#
15
# There are a few special variables you can use, eg.:
16
#
17
#   %u - username
18
#   %n - user part in user@domain, same as %u if there's no domain
19
#   %d - domain part in user@domain, empty if there's no domain
20
#   %h - home directory
21
#
22
# See doc/wiki/Variables.txt for full list. Some examples:
23
#
24
#   mail_location = maildir:~/Maildir
25
#   mail_location = mbox:~/mail:INBOX=/var/mail/%u
26
#   mail_location = mbox:/var/mail/%d/%1n/%n:INDEX=/var/indexes/%d/%1n/%n
27
#
28
# <doc/wiki/MailLocation.txt>
29
#
30
#mail_location =
31
mail_location = maildir:~/Maildir
32
mail_home = /var/vmail/%d/%n
33
 
34
# If you need to set multiple mailbox locations or want to change default
35
# namespace settings, you can do it by defining namespace sections.
36
#
37
# You can have private, shared and public namespaces. Private namespaces
38
# are for user's personal mails. Shared namespaces are for accessing other
39
# users' mailboxes that have been shared. Public namespaces are for shared
40
# mailboxes that are managed by sysadmin. If you create any shared or public
41
# namespaces you'll typically want to enable ACL plugin also, otherwise all
42
# users can access all the shared mailboxes, assuming they have permissions
43
# on filesystem level to do so.
44
namespace inbox {
45
  # Namespace type: private, shared or public
46
  #type = private
47
 
48
  # Hierarchy separator to use. You should use the same separator for all
49
  # namespaces or some clients get confused. '/' is usually a good one.
50
  # The default however depends on the underlying mail storage format.
51
  #separator =
52
 
53
  # Prefix required to access this namespace. This needs to be different for
54
  # all namespaces. For example "Public/".
55
  #prefix =
56
 
57
  # Physical location of the mailbox. This is in same format as
58
  # mail_location, which is also the default for it.
59
  #location =
60
 
61
  # There can be only one INBOX, and this setting defines which namespace
62
  # has it.
63
  inbox = yes
64
 
65
  # If namespace is hidden, it's not advertised to clients via NAMESPACE
66
  # extension. You'll most likely also want to set list=no. This is mostly
67
  # useful when converting from another server with different namespaces which
68
  # you want to deprecate but still keep working. For example you can create
69
  # hidden namespaces with prefixes "~/mail/", "~%u/mail/" and "mail/".
70
  #hidden = no
71
 
72
  # Show the mailboxes under this namespace with LIST command. This makes the
73
  # namespace visible for clients that don't support NAMESPACE extension.
74
  # "children" value lists child mailboxes, but hides the namespace prefix.
75
  #list = yes
76
 
77
  # Namespace handles its own subscriptions. If set to "no", the parent
78
  # namespace handles them (empty prefix should always have this as "yes")
79
  #subscriptions = yes
80
 
81
  # See 15-mailboxes.conf for definitions of special mailboxes.
82
}
83
 
84
# Example shared namespace configuration
85
#namespace {
86
  #type = shared
87
  #separator = /
88
 
89
  # Mailboxes are visible under "shared/user@domain/"
90
  # %%n, %%d and %%u are expanded to the destination user.
91
  #prefix = shared/%%u/
92
 
93
  # Mail location for other users' mailboxes. Note that %variables and ~/
94
  # expands to the logged in user's data. %%n, %%d, %%u and %%h expand to the
95
  # destination user's data.
96
  #location = maildir:%%h/Maildir:INDEX=~/Maildir/shared/%%u
97
 
98
  # Use the default namespace for saving subscriptions.
99
  #subscriptions = no
100
 
101
  # List the shared/ namespace only if there are visible shared mailboxes.
102
  #list = children
103
#}
104
# Should shared INBOX be visible as "shared/user" or "shared/user/INBOX"?
105
#mail_shared_explicit_inbox = no
106
 
107
# System user and group used to access mails. If you use multiple, userdb
108
# can override these by returning uid or gid fields. You can use either numbers
109
# or names. <doc/wiki/UserIds.txt>
110
#mail_uid =
111
#mail_gid =
112
 
113
# Group to enable temporarily for privileged operations. Currently this is
114
# used only with INBOX when either its initial creation or dotlocking fails.
115
# Typically this is set to "mail" to give access to /var/mail.
116
mail_privileged_group = mail
117
 
118
# Grant access to these supplementary groups for mail processes. Typically
119
# these are used to set up access to shared mailboxes. Note that it may be
120
# dangerous to set these if users can create symlinks (e.g. if "mail" group is
121
# set here, ln -s /var/mail ~/mail/var could allow a user to delete others'
122
# mailboxes, or ln -s /secret/shared/box ~/mail/mybox would allow reading it).
123
#mail_access_groups =
124
 
125
# Allow full filesystem access to clients. There's no access checks other than
126
# what the operating system does for the active UID/GID. It works with both
127
# maildir and mboxes, allowing you to prefix mailboxes names with eg. /path/
128
# or ~user/.
129
#mail_full_filesystem_access = no
130
 
131
# Dictionary for key=value mailbox attributes. This is used for example by
132
# URLAUTH and METADATA extensions.
133
#mail_attribute_dict =
134
 
135
# A comment or note that is associated with the server. This value is
136
# accessible for authenticated users through the IMAP METADATA server
137
# entry "/shared/comment".
138
#mail_server_comment = ""
139
 
140
# Indicates a method for contacting the server administrator. According to
141
# RFC 5464, this value MUST be a URI (e.g., a mailto: or tel: URL), but that
142
# is currently not enforced. Use for example mailto:admin@example.com. This
143
# value is accessible for authenticated users through the IMAP METADATA server
144
# entry "/shared/admin".
145
#mail_server_admin =
146
 
147
##
148
## Mail processes
149
##
150
 
151
# Don't use mmap() at all. This is required if you store indexes to shared
152
# filesystems (NFS or clustered filesystem).
153
#mmap_disable = no
154
 
155
# Rely on O_EXCL to work when creating dotlock files. NFS supports O_EXCL
156
# since version 3, so this should be safe to use nowadays by default.
157
#dotlock_use_excl = yes
158
 
159
# When to use fsync() or fdatasync() calls:
160
#   optimized (default): Whenever necessary to avoid losing important data
161
#   always: Useful with e.g. NFS when write()s are delayed
162
#   never: Never use it (best performance, but crashes can lose data)
163
#mail_fsync = optimized
164
 
165
# Locking method for index files. Alternatives are fcntl, flock and dotlock.
166
# Dotlocking uses some tricks which may create more disk I/O than other locking
167
# methods. NFS users: flock doesn't work, remember to change mmap_disable.
168
#lock_method = fcntl
169
 
170
# Directory where mails can be temporarily stored. Usually it's used only for
171
# mails larger than >= 128 kB. It's used by various parts of Dovecot, for
172
# example LDA/LMTP while delivering large mails or zlib plugin for keeping
173
# uncompressed mails.
174
#mail_temp_dir = /tmp
175
 
176
# Valid UID range for users, defaults to 500 and above. This is mostly
177
# to make sure that users can't log in as daemons or other system users.
178
# Note that denying root logins is hardcoded to dovecot binary and can't
179
# be done even if first_valid_uid is set to 0.
180
first_valid_uid = 500
181
#last_valid_uid = 0
182
 
183
# Valid GID range for users, defaults to non-root/wheel. Users having
184
# non-valid GID as primary group ID aren't allowed to log in. If user
185
# belongs to supplementary groups with non-valid GIDs, those groups are
186
# not set.
187
#first_valid_gid = 1
188
#last_valid_gid = 0
189
 
190
# Maximum allowed length for mail keyword name. It's only forced when trying
191
# to create new keywords.
192
#mail_max_keyword_length = 50
193
 
194
# ':' separated list of directories under which chrooting is allowed for mail
195
# processes (ie. /var/mail will allow chrooting to /var/mail/foo/bar too).
196
# This setting doesn't affect login_chroot, mail_chroot or auth chroot
197
# settings. If this setting is empty, "/./" in home dirs are ignored.
198
# WARNING: Never add directories here which local users can modify, that
199
# may lead to root exploit. Usually this should be done only if you don't
200
# allow shell access for users. <doc/wiki/Chrooting.txt>
201
#valid_chroot_dirs =
202
 
203
# Default chroot directory for mail processes. This can be overridden for
204
# specific users in user database by giving /./ in user's home directory
205
# (eg. /home/./user chroots into /home). Note that usually there is no real
206
# need to do chrooting, Dovecot doesn't allow users to access files outside
207
# their mail directory anyway. If your home directories are prefixed with
208
# the chroot directory, append "/." to mail_chroot. <doc/wiki/Chrooting.txt>
209
#mail_chroot =
210
 
211
# UNIX socket path to master authentication server to find users.
212
# This is used by imap (for shared users) and lda.
213
#auth_socket_path = /var/run/dovecot/auth-userdb
214
 
215
# Directory where to look up mail plugins.
216
#mail_plugin_dir = /usr/lib/dovecot
217
 
218
# Space separated list of plugins to load for all services. Plugins specific to
219
# IMAP, LDA, etc. are added to this list in their own .conf files.
220
#mail_plugins =
221
 
222
##
223
## Mailbox handling optimizations
224
##
225
 
226
# Mailbox list indexes can be used to optimize IMAP STATUS commands. They are
227
# also required for IMAP NOTIFY extension to be enabled.
228
#mailbox_list_index = yes
229
 
230
# Trust mailbox list index to be up-to-date. This reduces disk I/O at the cost
231
# of potentially returning out-of-date results after e.g. server crashes.
232
# The results will be automatically fixed once the folders are opened.
233
#mailbox_list_index_very_dirty_syncs = yes
234
 
235
# Should INBOX be kept up-to-date in the mailbox list index? By default it's
236
# not, because most of the mailbox accesses will open INBOX anyway.
237
#mailbox_list_index_include_inbox = no
238
 
239
# The minimum number of mails in a mailbox before updates are done to cache
240
# file. This allows optimizing Dovecot's behavior to do less disk writes at
241
# the cost of more disk reads.
242
#mail_cache_min_mail_count = 0
243
 
244
# When IDLE command is running, mailbox is checked once in a while to see if
245
# there are any new mails or other changes. This setting defines the minimum
246
# time to wait between those checks. Dovecot can also use inotify and
247
# kqueue to find out immediately when changes occur.
248
#mailbox_idle_check_interval = 30 secs
249
 
250
# Save mails with CR+LF instead of plain LF. This makes sending those mails
251
# take less CPU, especially with sendfile() syscall with Linux and FreeBSD.
252
# But it also creates a bit more disk I/O which may just make it slower.
253
# Also note that if other software reads the mboxes/maildirs, they may handle
254
# the extra CRs wrong and cause problems.
255
#mail_save_crlf = no
256
 
257
# Max number of mails to keep open and prefetch to memory. This only works with
258
# some mailbox formats and/or operating systems.
259
#mail_prefetch_count = 0
260
 
261
# How often to scan for stale temporary files and delete them (0 = never).
262
# These should exist only after Dovecot dies in the middle of saving mails.
263
#mail_temp_scan_interval = 1w
264
 
265
# How many slow mail accesses sorting can perform before it returns failure.
266
# With IMAP the reply is: NO [LIMIT] Requested sort would have taken too long.
267
# The untagged SORT reply is still returned, but it's likely not correct.
268
#mail_sort_max_read_count = 0
269
 
270
protocol !indexer-worker {
271
  # If folder vsize calculation requires opening more than this many mails from
272
  # disk (i.e. mail sizes aren't in cache already), return failure and finish
273
  # the calculation via indexer process. Disabled by default. This setting must
274
  # be 0 for indexer-worker processes.
275
  #mail_vsize_bg_after_count = 0
276
}
277
 
278
##
279
## Maildir-specific settings
280
##
281
 
282
# By default LIST command returns all entries in maildir beginning with a dot.
283
# Enabling this option makes Dovecot return only entries which are directories.
284
# This is done by stat()ing each entry, so it causes more disk I/O.
285
# (For systems setting struct dirent->d_type, this check is free and it's
286
# done always regardless of this setting)
287
#maildir_stat_dirs = no
288
 
289
# When copying a message, do it with hard links whenever possible. This makes
290
# the performance much better, and it's unlikely to have any side effects.
291
#maildir_copy_with_hardlinks = yes
292
 
293
# Assume Dovecot is the only MUA accessing Maildir: Scan cur/ directory only
294
# when its mtime changes unexpectedly or when we can't find the mail otherwise.
295
#maildir_very_dirty_syncs = no
296
 
297
# If enabled, Dovecot doesn't use the S=<size> in the Maildir filenames for
298
# getting the mail's physical size, except when recalculating Maildir++ quota.
299
# This can be useful in systems where a lot of the Maildir filenames have a
300
# broken size. The performance hit for enabling this is very small.
301
#maildir_broken_filename_sizes = no
302
 
303
# Always move mails from new/ directory to cur/, even when the \Recent flags
304
# aren't being reset.
305
#maildir_empty_new = no
306
 
307
##
308
## mbox-specific settings
309
##
310
 
311
# Which locking methods to use for locking mbox. There are four available:
312
#  dotlock: Create <mailbox>.lock file. This is the oldest and most NFS-safe
313
#           solution. If you want to use /var/mail/ like directory, the users
314
#           will need write access to that directory.
315
#  dotlock_try: Same as dotlock, but if it fails because of permissions or
316
#               because there isn't enough disk space, just skip it.
317
#  fcntl  : Use this if possible. Works with NFS too if lockd is used.
318
#  flock  : May not exist in all systems. Doesn't work with NFS.
319
#  lockf  : May not exist in all systems. Doesn't work with NFS.
320
#
321
# You can use multiple locking methods; if you do the order they're declared
322
# in is important to avoid deadlocks if other MTAs/MUAs are using multiple
323
# locking methods as well. Some operating systems don't allow using some of
324
# them simultaneously.
325
#mbox_read_locks = fcntl
326
#mbox_write_locks = dotlock fcntl
327
mbox_write_locks = fcntl
328
 
329
# Maximum time to wait for lock (all of them) before aborting.
330
#mbox_lock_timeout = 5 mins
331
 
332
# If dotlock exists but the mailbox isn't modified in any way, override the
333
# lock file after this much time.
334
#mbox_dotlock_change_timeout = 2 mins
335
 
336
# When mbox changes unexpectedly we have to fully read it to find out what
337
# changed. If the mbox is large this can take a long time. Since the change
338
# is usually just a newly appended mail, it'd be faster to simply read the
339
# new mails. If this setting is enabled, Dovecot does this but still safely
340
# fallbacks to re-reading the whole mbox file whenever something in mbox isn't
341
# how it's expected to be. The only real downside to this setting is that if
342
# some other MUA changes message flags, Dovecot doesn't notice it immediately.
343
# Note that a full sync is done with SELECT, EXAMINE, EXPUNGE and CHECK
344
# commands.
345
#mbox_dirty_syncs = yes
346
 
347
# Like mbox_dirty_syncs, but don't do full syncs even with SELECT, EXAMINE,
348
# EXPUNGE or CHECK commands. If this is set, mbox_dirty_syncs is ignored.
349
#mbox_very_dirty_syncs = no
350
 
351
# Delay writing mbox headers until doing a full write sync (EXPUNGE and CHECK
352
# commands and when closing the mailbox). This is especially useful for POP3
353
# where clients often delete all mails. The downside is that our changes
354
# aren't immediately visible to other MUAs.
355
#mbox_lazy_writes = yes
356
 
357
# If mbox size is smaller than this (e.g. 100k), don't write index files.
358
# If an index file already exists it's still read, just not updated.
359
#mbox_min_index_size = 0
360
 
361
# Mail header selection algorithm to use for MD5 POP3 UIDLs when
362
# pop3_uidl_format=%m. For backwards compatibility we use apop3d inspired
363
# algorithm, but it fails if the first Received: header isn't unique in all
364
# mails. An alternative algorithm is "all" that selects all headers.
365
#mbox_md5 = apop3d
366
 
367
##
368
## mdbox-specific settings
369
##
370
 
371
# Maximum dbox file size until it's rotated.
372
#mdbox_rotate_size = 10M
373
 
374
# Maximum dbox file age until it's rotated. Typically in days. Day begins
375
# from midnight, so 1d = today, 2d = yesterday, etc. 0 = check disabled.
376
#mdbox_rotate_interval = 0
377
 
378
# When creating new mdbox files, immediately preallocate their size to
379
# mdbox_rotate_size. This setting currently works only in Linux with some
380
# filesystems (ext4, xfs).
381
#mdbox_preallocate_space = no
382
 
383
##
384
## Mail attachments
385
##
386
 
387
# sdbox and mdbox support saving mail attachments to external files, which
388
# also allows single instance storage for them. Other backends don't support
389
# this for now.
390
 
391
# Directory root where to store mail attachments. Disabled, if empty.
392
#mail_attachment_dir =
393
 
394
# Attachments smaller than this aren't saved externally. It's also possible to
395
# write a plugin to disable saving specific attachments externally.
396
#mail_attachment_min_size = 128k
397
 
398
# Filesystem backend to use for saving attachments:
399
#  posix : No SiS done by Dovecot (but this might help FS's own deduplication)
400
#  sis posix : SiS with immediate byte-by-byte comparison during saving
401
#  sis-queue posix : SiS with delayed comparison and deduplication
402
#mail_attachment_fs = sis posix
403
 
404
# Hash format to use in attachment filenames. You can add any text and
405
# variables: %{md4}, %{md5}, %{sha1}, %{sha256}, %{sha512}, %{size}.
406
# Variables can be truncated, e.g. %{sha256:80} returns only first 80 bits
407
#mail_attachment_hash = %{sha1}
408
 
409
# Settings to control adding $HasAttachment or $HasNoAttachment keywords.
410
# By default, all MIME parts with Content-Disposition=attachment, or inlines
411
# with filename parameter are consired attachments.
412
#   add-flags-on-save - Add the keywords when saving new mails.
413
#   content-type=type or !type - Include/exclude content type. Excluding will
414
#     never consider the matched MIME part as attachment. Including will only
415
#     negate an exclusion (e.g. content-type=!foo/* content-type=foo/bar).
416
#   exclude-inlined - Exclude any Content-Disposition=inline MIME part.
417
#mail_attachment_detection_options =