Marius Cramer
2015-08-06 37b29231e47a0c4458dc1c15d98588f16f07e1e2
commit | author | age
6cc49f 1 ## Dovecot configuration file
T 2
3 # If you're in a hurry, see http://wiki.dovecot.org/QuickConfiguration
4
5 # "dovecot -n" command gives a clean output of the changed settings. Use it
6 # instead of copy&pasting this file when posting to the Dovecot mailing list.
7
8 # '#' character and everything after it is treated as comments. Extra spaces
9 # and tabs are ignored. If you want to use either of these explicitly, put the
10 # value inside quotes, eg.: key = "# char and trailing whitespace  "
11
12 # Default values are shown for each setting, it's not required to uncomment
13 # any of the lines. Exception to this are paths, they're just examples with
14 # the real defaults being based on configure options. The paths listed here
15 # are for configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
16 # --with-ssldir=/etc/ssl
17
18 # Base directory where to store runtime data.
19 #base_dir = /var/run/dovecot/
20
21 # Protocols we want to be serving: imap imaps pop3 pop3s managesieve
22 # If you only want to use dovecot-auth, you can set this to "none".
23 #protocols = imap imaps
24 protocols = imap imaps pop3 pop3s
25
26 # IP or host address where to listen in for connections. It's not currently
27 # possible to specify multiple addresses. "*" listens in all IPv4 interfaces.
28 # "[::]" listens in all IPv6 interfaces, but may also listen in all IPv4
29 # interfaces depending on the operating system.
30 #
31 # If you want to specify ports for each service, you will need to configure
32 # these settings inside the protocol imap/pop3/managesieve { ... } section, 
33 # so you can specify different ports for IMAP/POP3/MANAGESIEVE. For example:
34 #   protocol imap {
35 #     listen = *:10143
36 #     ssl_listen = *:10943
37 #     ..
38 #   }
39 #   protocol pop3 {
40 #     listen = *:10100
41 #     ..
42 #   }
43 #   protocol managesieve {
44 #     listen = *:12000
45 #     ..
46 #   }
47 #listen = *
c2568b 48 listen = *,[::]
6cc49f 49
T 50 # Disable LOGIN command and all other plaintext authentications unless
51 # SSL/TLS is used (LOGINDISABLED capability). Note that if the remote IP
52 # matches the local IP (ie. you're connecting from the same computer), the
53 # connection is considered secure and plaintext authentication is allowed.
54 disable_plaintext_auth = no
55
56 # Should all IMAP and POP3 processes be killed when Dovecot master process
57 # shuts down. Setting this to "no" means that Dovecot can be upgraded without
58 # forcing existing client connections to close (although that could also be
59 # a problem if the upgrade is eg. because of a security fix). This however
60 # means that after master process has died, the client processes can't write
61 # to log files anymore.
62 #shutdown_clients = yes
63
64 ##
65 ## Logging
66 ##
67
68 # Log file to use for error messages, instead of sending them to syslog.
69 # /dev/stderr can be used to log into stderr.
70 #log_path = 
71
72 # Log file to use for informational and debug messages.
73 # Default is the same as log_path.
74 #info_log_path = 
75
76 # Prefix for each line written to log file. % codes are in strftime(3)
77 # format.
78 #log_timestamp = "%b %d %H:%M:%S "
79 log_timestamp = "%Y-%m-%d %H:%M:%S "
80
81 # Syslog facility to use if you're logging to syslog. Usually if you don't
82 # want to use "mail", you'll use local0..local7. Also other standard
83 # facilities are supported.
84 #syslog_facility = mail
85
86 ##
87 ## SSL settings
88 ##
89
90 # IP or host address where to listen in for SSL connections. Defaults
91 # to above if not specified.
92 #ssl_listen =
93
94 # Disable SSL/TLS support.
95 #ssl_disable = no
96
97 # PEM encoded X.509 SSL/TLS certificate and private key. They're opened before
98 # dropping root privileges, so keep the key file unreadable by anyone but
99 # root.
100 #ssl_cert_file = /etc/ssl/certs/dovecot.pem
101 #ssl_key_file = /etc/ssl/private/dovecot.pem
102
8cf78b 103 ssl_cert_file = /etc/postfix/smtpd.cert
T 104 ssl_key_file = /etc/postfix/smtpd.key
105
6cc49f 106 # If key file is password protected, give the password here. Alternatively
T 107 # give it when starting dovecot with -p parameter.
108 #ssl_key_password =
109
110 # File containing trusted SSL certificate authorities. Set this only if you
111 # intend to use ssl_verify_client_cert=yes. The CAfile should contain the
112 # CA-certificate(s) followed by the matching CRL(s).
113 #ssl_ca_file = 
114
115 # Request client to send a certificate. If you also want to require it, set
116 # ssl_require_client_cert=yes in auth section.
117 #ssl_verify_client_cert = no
118
119 # How often to regenerate the SSL parameters file. Generation is quite CPU
120 # intensive operation. The value is in hours, 0 disables regeneration
121 # entirely.
122 #ssl_parameters_regenerate = 168
123
124 # SSL ciphers to use
125 #ssl_cipher_list = ALL:!LOW
126
127 # Show protocol level SSL errors.
128 #verbose_ssl = no
129
130 ##
131 ## Login processes
132 ##
133
134 # <doc/wiki/LoginProcess.txt>
135
136 # Directory where authentication process places authentication UNIX sockets
137 # which login needs to be able to connect to. The sockets are created when
138 # running as root, so you don't have to worry about permissions. Note that
139 # everything in this directory is deleted when Dovecot is started.
140 #login_dir = /var/run/dovecot/login
141
142 # chroot login process to the login_dir. Only reason not to do this is if you
143 # wish to run the whole Dovecot without roots. <doc/wiki/Rootless.txt>
144 #login_chroot = yes
145
146 # User to use for the login process. Create a completely new user for this,
147 # and don't use it anywhere else. The user must also belong to a group where
148 # only it has access, it's used to control access for authentication process.
149 # Note that this user is NOT used to access mails. <doc/wiki/UserIds.txt>
150 #login_user = dovecot
151
152 # Set max. process size in megabytes. If you don't use
153 # login_process_per_connection you might need to grow this.
154 #login_process_size = 64
155
156 # Should each login be processed in it's own process (yes), or should one
157 # login process be allowed to process multiple connections (no)? Yes is more
158 # secure, espcially with SSL/TLS enabled. No is faster since there's no need
159 # to create processes all the time.
160 #login_process_per_connection = yes
161
162 # Number of login processes to keep for listening new connections.
163 #login_processes_count = 3
164
165 # Maximum number of login processes to create. The listening process count
166 # usually stays at login_processes_count, but when multiple users start logging
167 # in at the same time more extra processes are created. To prevent fork-bombing
168 # we check only once in a second if new processes should be created - if all
169 # of them are used at the time, we double their amount until the limit set by
170 # this setting is reached.
171 #login_max_processes_count = 128
172
173 # Maximum number of connections allowed per each login process. This setting
174 # is used only if login_process_per_connection=no. Once the limit is reached,
175 # the process notifies master so that it can create a new login process.
176 # You should make sure that the process has at least
177 # 16 + login_max_connections * 2 available file descriptors.
178 #login_max_connections = 256
179
180 # Greeting message for clients.
181 #login_greeting = Dovecot ready.
182
183 # Space-separated list of elements we want to log. The elements which have
184 # a non-empty variable value are joined together to form a comma-separated
185 # string.
186 #login_log_format_elements = user=<%u> method=%m rip=%r lip=%l %c
187
188 # Login log format. %$ contains login_log_format_elements string, %s contains
189 # the data we want to log.
190 #login_log_format = %$: %s
191
192 ##
193 ## Mailbox locations and namespaces
194 ##
195
196 # Location for users' mailboxes. This is the same as the old default_mail_env
197 # setting. The default is empty, which means that Dovecot tries to find the
198 # mailboxes automatically. This won't work if the user doesn't have any mail
199 # yet, so you should explicitly tell Dovecot the full location.
200 #
201 # If you're using mbox, giving a path to the INBOX file (eg. /var/mail/%u)
202 # isn't enough. You'll also need to tell Dovecot where the other mailboxes are
203 # kept. This is called the "root mail directory", and it must be the first
204 # path given in the mail_location setting.
205 #
206 # There are a few special variables you can use, eg.:
207 #
208 #   %u - username
209 #   %n - user part in user@domain, same as %u if there's no domain
210 #   %d - domain part in user@domain, empty if there's no domain
211 #   %h - home directory
212 #
213 # See /usr/share/doc/dovecot-common/wiki/Variables.txt for full list. Some
214 # examples:
215 #
216 #   mail_location = maildir:~/Maildir
217 #   mail_location = mbox:~/mail:INBOX=/var/mail/%u
218 #   mail_location = mbox:/var/mail/%d/%1n/%n:INDEX=/var/indexes/%d/%1n/%n
219 #
220 # <doc/wiki/MailLocation.txt>
221 #
222 #mail_location = 
223
224 # If you need to set multiple mailbox locations or want to change default
225 # namespace settings, you can do it by defining namespace sections.
226 # NOTE: Namespaces currently work ONLY with IMAP! POP3 and LDA currently ignore
227 # namespaces completely, they use only the mail_location setting.
228 #
229 # You can have private, shared and public namespaces. The only difference
230 # between them is how Dovecot announces them to client via NAMESPACE
231 # extension. Shared namespaces are meant for user-owned mailboxes which are
232 # shared to other users, while public namespaces are for more globally
233 # accessible mailboxes.
234 #
235 # REMEMBER: If you add any namespaces, the default namespace must be added
236 # explicitly, ie. mail_location does nothing unless you have a namespace
237 # without a location setting. Default namespace is simply done by having a
238 # namespace with empty prefix.
239 #namespace private {
240    # Hierarchy separator to use. You should use the same separator for all
241    # namespaces or some clients get confused. '/' is usually a good one.
242    # The default however depends on the underlying mail storage format.
243    #separator = 
244
245    # Prefix required to access this namespace. This needs to be different for
246    # all namespaces. For example "Public/".
247    #prefix = 
248
249    # Physical location of the mailbox. This is in same format as
250    # mail_location, which is also the default for it.
251    #location =
252
253    # There can be only one INBOX, and this setting defines which namespace
254    # has it.
255    #inbox = yes
256
257    # If namespace is hidden, it's not advertised to clients via NAMESPACE
258    # extension or shown in LIST replies. This is mostly useful when converting
259    # from another server with different namespaces which you want to depricate
260    # but still keep working. For example you can create hidden namespaces with
261    # prefixes "~/mail/", "~%u/mail/" and "mail/".
262    #hidden = yes
263 #}
264
265 # Group to enable temporarily for privileged operations. Currently this is
266 # used only with INBOX when either its initial creation or dotlocking fails.
267 # Typically this is set to "mail" to give access to /var/mail.
268 mail_privileged_group = mail
269
270 # Grant access to these supplementary groups for mail processes. Typically
271 # these are used to set up access to shared mailboxes. Note that it may be
272 # dangerous to set these if users can create symlinks (e.g. if "mail" group is
273 # set here, ln -s /var/mail ~/mail/var could allow a user to delete others'
274 # mailboxes, or ln -s /secret/shared/box ~/mail/mybox would allow reading it).
275 #mail_access_groups =
276
277 # Allow full filesystem access to clients. There's no access checks other than
278 # what the operating system does for the active UID/GID. It works with both
279 # maildir and mboxes, allowing you to prefix mailboxes names with eg. /path/
280 # or ~user/.
281 #mail_full_filesystem_access = no
282
283 ##
284 ## Mail processes
285 ##
286
287 # Enable mail process debugging. This can help you figure out why Dovecot
288 # isn't finding your mails.
289 #mail_debug = no
290
291 # Log prefix for mail processes.
292 # See /usr/share/doc/dovecot-common/wiki/Variables.txt for list of possible
293 # variables you can use.
294 #mail_log_prefix = "%Us(%u): "
295
296 # Max. number of lines a mail process is allowed to log per second before it's
297 # throttled. 0 means unlimited. Typically there's no need to change this
298 # unless you're using mail_log plugin, which may log a lot.
299 #mail_log_max_lines_per_sec = 10
300
301 # Don't use mmap() at all. This is required if you store indexes to shared
302 # filesystems (NFS or clustered filesystem).
303 #mmap_disable = no
304
305 # Don't write() to mmaped files. This is required for some operating systems
306 # which use separate caches for them, such as OpenBSD.
307 #mmap_no_write = no
308
309 # Rely on O_EXCL to work when creating dotlock files. The default is to use
310 # hard linking. O_EXCL makes the dotlocking faster, but it doesn't always
311 # work with NFS.
312 #dotlock_use_excl = no
313
314 # Don't use fsync() or fdatasync() calls. This makes the performance better
315 # at the cost of potential data loss if the server (or the file server)
316 # goes down.
317 #fsync_disable = no
318
319 # Locking method for index files. Alternatives are fcntl, flock and dotlock.
320 # Dotlocking uses some tricks which may create more disk I/O than other locking
321 # methods. NFS users: flock doesn't work, remember to change mmap_disable.
322 #lock_method = fcntl
323
324 # Drop all privileges before exec()ing the mail process. This is mostly
325 # meant for debugging, otherwise you don't get core dumps. It could be a small
326 # security risk if you use single UID for multiple users, as the users could
327 # ptrace() each others processes then.
328 #mail_drop_priv_before_exec = no
329
330 # Show more verbose process titles (in ps). Currently shows user name and
331 # IP address. Useful for seeing who are actually using the IMAP processes
332 # (eg. shared mailboxes or if same uid is used for multiple accounts).
333 #verbose_proctitle = no
334
335 # Valid UID range for users, defaults to 500 and above. This is mostly
336 # to make sure that users can't log in as daemons or other system users.
337 # Note that denying root logins is hardcoded to dovecot binary and can't
338 # be done even if first_valid_uid is set to 0.
339 #first_valid_uid = 500
340 #last_valid_uid = 0
341
342 # Valid GID range for users, defaults to non-root/wheel. Users having
343 # non-valid GID as primary group ID aren't allowed to log in. If user
344 # belongs to supplementary groups with non-valid GIDs, those groups are
345 # not set.
346 #first_valid_gid = 1
347 #last_valid_gid = 0
348
349 # Maximum number of running mail processes. When this limit is reached,
350 # new users aren't allowed to log in.
351 #max_mail_processes = 1024
352
353 # Set max. process size in megabytes. Most of the memory goes to mmap()ing
354 # files, so it shouldn't harm much even if this limit is set pretty high.
355 #mail_process_size = 256
356
357 # Maximum allowed length for mail keyword name. It's only forced when trying
358 # to create new keywords.
359 #mail_max_keyword_length = 50
360
361 # ':' separated list of directories under which chrooting is allowed for mail
362 # processes (ie. /var/mail will allow chrooting to /var/mail/foo/bar too).
363 # This setting doesn't affect login_chroot or auth chroot variables.
364 # WARNING: Never add directories here which local users can modify, that
365 # may lead to root exploit. Usually this should be done only if you don't
366 # allow shell access for users. <doc/wiki/Chrooting.txt>
367 #valid_chroot_dirs = 
368
369 # Default chroot directory for mail processes. This can be overridden for
370 # specific users in user database by giving /./ in user's home directory
371 # (eg. /home/./user chroots into /home). Note that usually there is no real
372 # need to do chrooting, Dovecot doesn't allow users to access files outside
373 # their mail directory anyway. <doc/wiki/Chrooting.txt>
374 #mail_chroot = 
375
376 ##
377 ## Mailbox handling optimizations
378 ##
379
380 # Space-separated list of fields to initially save into cache file. Currently
381 # these fields are allowed:
382 #
383 #  flags, date.sent, date.received, size.virtual, size.physical
384 #  mime.parts, imap.body, imap.bodystructure
385 #
386 # Different IMAP clients work in different ways, so they benefit from
387 # different cached fields. Some do not benefit from them at all. Caching more
388 # than necessary generates useless disk I/O, so you don't want to do that
389 # either.
390 #
391 # Dovecot attempts to automatically figure out what client wants and it keeps
392 # only that. However the first few times a mailbox is opened, Dovecot hasn't
393 # yet figured out what client needs, so it may not perform optimally. If you
394 # know what fields the majority of your clients need, it may be useful to set
395 # these fields by hand. If client doesn't actually use them, Dovecot will
396 # eventually drop them.
397 #
398 # Usually you should just leave this field alone. The potential benefits are
399 # typically unnoticeable.
400 #mail_cache_fields = 
401
402 # Space-separated list of fields that Dovecot should never save to cache file.
403 # Useful if you want to save disk space at the cost of more I/O when the fields
404 # needed.
405 #mail_never_cache_fields = 
406
407 # The minimum number of mails in a mailbox before updates are done to cache
408 # file. This allows optimizing Dovecot's behavior to do less disk writes at
409 # the cost of more disk reads.
410 #mail_cache_min_mail_count = 0
411
412 # When IDLE command is running, mailbox is checked once in a while to see if
413 # there are any new mails or other changes. This setting defines the minimum
414 # time in seconds to wait between those checks. Dovecot can also use dnotify,
415 # inotify and kqueue to find out immediately when changes occur.
416 #mailbox_idle_check_interval = 30
417
418 # Save mails with CR+LF instead of plain LF. This makes sending those mails
419 # take less CPU, especially with sendfile() syscall with Linux and FreeBSD.
420 # But it also creates a bit more disk I/O which may just make it slower.
421 # Also note that if other software reads the mboxes/maildirs, they may handle
422 # the extra CRs wrong and cause problems.
423 #mail_save_crlf = no
424
425 ##
426 ## Maildir-specific settings
427 ##
428
429 # By default LIST command returns all entries in maildir beginning with a dot.
430 # Enabling this option makes Dovecot return only entries which are directories.
431 # This is done by stat()ing each entry, so it causes more disk I/O.
432 # (For systems setting struct dirent->d_type, this check is free and it's
433 # done always regardless of this setting)
434 #maildir_stat_dirs = no
435
436 # When copying a message, do it with hard links whenever possible. This makes
437 # the performance much better, and it's unlikely to have any side effects.
438 #maildir_copy_with_hardlinks = no
439
440 # When copying a message, try to preserve the base filename. Only if the
441 # destination mailbox already contains the same name (ie. the mail is being
442 # copied there twice), a new name is given. The destination filename check is
443 # done only by looking at dovecot-uidlist file, so if something outside
444 # Dovecot does similar filename preserving copies, you may run into problems.
445 # NOTE: This setting requires maildir_copy_with_hardlinks = yes to work.
446 #maildir_copy_preserve_filename = no
447
448 ##
449 ## mbox-specific settings
450 ##
451
452 # Which locking methods to use for locking mbox. There are four available:
453 #  dotlock: Create <mailbox>.lock file. This is the oldest and most NFS-safe
454 #           solution. If you want to use /var/mail/ like directory, the users
455 #           will need write access to that directory.
456 #  fcntl  : Use this if possible. Works with NFS too if lockd is used.
457 #  flock  : May not exist in all systems. Doesn't work with NFS.
458 #  lockf  : May not exist in all systems. Doesn't work with NFS.
459 #
460 # You can use multiple locking methods; if you do the order they're declared
461 # in is important to avoid deadlocks if other MTAs/MUAs are using multiple
462 # locking methods as well. Some operating systems don't allow using some of
463 # them simultaneously.
464 #mbox_read_locks = fcntl
465 #mbox_write_locks = dotlock fcntl
466
467 # Maximum time in seconds to wait for lock (all of them) before aborting.
468 #mbox_lock_timeout = 300
469
470 # If dotlock exists but the mailbox isn't modified in any way, override the
471 # lock file after this many seconds.
472 #mbox_dotlock_change_timeout = 120
473
474 # When mbox changes unexpectedly we have to fully read it to find out what
475 # changed. If the mbox is large this can take a long time. Since the change
476 # is usually just a newly appended mail, it'd be faster to simply read the
477 # new mails. If this setting is enabled, Dovecot does this but still safely
478 # fallbacks to re-reading the whole mbox file whenever something in mbox isn't
479 # how it's expected to be. The only real downside to this setting is that if
480 # some other MUA changes message flags, Dovecot doesn't notice it immediately.
481 # Note that a full sync is done with SELECT, EXAMINE, EXPUNGE and CHECK 
482 # commands.
483 #mbox_dirty_syncs = yes
484
485 # Like mbox_dirty_syncs, but don't do full syncs even with SELECT, EXAMINE,
486 # EXPUNGE or CHECK commands. If this is set, mbox_dirty_syncs is ignored.
487 #mbox_very_dirty_syncs = no
488
489 # Delay writing mbox headers until doing a full write sync (EXPUNGE and CHECK
490 # commands and when closing the mailbox). This is especially useful for POP3
491 # where clients often delete all mails. The downside is that our changes
492 # aren't immediately visible to other MUAs.
493 #mbox_lazy_writes = yes
494
495 # If mbox size is smaller than this (in kilobytes), don't write index files.
496 # If an index file already exists it's still read, just not updated.
497 #mbox_min_index_size = 0
498
499 ##
500 ## dbox-specific settings
501 ##
502
503 # Maximum dbox file size in kilobytes until it's rotated.
504 #dbox_rotate_size = 2048
505
506 # Minimum dbox file size in kilobytes before it's rotated
507 # (overrides dbox_rotate_days)
508 #dbox_rotate_min_size = 16
509
510 # Maximum dbox file age in days until it's rotated. Day always begins from
511 # midnight, so 1 = today, 2 = yesterday, etc. 0 = check disabled.
512 #dbox_rotate_days = 0
513
514 ##
515 ## IMAP specific settings
516 ##
517
518 protocol imap {
519   # Login executable location.
520   #login_executable = /usr/lib/dovecot/imap-login
521
522   # IMAP executable location. Changing this allows you to execute other
523   # binaries before the imap process is executed.
524   #
525   # This would write rawlogs into ~/dovecot.rawlog/ directory:
526   #   mail_executable = /usr/lib/dovecot/rawlog /usr/lib/dovecot/imap
527   #
528   # This would attach gdb into the imap process and write backtraces into
529   # /tmp/gdbhelper.* files:
530   #   mail_executable = /usr/libexec/dovecot/gdbhelper /usr/libexec/dovecot/imap
531   #
532   #mail_executable = /usr/lib/dovecot/imap
533   mail_executable = /usr/lib/dovecot/rawlog /usr/lib/dovecot/imap
534
535   # Maximum IMAP command line length in bytes. Some clients generate very long
536   # command lines with huge mailboxes, so you may need to raise this if you get
537   # "Too long argument" or "IMAP command line too large" errors often.
538   #imap_max_line_length = 65536
539
540   # Support for dynamically loadable plugins. mail_plugins is a space separated
541   # list of plugins to load.
542   mail_plugins = quota imap_quota 
543   #mail_plugin_dir = /usr/lib/dovecot/modules/imap
544
545   # Send IMAP capabilities in greeting message. This makes it unnecessary for
546   # clients to request it with CAPABILITY command, so it saves one round-trip.
547   # Many clients however don't understand it and ask the CAPABILITY anyway.
548   #login_greeting_capability = no
549
550   # Override the IMAP CAPABILITY response.
551   #imap_capability = 
552
553   # Workarounds for various client bugs:
554   #   delay-newmail:
555   #     Send EXISTS/RECENT new mail notifications only when replying to NOOP
556   #     and CHECK commands. Some clients ignore them otherwise, for example OSX
557   #     Mail (<v2.1). Outlook Express breaks more badly though, without this it
558   #     may show user "Message no longer in server" errors. Note that OE6 still
559   #     breaks even with this workaround if synchronization is set to
560   #     "Headers Only".
561   #   outlook-idle:
562   #     Outlook and Outlook Express never abort IDLE command, so if no mail
563   #     arrives in half a hour, Dovecot closes the connection. This is still
564   #     fine, except Outlook doesn't connect back so you don't see if new mail
565   #     arrives.
566   #   netscape-eoh:
567   #     Netscape 4.x breaks if message headers don't end with the empty "end of
568   #     headers" line. Normally all messages have this, but setting this
569   #     workaround makes sure that Netscape never breaks by adding the line if
570   #     it doesn't exist. This is done only for FETCH BODY[HEADER.FIELDS..]
571   #     commands. Note that RFC says this shouldn't be done.
572   #   tb-extra-mailbox-sep:
573   #     With mbox storage a mailbox can contain either mails or submailboxes,
574   #     but not both. Thunderbird separates these two by forcing server to
575   #     accept '/' suffix in mailbox names in subscriptions list.
576   # The list is space-separated.
577   #imap_client_workarounds = outlook-idle
578 }
579   
580 ##
581 ## POP3 specific settings
582 ##
583
584 protocol pop3 {
585   # Login executable location.
586   #login_executable = /usr/lib/dovecot/pop3-login
587
588   # POP3 executable location. See IMAP's mail_executable above for examples
589   # how this could be changed.
590   #mail_executable = /usr/lib/dovecot/pop3
591   mail_executable = /usr/lib/dovecot/rawlog /usr/lib/dovecot/pop3
592
593   # Don't try to set mails non-recent or seen with POP3 sessions. This is
594   # mostly intended to reduce disk I/O. With maildir it doesn't move files
595   # from new/ to cur/, with mbox it doesn't write Status-header.
596   #pop3_no_flag_updates = no
597
598   # Support LAST command which exists in old POP3 specs, but has been removed
599   # from new ones. Some clients still wish to use this though. Enabling this
600   # makes RSET command clear all \Seen flags from messages.
601   #pop3_enable_last = no
602
603   # If mail has X-UIDL header, use it as the mail's UIDL.
604   #pop3_reuse_xuidl = no
605
606   # Keep the mailbox locked for the entire POP3 session.
607   #pop3_lock_session = no
608
609   # POP3 UIDL (unique mail identifier) format to use. You can use following
610   # variables:
611   #
612   #  %v - Mailbox's IMAP UIDVALIDITY
613   #  %u - Mail's IMAP UID
614   #  %m - MD5 sum of the mailbox headers in hex (mbox only)
615   #  %f - filename (maildir only)
616   #
617   # If you want UIDL compatibility with other POP3 servers, use:
618   #  UW's ipop3d         : %08Xv%08Xu
619   #  Courier version 0   : %f
620   #  Courier version 1   : %u
621   #  Courier version 2   : %v-%u
622   #  Cyrus (<= 2.1.3)    : %u
623   #  Cyrus (>= 2.1.4)    : %v.%u
624   #  Older Dovecots      : %v.%u
625   #  tpop3d              : %Mf
626   #
627   # Note that Outlook 2003 seems to have problems with %v.%u format which was
628   # Dovecot's default, so if you're building a new server it would be a good
629   # idea to change this. %08Xu%08Xv should be pretty fail-safe.
630   #
631   # NOTE: Nowadays this is required to be set explicitly, since the old
632   # default was bad but it couldn't be changed without breaking existing
633   # installations. %08Xu%08Xv will be the new default, so use it for new
634   # installations.
635   #
636   pop3_uidl_format = %08Xu%08Xv
637
638   # POP3 logout format string:
639   #  %t - number of TOP commands
640   #  %p - number of bytes sent to client as a result of TOP command
641   #  %r - number of RETR commands
642   #  %b - number of bytes sent to client as a result of RETR command
643   #  %d - number of deleted messages
644   #  %m - number of messages (before deletion)
645   #  %s - mailbox size in bytes (before deletion)
646   #pop3_logout_format = top=%t/%p, retr=%r/%b, del=%d/%m, size=%s
647
648   # Support for dynamically loadable plugins. mail_plugins is a space separated
649   # list of plugins to load.
650   mail_plugins = quota
651   #mail_plugin_dir = /usr/lib/dovecot/modules/pop3
652
653   # Workarounds for various client bugs:
654   #   outlook-no-nuls:
655   #     Outlook and Outlook Express hang if mails contain NUL characters.
656   #     This setting replaces them with 0x80 character.
657   #   oe-ns-eoh:
658   #     Outlook Express and Netscape Mail breaks if end of headers-line is
659   #     missing. This option simply sends it if it's missing.
660   # The list is space-separated.
661   #pop3_client_workarounds = 
662 }
663
664 ##
665 ## MANAGESIEVE specific settings
666 ##
667
668 protocol managesieve {
669   # Login executable location.
670   #login_executable = /usr/libexec/dovecot/managesieve-login
671
672   # MANAGESIEVE executable location. See IMAP's mail_executable above for 
673   # examples how this could be changed.
674   #mail_executable = /usr/libexec/dovecot/managesieve
675
676   # Maximum MANAGESIEVE command line length in bytes. This setting is 
677   # directly borrowed from IMAP. But, since long command lines are very
678   # unlikely with MANAGESIEVE, changing this will not be very useful.  
679   #managesieve_max_line_length = 65536
680
681   # Specifies the location of the symlink pointing to the active script in
682   # the sieve storage directory. This must match the SIEVE setting used by
683   # deliver (refer to http://wiki.dovecot.org/LDA/Sieve#location for more
684   # info). Variable substitution with % is recognized.
685   sieve=~/.dovecot.sieve
686
687   # This specifies the path to the directory where the uploaded scripts must
688   # be stored. In terms of '%' variable substitution it is identical to
689   # dovecot's mail_location setting used by the mail protocol daemons.
690   sieve_storage=~/sieve
691
692   # If, for some inobvious reason, the sieve_storage remains unset, the 
693   # managesieve daemon uses the specification of the mail_location to find out 
694   # where to store the sieve files (see explaination in README.managesieve). 
695   # The example below, when uncommented, overrides any global mail_location 
696   # specification and stores all the scripts in '~/mail/sieve' if sieve_storage 
697   # is unset. However, you should always use the sieve_storage setting.
698   # mail_location = mbox:~/mail
699
700   # To fool managesieve clients that are focused on timesieved you can
701   # specify the IMPLEMENTATION capability that the dovecot reports to clients 
702   # (default: dovecot).
703   #managesieve_implementation_string = Cyrus timsieved v2.2.13
704 }
705
706 ##
707 ## LDA specific settings
708 ##
709
710 protocol lda {
711   # Address to use when sending rejection mails.
712   postmaster_address = postmaster@example.com
713
714   # Hostname to use in various parts of sent mails, eg. in Message-Id.
715   # Default is the system's real hostname.
716   #hostname = 
717
718   # Support for dynamically loadable plugins. mail_plugins is a space separated
719   # list of plugins to load.
720   #mail_plugins = 
721   mail_plugin_dir = /usr/lib/dovecot/modules/lda
722
723   # Binary to use for sending mails.
724   #sendmail_path = /usr/lib/sendmail
725
726   # UNIX socket path to master authentication server to find users.
727   auth_socket_path = /var/run/dovecot/auth-master
728
729   # Enabling Sieve plugin for server-side mail filtering
730   mail_plugins = cmusieve quota
731 }
732
733 ##
734 ## Authentication processes
735 ##
736
737 # Executable location
738 #auth_executable = /usr/lib/dovecot/dovecot-auth
739
740 # Set max. process size in megabytes.
741 #auth_process_size = 256
742
743 # Authentication cache size in kilobytes. 0 means it's disabled.
744 # Note that bsdauth, PAM and vpopmail require cache_key to be set for caching
745 # to be used.
746 #auth_cache_size = 0
747 # Time to live in seconds for cached data. After this many seconds the cached
748 # record is no longer used, *except* if the main database lookup returns
749 # internal failure. We also try to handle password changes automatically: If
750 # user's previous authentication was successful, but this one wasn't, the
751 # cache isn't used. For now this works only with plaintext authentication.
752 #auth_cache_ttl = 3600
753
754 # Space separated list of realms for SASL authentication mechanisms that need
755 # them. You can leave it empty if you don't want to support multiple realms.
756 # Many clients simply use the first one listed here, so keep the default realm
757 # first.
758 #auth_realms =
759
760 # Default realm/domain to use if none was specified. This is used for both
761 # SASL realms and appending @domain to username in plaintext logins.
762 #auth_default_realm = 
763
764 # List of allowed characters in username. If the user-given username contains
765 # a character not listed in here, the login automatically fails. This is just
766 # an extra check to make sure user can't exploit any potential quote escaping
767 # vulnerabilities with SQL/LDAP databases. If you want to allow all characters,
768 # set this value to empty.
769 #auth_username_chars = abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@
770
771 # Username character translations before it's looked up from databases. The
772 # value contains series of from -> to characters. For example "#@/@" means
773 # that '#' and '/' characters are translated to '@'.
774 #auth_username_translation =
775
776 # Username formatting before it's looked up from databases. You can use
777 # the standard variables here, eg. %Lu would lowercase the username, %n would
778 # drop away the domain if it was given, or "%n-AT-%d" would change the '@' into
779 # "-AT-". This translation is done after auth_username_translation changes.
780 #auth_username_format =
781
782 # If you want to allow master users to log in by specifying the master
783 # username within the normal username string (ie. not using SASL mechanism's
784 # support for it), you can specify the separator character here. The format
785 # is then <username><separator><master username>. UW-IMAP uses "*" as the
786 # separator, so that could be a good choice.
787 #auth_master_user_separator =
788
789 # Username to use for users logging in with ANONYMOUS SASL mechanism
790 #auth_anonymous_username = anonymous
791
792 # More verbose logging. Useful for figuring out why authentication isn't
793 # working.
794 #auth_verbose = no
795
796 # Even more verbose logging for debugging purposes. Shows for example SQL
797 # queries.
798 #auth_debug = no
799
800 # In case of password mismatches, log the passwords and used scheme so the
801 # problem can be debugged. Requires auth_debug=yes to be set.
802 #auth_debug_passwords = no
803
804 # Maximum number of dovecot-auth worker processes. They're used to execute
805 # blocking passdb and userdb queries (eg. MySQL and PAM). They're
806 # automatically created and destroyed as needed.
807 #auth_worker_max_count = 30
808
809 # Host name to use in GSSAPI principal names. The default is to use the
810 # name returned by gethostname().
811 #auth_gssapi_hostname =
812
813 # Kerberos keytab to use for the GSSAPI mechanism. Will use the system 
814 # default (usually /etc/krb5.keytab) if not specified.
815 #auth_krb5_keytab = 
816
817 auth default {
818   # Space separated list of wanted authentication mechanisms:
819   #   plain login digest-md5 cram-md5 ntlm rpa apop anonymous gssapi
820   # NOTE: See also disable_plaintext_auth setting.
821   mechanisms = plain login
822
823   #
824   # Password database is used to verify user's password (and nothing more).
825   # You can have multiple passdbs and userdbs. This is useful if you want to
826   # allow both system users (/etc/passwd) and virtual users to login without
827   # duplicating the system users into virtual database.
828   #
829   # <doc/wiki/PasswordDatabase.txt>
830   #
831   # By adding master=yes setting inside a passdb you make the passdb a list
832   # of "master users", who can log in as anyone else. Unless you're using PAM,
833   # you probably still want the destination user to be looked up from passdb
834   # that it really exists. This can be done by adding pass=yes setting to the
835   # master passdb. <doc/wiki/Authentication.MasterUsers.txt>
836
837   # Users can be temporarily disabled by adding a passdb with deny=yes.
838   # If the user is found from that database, authentication will fail.
839   # The deny passdb should always be specified before others, so it gets
840   # checked first. Here's an example:
841
842   #passdb passwd-file {
843     # File contains a list of usernames, one per line
844     #args = /etc/dovecot.deny
845     #deny = yes
846   #}
847
848   # PAM authentication. Preferred nowadays by most systems. 
849   # Note that PAM can only be used to verify if user's password is correct,
850   # so it can't be used as userdb. If you don't want to use a separate user
851   # database (passwd usually), you can use static userdb.
852   # REMEMBER: You'll need /etc/pam.d/dovecot file created for PAM
853   # authentication to actually work. <doc/wiki/PasswordDatabase.PAM.txt>
fb3a98 854   # passdb pam {
6cc49f 855     # [blocking=yes] [session=yes] [setcred=yes]
T 856     # [cache_key=<key>] [<service name>]
857     #
858     # By default a new process is forked from dovecot-auth for each PAM lookup.
859     # Setting blocking=yes uses the alternative way: dovecot-auth worker
860     # processes do the PAM lookups.
861     #
862     # session=yes makes Dovecot open and immediately close PAM session. Some
863     # PAM plugins need this to work, such as pam_mkhomedir.
864     #
865     # setcred=yes makes Dovecot establish PAM credentials if some PAM plugins
866     # need that. They aren't ever deleted though, so this isn't enabled by
867     # default.
868     #
869     # cache_key can be used to enable authentication caching for PAM
870     # (auth_cache_size also needs to be set). It isn't enabled by default
871     # because PAM modules can do all kinds of checks besides checking password,
872     # such as checking IP address. Dovecot can't know about these checks
873     # without some help. cache_key is simply a list of variables (see
874     # /usr/share/doc/dovecot-common/wiki/Variables.txt) which must match for
875     # the cached data to be used. Here are some examples:
876     #   %u - Username must match. Probably sufficient for most uses.
877     #   %u%r - Username and remote IP address must match.
878     #   %u%s - Username and service (ie. IMAP, POP3) must match.
879     # 
880     # If service name is "*", it means the authenticating service name
881     # is used, eg. pop3 or imap (/etc/pam.d/pop3, /etc/pam.d/imap).
882     #
883     # Some examples:
884     #   args = session=yes *
885     #   args = cache_key=%u dovecot
886     #args = dovecot
fb3a98 887   # }
6cc49f 888
T 889   # System users (NSS, /etc/passwd, or similiar)
890   # In many systems nowadays this uses Name Service Switch, which is
891   # configured in /etc/nsswitch.conf. <doc/wiki/AuthDatabase.Passwd.txt>
892   #passdb passwd {
893     # [blocking=yes] - See userdb passwd for explanation
894     #args = 
895   #}
896
897   # Shadow passwords for system users (NSS, /etc/shadow or similiar).
898   # Deprecated by PAM nowadays.
899   # <doc/wiki/PasswordDatabase.Shadow.txt>
900   #passdb shadow {
901     # [blocking=yes] - See userdb passwd for explanation
902     #args = 
903   #}
904
905   # PAM-like authentication for OpenBSD.
906   # <doc/wiki/PasswordDatabase.BSDAuth.txt>
907   #passdb bsdauth {
908     # [cache_key=<key>] - See cache_key in PAM for explanation.
909     #args =
910   #}
911
912   # passwd-like file with specified location
913   # <doc/wiki/AuthDatabase.PasswdFile.txt>
914   #passdb passwd-file {
915     # Path for passwd-file
916     #args = 
917   #}
918
919   # checkpassword executable authentication
920   # NOTE: You will probably want to use "userdb prefetch" with this.
921   # <doc/wiki/PasswordDatabase.CheckPassword.txt>
922   #passdb checkpassword {
923     # Path for checkpassword binary
924     #args = 
925   #}
926
927   # SQL database <doc/wiki/AuthDatabase.SQL.txt>
928   passdb sql {
929     # Path for SQL configuration file
930     args = /etc/dovecot/dovecot-sql.conf
931   }
932
933   # LDAP database <doc/wiki/AuthDatabase.LDAP.txt>
934   #passdb ldap {
935     # Path for LDAP configuration file
936     #args = /etc/dovecot/dovecot-ldap.conf
937   #}
938
939   # vpopmail authentication <doc/wiki/AuthDatabase.VPopMail.txt>
940   #passdb vpopmail {
941     # [cache_key=<key>] - See cache_key in PAM for explanation.
942     #args =
943   #}
944
945   #
946   # User database specifies where mails are located and what user/group IDs
947   # own them. For single-UID configuration use "static".
948   #
949   # <doc/wiki/UserDatabase.txt>
950   #
951
952   # System users (NSS, /etc/passwd, or similiar). In many systems nowadays this
953   # uses Name Service Switch, which is configured in /etc/nsswitch.conf.
954   # <doc/wiki/AuthDatabase.Passwd.txt>
955   #userdb passwd {
956     # [blocking=yes] - By default the lookups are done in the main dovecot-auth
957     # process. This setting causes the lookups to be done in auth worker
958     # proceses. Useful with remote NSS lookups that may block.
959     # NOTE: Be sure to use this setting with nss_ldap or users might get
960     # logged in as each others!
961     #args = 
962   #}
963
964   # passwd-like file with specified location
965   # <doc/wiki/AuthDatabase.PasswdFile.txt>
966   #userdb passwd-file {
967     # Path for passwd-file
968     #args =
969   #}
970
971   # static settings generated from template <doc/wiki/UserDatabase.Static.txt>
972   #userdb static {
973     # Template for the fields. Can return anything a userdb could normally
974     # return. For example:
975     #
976     #  args = uid=500 gid=500 home=/var/mail/%u
977     #
978     # If you use deliver, it needs to look up users only from the userdb. This
979     # of course doesn't work with static because there is no list of users.
980     # Normally static userdb handles this by doing a passdb lookup. This works
981     # with most passdbs, with PAM being the most notable exception. If you do
982     # the user verification another way, you can add allow_all_users=yes to
983     # the args in which case the passdb lookup is skipped.
984     #
985     #args =
986   #}
987
988   # SQL database <doc/wiki/AuthDatabase.SQL.txt>
989   userdb sql {
990     # Path for SQL configuration file
991     args = /etc/dovecot/dovecot-sql.conf
992   }
993
994   # LDAP database <doc/wiki/AuthDatabase.LDAP.txt>
995   #userdb ldap {
996     # Path for LDAP configuration file
997     #args = /etc/dovecot/dovecot-ldap.conf
998   #}
999
1000   # vpopmail <doc/wiki/AuthDatabase.VPopMail.txt>
1001   #userdb vpopmail {
1002   #}
1003
1004   # "prefetch" user database means that the passdb already provided the
1005   # needed information and there's no need to do a separate userdb lookup.
1006   # This can be made to work with SQL and LDAP databases, see their example
1007   # configuration files for more information how to do it.
1008   # <doc/wiki/UserDatabase.Prefetch.txt>
03b633 1009   userdb prefetch {
D 1010   }
6cc49f 1011
T 1012   # User to use for the process. This user needs access to only user and
1013   # password databases, nothing else. Only shadow and pam authentication
1014   # requires roots, so use something else if possible. Note that passwd
1015   # authentication with BSDs internally accesses shadow files, which also
1016   # requires roots. Note that this user is NOT used to access mails.
1017   # That user is specified by userdb above.
1018   user = root
1019
1020   # Directory where to chroot the process. Most authentication backends don't
1021   # work if this is set, and there's no point chrooting if auth_user is root.
1022   # Note that valid_chroot_dirs isn't needed to use this setting.
1023   #chroot = 
1024
1025   # Number of authentication processes to create
1026   #count = 1
1027
1028   # Require a valid SSL client certificate or the authentication fails.
1029   #ssl_require_client_cert = no
1030
1031   # Take the username from client's SSL certificate, using 
1032   # X509_NAME_get_text_by_NID() which returns the subject's DN's
1033   # CommonName. 
1034   #ssl_username_from_cert = no
1035
1036   # It's possible to export the authentication interface to other programs:
1037   #socket listen {
1038     #master {
1039       # Master socket provides access to userdb information. It's typically
1040       # used to give Dovecot's local delivery agent access to userdb so it
1041       # can find mailbox locations.
1042       #path = /var/run/dovecot/auth-master
1043       #mode = 0600
1044       # Default user/group is the one who started dovecot-auth (root)
1045       #user = 
1046       #group = 
1047     #}
1048     #client {
1049       # The client socket is generally safe to export to everyone. Typical use
1050       # is to export it to your SMTP server so it can do SMTP AUTH lookups
1051       # using it.
1052       #path = /var/run/dovecot/auth-client
1053       #mode = 0660
1054     #}
1055   #}
1056
1057   ## dovecot-lda specific settings
1058   ##
1059   socket listen {
1060     master {
1061       path = /var/run/dovecot/auth-master
1062       mode = 0600
1063       user = vmail # User running Dovecot LDA
1064       #group = vmail # Or alternatively mode 0660 + LDA user in this group
1065     }
1066   client {
1067           path = /var/spool/postfix/private/auth
1068           mode = 0660
1069           user = postfix
1070           group = postfix
1071         }
1072   }
1073
1074 }
1075
1076 # If you wish to use another authentication server than dovecot-auth, you can
1077 # use connect sockets. They are assumed to be already running, Dovecot's master
1078 # process only tries to connect to them. They don't need any other settings
1079 # than the path for the master socket, as the configuration is done elsewhere.
1080 # Note that the client sockets must exist in the login_dir.
1081 #auth external {
1082 #  socket connect {
1083 #    master {
1084 #      path = /var/run/dovecot/auth-master
1085 #    }
1086 #  }
1087 #}
1088
1089 ##
1090 ## Dictionary server settings
1091 ##
1092
1093 # Dictionary can be used by some plugins to store key=value lists.
1094 # Currently this is only used by dict quota backend. The dictionary can be
1095 # used either directly or though a dictionary server. The following dict block
1096 # maps dictionary names to URIs when the server is used. These can then be
1097 # referenced using URIs in format "proxy:<name>".
1098
1099 dict {
1100   #quota = mysql:/etc/dovecot-dict-quota.conf 
1101 }
1102
1103 ##
1104 ## Plugin settings
1105 ##
1106
1107 plugin {
1108   # Here you can give some extra environment variables to mail processes.
1109   # This is mostly meant for passing parameters to plugins. %variable
1110   # expansion is done for all values.
1111
1112   # Quota plugin. Multiple backends are supported:
1113   #   dirsize: Find and sum all the files found from mail directory.
1114   #            Extremely SLOW with Maildir. It'll eat your CPU and disk I/O.
1115   #   dict: Keep quota stored in dictionary (eg. SQL)
1116   #   maildir: Maildir++ quota
1117   #   fs: Read-only support for filesystem quota
1118   quota = maildir
1119
1120   # ACL plugin. vfile backend reads ACLs from "dovecot-acl" file from maildir
1121   # directory. You can also optionally give a global ACL directory path where
1122   # ACLs are applied to all users' mailboxes. The global ACL directory contains
1123   # one file for each mailbox, eg. INBOX or sub.mailbox.
1124   #acl = vfile:/etc/dovecot-acls
1125
1126   # Convert plugin. If set, specifies the source storage path which is
1127   # converted to destination storage (mail_location) when the user logs in.
1128   # The existing mail directory is renamed to <dir>-converted.
1129   #convert_mail = mbox:%h/mail
1130   # Skip mailboxes which we can't open successfully instead of aborting.
1131   #convert_skip_broken_mailboxes = no
1132
1133   # Trash plugin. When saving a message would make user go over quota, this
1134   # plugin automatically deletes the oldest mails from configured mailboxes
1135   # until the message can be saved within quota limits. The configuration file
1136   # is a text file where each line is in format: <priority> <mailbox name>
1137   # Mails are first deleted in lowest -> highest priority number order
1138   #trash = /etc/dovecot-trash.conf
1139
1140   # Lazy expunge plugin. Currently works only with maildirs. When a user
1141   # expunges mails, the mails are moved to a mailbox in another namespace
1142   # (1st). When a mailbox is deleted, the mailbox is moved to another namespace
1143   # (2nd) as well. Also if the deleted mailbox had any expunged messages,
1144   # they're moved to a 3rd namespace. The mails won't be counted in quota,
1145   # and they're not deleted automatically (use a cronjob or something).
1146   #lazy_expunge = .EXPUNGED/ .DELETED/ .DELETED/.EXPUNGED/
1147 }