dovecot-example.conf revision 90f993b4ba4c13d1e73ee7f312bd188b85604410
02c335c23bf5fa225a467c19f2c063fb0dc7b8c3Timo Sirainen## Dovecot 1.0 configuration file
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# Default values are shown after each value, it's not required to uncomment
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# any of the lines. Exception to this are paths, they're just examples
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# with real defaults being based on configure options. The paths listed here
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# are for configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# --with-ssldir=/etc/ssl
4082d5b171d1c3a00ba705093d62b8afc9cf17aeTimo Sirainen# Base directory where to store runtime data.
4082d5b171d1c3a00ba705093d62b8afc9cf17aeTimo Sirainen# Protocols we want to be serving:
4082d5b171d1c3a00ba705093d62b8afc9cf17aeTimo Sirainen# imap imaps pop3 pop3s
4082d5b171d1c3a00ba705093d62b8afc9cf17aeTimo Sirainen#protocols = imap imaps
4082d5b171d1c3a00ba705093d62b8afc9cf17aeTimo Sirainen# IP or host address where to listen in for connections. It's not currently
4082d5b171d1c3a00ba705093d62b8afc9cf17aeTimo Sirainen# possible to specify multiple addresses. "*" listens in all IPv4 interfaces.
4082d5b171d1c3a00ba705093d62b8afc9cf17aeTimo Sirainen# "[::]" listens in all IPv6 interfaces, but may also listen in all IPv4
4082d5b171d1c3a00ba705093d62b8afc9cf17aeTimo Sirainen# interfaces depending on the operating system. You can specify ports with
4082d5b171d1c3a00ba705093d62b8afc9cf17aeTimo Sirainen# "host:port".
4082d5b171d1c3a00ba705093d62b8afc9cf17aeTimo Sirainen#imap_listen = *
4082d5b171d1c3a00ba705093d62b8afc9cf17aeTimo Sirainen#pop3_listen = *
4082d5b171d1c3a00ba705093d62b8afc9cf17aeTimo Sirainen# IP or host address where to listen in for SSL connections. Defaults
4082d5b171d1c3a00ba705093d62b8afc9cf17aeTimo Sirainen# to above non-SSL equilevants if not specified.
4082d5b171d1c3a00ba705093d62b8afc9cf17aeTimo Sirainen#imaps_listen =
4082d5b171d1c3a00ba705093d62b8afc9cf17aeTimo Sirainen#pop3s_listen =
4082d5b171d1c3a00ba705093d62b8afc9cf17aeTimo Sirainen# Disable SSL/TLS support.
4082d5b171d1c3a00ba705093d62b8afc9cf17aeTimo Sirainen#ssl_disable = no
4082d5b171d1c3a00ba705093d62b8afc9cf17aeTimo Sirainen# PEM encoded X.509 SSL/TLS certificate and private key. They're opened before
4082d5b171d1c3a00ba705093d62b8afc9cf17aeTimo Sirainen# dropping root privileges, so keep the key file unreadable by anyone but
4082d5b171d1c3a00ba705093d62b8afc9cf17aeTimo Sirainen# root. Included doc/mkcert.sh can be used to easily generate self-signed
4082d5b171d1c3a00ba705093d62b8afc9cf17aeTimo Sirainen# certificate, just make sure to update the domains in dovecot-openssl.cnf
4082d5b171d1c3a00ba705093d62b8afc9cf17aeTimo Sirainen#ssl_cert_file = /etc/ssl/certs/dovecot.pem
4082d5b171d1c3a00ba705093d62b8afc9cf17aeTimo Sirainen#ssl_key_file = /etc/ssl/private/dovecot.pem
4082d5b171d1c3a00ba705093d62b8afc9cf17aeTimo Sirainen# SSL parameter file. Master process generates this file for login processes.
4082d5b171d1c3a00ba705093d62b8afc9cf17aeTimo Sirainen# It contains Diffie Hellman and RSA parameters.
4082d5b171d1c3a00ba705093d62b8afc9cf17aeTimo Sirainen#ssl_parameters_file = /var/run/dovecot/ssl-parameters.dat
d06d6667bac64aabe1efb216af56ca45108d63b0Timo Sirainen# How often to regenerate the SSL parameters file. Generation is quite CPU
d06d6667bac64aabe1efb216af56ca45108d63b0Timo Sirainen# intensive operation. The value is in hours, 0 disables regeneration
d06d6667bac64aabe1efb216af56ca45108d63b0Timo Sirainen#ssl_parameters_regenerate = 24
d06d6667bac64aabe1efb216af56ca45108d63b0Timo Sirainen# Disable LOGIN command and all other plaintext authentications unless
86bde2c1838d1ce967fa2b394bb952004a4adcb7Timo Sirainen# SSL/TLS is used (LOGINDISABLED capability)
86bde2c1838d1ce967fa2b394bb952004a4adcb7Timo Sirainen#disable_plaintext_auth = no
d06d6667bac64aabe1efb216af56ca45108d63b0Timo Sirainen# Use this logfile instead of syslog(). /dev/stderr can be used if you want to
c8bac7666cdc780a3390110e420350fffb62b909Timo Sirainen# use stderr for logging (ONLY /dev/stderr - otherwise it is closed).
c8bac7666cdc780a3390110e420350fffb62b909Timo Sirainen# For informational messages, use this logfile instead of the default
c8bac7666cdc780a3390110e420350fffb62b909Timo Sirainen#info_log_path =
d06d6667bac64aabe1efb216af56ca45108d63b0Timo Sirainen# Prefix for each line written to log file. % codes are in strftime(3)
d06d6667bac64aabe1efb216af56ca45108d63b0Timo Sirainen# format. Note the extra space at the end of line.
199566f5a171b2c43b9a5254634f6bf47b8baca8Timo Sirainen#log_timestamp = %b %d %H:%M:%S
199566f5a171b2c43b9a5254634f6bf47b8baca8Timo Sirainen## Login processes
199566f5a171b2c43b9a5254634f6bf47b8baca8Timo Sirainen# Directory where authentication process places authentication UNIX sockets
199566f5a171b2c43b9a5254634f6bf47b8baca8Timo Sirainen# which login needs to be able to connect to. The sockets are created when
199566f5a171b2c43b9a5254634f6bf47b8baca8Timo Sirainen# running as root, so you don't have to worry about permissions.
199566f5a171b2c43b9a5254634f6bf47b8baca8Timo Sirainen# chroot login process to the login_dir. Only reason not to do this is if you
199566f5a171b2c43b9a5254634f6bf47b8baca8Timo Sirainen# wish to run the whole Dovecot without roots.
199566f5a171b2c43b9a5254634f6bf47b8baca8Timo Sirainen#login_chroot = yes
199566f5a171b2c43b9a5254634f6bf47b8baca8Timo Sirainen## IMAP login process
199566f5a171b2c43b9a5254634f6bf47b8baca8Timo Sirainen# Executable location.
199566f5a171b2c43b9a5254634f6bf47b8baca8Timo Sirainen#login_executable = /usr/libexec/dovecot/imap-login
199566f5a171b2c43b9a5254634f6bf47b8baca8Timo Sirainen# User to use for the login process. The user must belong to a group where
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# only it has access, it's used to control access for authentication process
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# named sockets.
ba66ac5557ca97d8a6fe5d524056264a9f92243cPhil Carmody#login_user = dovecot
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# Set max. process size in megabytes. If you don't use
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# login_process_per_connection you might need to grow this.
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen#login_process_size = 16
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# Should each login be processed in it's own process (yes), or should one
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# login process be allowed to process multiple connections (no)? Yes is more
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# secure, espcially with SSL/TLS enabled. No is faster since there's no need
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# to create processes all the time.
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen#login_process_per_connection = yes
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# Number of login processes to create. If login_process_per_user is
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# yes, this is the number of extra processes waiting for users to log in.
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen#login_processes_count = 3
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# Maximum number of extra login processes to create. The extra process count
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# usually stays at login_processes_count, but when multiple users start logging
ba66ac5557ca97d8a6fe5d524056264a9f92243cPhil Carmody# in at the same time more extra processes are created. To prevent fork-bombing
ba66ac5557ca97d8a6fe5d524056264a9f92243cPhil Carmody# we check only once in a second if new processes should be created - if all
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# of them are used at the time, we double their amount until limit set by this
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# setting is reached. This setting is used only if login_process_per_use is yes.
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen#login_max_processes_count = 128
ba66ac5557ca97d8a6fe5d524056264a9f92243cPhil Carmody# Maximum number of connections allowed in login state. When this limit is
ba66ac5557ca97d8a6fe5d524056264a9f92243cPhil Carmody# reached, the oldest connections are dropped. If login_process_per_user
ba66ac5557ca97d8a6fe5d524056264a9f92243cPhil Carmody# is no, this is a per-process value, so the absolute maximum number of users
ba66ac5557ca97d8a6fe5d524056264a9f92243cPhil Carmody# logging in actually login_processes_count * max_logging_users.
ba66ac5557ca97d8a6fe5d524056264a9f92243cPhil Carmody#max_logging_users = 256
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen## POP3 login process
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# Settings default to same as above, so you don't have to set anything
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# unless you want to override them.
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# Exception to above rule being the executable location.
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen#login_executable = /usr/libexec/dovecot/pop3-login
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen## Mail processes
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# Maximum number of running mail processes. When this limit is reached,
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# new users aren't allowed to log in.
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen#max_mail_processes = 1024
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# Show more verbose process titles (in ps). Currently shows user name and
d06d6667bac64aabe1efb216af56ca45108d63b0Timo Sirainen# IP address. Useful for seeing who are actually using the IMAP processes
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# (eg. shared mailboxes or if same uid is used for multiple accounts).
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen#verbose_proctitle = no
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# Show protocol level SSL errors.
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen#verbose_ssl = no
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# Valid UID range for users, defaults to 500 and above. This is mostly
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# to make sure that users can't log in as daemons or other system users.
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# Note that denying root logins is hardcoded to dovecot binary and can't
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# be done even if first_valid_uid is set to 0.
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen#first_valid_uid = 500
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen#last_valid_uid = 0
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# Valid GID range for users, defaults to non-root/wheel. Users having
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# non-valid GID as primary group ID aren't allowed to log in. If user
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# belongs to supplementary groups with non-valid GIDs, those groups are
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen#first_valid_gid = 1
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen#last_valid_gid = 0
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# ':' separated list of directories under which chrooting is allowed for mail
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# processes (ie. /var/mail will allow chrooting to /var/mail/foo/bar too).
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# This setting doesn't affect login_chroot or auth_chroot variables.
9f5db9cf866a978aab404772a0daf8794069bba5Phil Carmody# WARNING: Never add directories here which local users can modify, that
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# may lead to root exploit. Usually this should be done only if you don't
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# allow shell access for users. See doc/configuration.txt for more information.
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen#valid_chroot_dirs =
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# Default MAIL environment to use when it's not set. By leaving this empty
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# dovecot tries to do some automatic detection as described in
8ae72ad7d0c69e972cfa65d1e2ce4e3e9a8b765cTimo Sirainen# doc/mail-storages.txt. There's a few special variables you can use:
369764cc0856a4c5e9b4081de8c4e29e90f11ccdTimo Sirainen# %u - username
8ae72ad7d0c69e972cfa65d1e2ce4e3e9a8b765cTimo Sirainen# %n - user part in user@domain, same as %u if there's no domain
8ae72ad7d0c69e972cfa65d1e2ce4e3e9a8b765cTimo Sirainen# %d - domain part in user@domain, empty if user there's no domain
8ae72ad7d0c69e972cfa65d1e2ce4e3e9a8b765cTimo Sirainen# %h - home directory
8ae72ad7d0c69e972cfa65d1e2ce4e3e9a8b765cTimo Sirainen# You can also limit a width of string by giving the number of max. characters
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# after the '%' character. For example %1u gives the first character of
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# username. Some examples:
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# maildir:/var/mail/%1u/%u/Maildir
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# mbox:~/mail/:INBOX=/var/mail/%u
8ae72ad7d0c69e972cfa65d1e2ce4e3e9a8b765cTimo Sirainen# mbox:/var/mail/%d/%n/:INDEX=/var/indexes/%d/%n
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen#default_mail_env =
86bde2c1838d1ce967fa2b394bb952004a4adcb7Timo Sirainen# Space-separated list of fields to cache for all mails. Currently these
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# fields are allowed followed by a list of commands they speed up:
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# Envelope - FETCH ENVELOPE and SEARCH FROM, TO, CC, BCC, SUBJECT,
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# SENTBEFORE, SENTON, SENTSINCE, HEADER MESSAGE-ID,
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# HEADER IN-REPLY-TO
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# Body - FETCH BODY
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# Bodystructure - FETCH BODY, BODYSTRUCTURE
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# MessagePart - FETCH BODY[1.2.3] (ie. body parts), RFC822.SIZE,
8ae72ad7d0c69e972cfa65d1e2ce4e3e9a8b765cTimo Sirainen# SEARCH SMALLER, LARGER, also speeds up BODY/BODYSTRUCTURE
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# generation. This is always set with mbox mailboxes, and
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# also default with Maildir.
8ae72ad7d0c69e972cfa65d1e2ce4e3e9a8b765cTimo Sirainen# Different IMAP clients work in different ways, that's why Dovecot by default
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# only caches MessagePart which speeds up most operations. Whenever client
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# does something where caching could be used, the field is automatically marked
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# to be cached later. For example after FETCH BODY the BODY will be cached
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# for all new messages. Normally you should leave this alone, unless you know
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# what most of your IMAP clients are. Caching more fields than needed makes
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# the index files larger and generate useless I/O.
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# With maildir there's one extra optimization - if nothing is cached, indexing
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# the maildir becomes much faster since it's not opening any of the mail files.
369764cc0856a4c5e9b4081de8c4e29e90f11ccdTimo Sirainen# This could be useful if your IMAP clients access only new mails.
369764cc0856a4c5e9b4081de8c4e29e90f11ccdTimo Sirainen#mail_cache_fields = MessagePart
369764cc0856a4c5e9b4081de8c4e29e90f11ccdTimo Sirainen# Space-separated list of fields that Dovecot should never set to be cached.
369764cc0856a4c5e9b4081de8c4e29e90f11ccdTimo Sirainen# Useful if you want to save disk space at the cost of more I/O when the fields
369764cc0856a4c5e9b4081de8c4e29e90f11ccdTimo Sirainen#mail_never_cache_fields =
369764cc0856a4c5e9b4081de8c4e29e90f11ccdTimo Sirainen# Workarounds for various client bugs:
369764cc0856a4c5e9b4081de8c4e29e90f11ccdTimo Sirainen# oe6-fetch-no-newmail:
369764cc0856a4c5e9b4081de8c4e29e90f11ccdTimo Sirainen# Never send EXISTS/RECENT when replying to FETCH command. Outlook Express
369764cc0856a4c5e9b4081de8c4e29e90f11ccdTimo Sirainen# seems to think they are FETCH replies and gives user "Message no longer
369764cc0856a4c5e9b4081de8c4e29e90f11ccdTimo Sirainen# in server" error. Note that OE6 still breaks even with this workaround
369764cc0856a4c5e9b4081de8c4e29e90f11ccdTimo Sirainen# if synchronization is set to "Headers Only".
369764cc0856a4c5e9b4081de8c4e29e90f11ccdTimo Sirainen# outlook-idle:
369764cc0856a4c5e9b4081de8c4e29e90f11ccdTimo Sirainen# Outlook and Outlook Express never abort IDLE command, so if no mail
369764cc0856a4c5e9b4081de8c4e29e90f11ccdTimo Sirainen# arrives in half a hour, Dovecot closes the connection. This is still
369764cc0856a4c5e9b4081de8c4e29e90f11ccdTimo Sirainen# fine, except Outlook doesn't connect back so you don't see if new mail
369764cc0856a4c5e9b4081de8c4e29e90f11ccdTimo Sirainen#client_workarounds =
369764cc0856a4c5e9b4081de8c4e29e90f11ccdTimo Sirainen# Dovecot can notify client of new mail in selected mailbox soon after it's
369764cc0856a4c5e9b4081de8c4e29e90f11ccdTimo Sirainen# received. This setting specifies the minimum interval in seconds between
369764cc0856a4c5e9b4081de8c4e29e90f11ccdTimo Sirainen# new mail notifications to client - internally they may be checked more or
369764cc0856a4c5e9b4081de8c4e29e90f11ccdTimo Sirainen# less often. Setting this to 0 disables the checking.
369764cc0856a4c5e9b4081de8c4e29e90f11ccdTimo Sirainen# NOTE: Evolution client breaks with this option when it's trying to APPEND.
369764cc0856a4c5e9b4081de8c4e29e90f11ccdTimo Sirainen#mailbox_check_interval = 0
369764cc0856a4c5e9b4081de8c4e29e90f11ccdTimo Sirainen# Like mailbox_check_interval, but used for IDLE command.
369764cc0856a4c5e9b4081de8c4e29e90f11ccdTimo Sirainen#mailbox_idle_check_interval = 30
369764cc0856a4c5e9b4081de8c4e29e90f11ccdTimo Sirainen# Allow full filesystem access to clients. There's no access checks other than
369764cc0856a4c5e9b4081de8c4e29e90f11ccdTimo Sirainen# what the operating system does for the active UID/GID. It works with both
369764cc0856a4c5e9b4081de8c4e29e90f11ccdTimo Sirainen# maildir and mboxes, allowing you to prefix mailboxes names with eg. /path/
369764cc0856a4c5e9b4081de8c4e29e90f11ccdTimo Sirainen#mail_full_filesystem_access = no
369764cc0856a4c5e9b4081de8c4e29e90f11ccdTimo Sirainen# Maximum allowed length for custom flag name. It's only forced when trying
369764cc0856a4c5e9b4081de8c4e29e90f11ccdTimo Sirainen# to create new flags.
369764cc0856a4c5e9b4081de8c4e29e90f11ccdTimo Sirainen#mail_max_flag_length = 50
369764cc0856a4c5e9b4081de8c4e29e90f11ccdTimo Sirainen# Save mails with CR+LF instead of plain LF. This makes sending those mails
369764cc0856a4c5e9b4081de8c4e29e90f11ccdTimo Sirainen# take less CPU, especially with sendfile() syscall with Linux and FreeBSD.
369764cc0856a4c5e9b4081de8c4e29e90f11ccdTimo Sirainen# But it also creates a bit more disk I/O which may just make it slower.
369764cc0856a4c5e9b4081de8c4e29e90f11ccdTimo Sirainen#mail_save_crlf = no
369764cc0856a4c5e9b4081de8c4e29e90f11ccdTimo Sirainen# Use mmap() instead of read() to read mail files. read() seems to be a bit
369764cc0856a4c5e9b4081de8c4e29e90f11ccdTimo Sirainen# faster with my Linux/x86 and it's better with NFS, so that's the default.
369764cc0856a4c5e9b4081de8c4e29e90f11ccdTimo Sirainen#mail_read_mmaped = no
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# Copy mail to another folders using hard links. This is much faster than
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# actually copying the file. This is problematic only if something modifies
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# the mail in one folder but doesn't want it modified in the others. I don't
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# know any MUA which would modify mail files directly. IMAP protocol also
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# requires that the mails don't change, so it would be problematic in any case.
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# If you care about performance, enable it.
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen#maildir_copy_with_hardlinks = no
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# Check if mails' content has been changed by external programs. This slows
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# down things as extra stat() needs to be called for each file. If changes are
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# noticed, the message is treated as a new message, since IMAP protocol
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# specifies that existing message are immutable.
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen#maildir_check_content_changes = no
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# Which locking methods to use for locking mbox. There's three available:
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# dotlock: Create <mailbox>.lock file. This is the oldest and most NFS-safe
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# solution. If you want to use /var/mail/ like directory, the users
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# will need write access to that directory.
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# fcntl : Use this if possible. Works with NFS too if lockd is used.
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# flock : May not exist in all systems. Doesn't work with NFS.
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# You can use both fcntl and flock too; if you do the order they're declared
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# with is important to avoid deadlocks if other MTAs/MUAs are using both fcntl
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# and flock. Some operating systems don't allow using both of them
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# simultaneously, eg. BSDs. If dotlock is used, it's always created first.
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen#mbox_locks = dotlock fcntl
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# Should we create dotlock file even when we want only a read-lock? Setting
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# this to yes hurts the performance when the mailbox is accessed simultaneously
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# by multiple processes, but it's needed for reliable reading if no other
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# locking methods are available.
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen#mbox_read_dotlock = no
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# Maximum time in seconds to wait for lock (all of them) before aborting.
4082d5b171d1c3a00ba705093d62b8afc9cf17aeTimo Sirainen#mbox_lock_timeout = 300
199566f5a171b2c43b9a5254634f6bf47b8baca8Timo Sirainen# If dotlock exists but the mailbox isn't modified in any way, override the
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# lock file after this many seconds.
369764cc0856a4c5e9b4081de8c4e29e90f11ccdTimo Sirainen#mbox_dotlock_change_timeout = 30
48acc31adebfdd4e4945ee76e1f5259e4b1b6fffTimo Sirainen# umask to use for mail files and directories
# ldap <config path>: LDAP, see doc/dovecot-ldap.conf
# pgsql <config path>: a PostgreSQL database, see doc/dovecot-pgsql.conf
# ldap <config path>: LDAP, see doc/dovecot-ldap.conf
# pgsql <config path>: a PostgreSQL database, see doc/dovecot-pgsql.conf
#auth_executable = /usr/libexec/dovecot/dovecot-auth
#auth_userdb = passwd-file /etc/passwd.imap
#auth_passdb = passwd-file /etc/passwd.imap