dovecot-example.conf revision 714af786b95457703f620ff9e9e7618b5d426167
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes## Dovecot 1.0 configuration file
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# '#' character and everything after it is treated as comments. Extra spaces
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# and tabs are ignored. If you want to use either of these explicitly, put the
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# value inside quotes, eg.: key = "# char and trailing whitespace "
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# Default values are shown after each value, it's not required to uncomment
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# any of the lines. Exception to this are paths, they're just examples
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# with real defaults being based on configure options. The paths listed here
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# are for configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
0662ed52e814f8f08ef0e09956413a792584eddffuankg# --with-ssldir=/etc/ssl
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# Base directory where to store runtime data.
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes#base_dir = /var/run/dovecot/
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# Protocols we want to be serving:
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# imap imaps pop3 pop3s
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes#protocols = imap imaps
70953fb44a7140fe206c3a5f011e24209c8c5c6abnicholes# IP or host address where to listen in for connections. It's not currently
16b55a35cff91315d261d1baa776138af465c4e4fuankg# possible to specify multiple addresses. "*" listens in all IPv4 interfaces.
16b55a35cff91315d261d1baa776138af465c4e4fuankg# "[::]" listens in all IPv6 interfaces, but may also listen in all IPv4
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# interfaces depending on the operating system. If you want to specify ports
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# for each service, you will need to configure these settings inside the
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# protocol imap/pop3 { ... } section, so you can specify different ports
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# IP or host address where to listen in for SSL connections. Defaults
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# to above if not specified.
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes#ssl_listen =
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# Disable SSL/TLS support.
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes#ssl_disable = no
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# PEM encoded X.509 SSL/TLS certificate and private key. They're opened before
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# dropping root privileges, so keep the key file unreadable by anyone but
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# root. Included doc/mkcert.sh can be used to easily generate self-signed
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# certificate, just make sure to update the domains in dovecot-openssl.cnf
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes#ssl_cert_file = /etc/ssl/certs/dovecot.pem
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes#ssl_key_file = /etc/ssl/private/dovecot.pem
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# File containing trusted SSL certificate authorities. Usually not needed.
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes#ssl_ca_file =
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# Request client to send a certificate.
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes#ssl_verify_client_cert = no
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# SSL parameter file. Master process generates this file for login processes.
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# It contains Diffie Hellman and RSA parameters.
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes#ssl_parameters_file = /var/run/dovecot/ssl-parameters.dat
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# How often to regenerate the SSL parameters file. Generation is quite CPU
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# intensive operation. The value is in hours, 0 disables regeneration
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes#ssl_parameters_regenerate = 24
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg# SSL ciphers to use
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes#ssl_cipher_list = ALL:!LOW
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# Disable LOGIN command and all other plaintext authentications unless
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# SSL/TLS is used (LOGINDISABLED capability). Note that 127.*.*.* and
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# IPv6 ::1 addresses are considered secure, this setting has no effect if
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# you connect from those addresses.
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes#disable_plaintext_auth = yes
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# Use this logfile instead of syslog(). /dev/stderr can be used if you want to
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# use stderr for logging (ONLY /dev/stderr - otherwise it is closed).
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# For informational messages, use this logfile instead of the default
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg#info_log_path =
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# Prefix for each line written to log file. % codes are in strftime(3)
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes#log_timestamp = "%b %d %H:%M:%S "
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# Syslog facility to use if you're logging to syslog. Usually if you don't
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# want to use "mail", you'll use local0..local7. Also other standard
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# facilities are supported.
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes#syslog_facility = mail
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes## Login processes
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# Directory where authentication process places authentication UNIX sockets
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# which login needs to be able to connect to. The sockets are created when
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# running as root, so you don't have to worry about permissions. Note that
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# everything in this directory is deleted when Dovecot is started.
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# chroot login process to the login_dir. Only reason not to do this is if you
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg# wish to run the whole Dovecot without roots.
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes#login_chroot = yes
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# User to use for the login process. Create a completely new user for this,
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# and don't use it anywhere else. The user must also belong to a group where
0a39e7683f6611d66c55712f50bb240428d832a1bnicholes# only it has access, it's used to control access for authentication process.
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# Note that this user is NOT used to access mails.
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes#login_user = dovecot
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# Set max. process size in megabytes. If you don't use
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# login_process_per_connection you might need to grow this.
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes#login_process_size = 32
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg# Should each login be processed in it's own process (yes), or should one
0662ed52e814f8f08ef0e09956413a792584eddffuankg# login process be allowed to process multiple connections (no)? Yes is more
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# secure, espcially with SSL/TLS enabled. No is faster since there's no need
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg# to create processes all the time.
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes#login_process_per_connection = yes
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# Number of login processes to create. If login_process_per_connection is
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# yes, this is the number of extra processes waiting for users to log in.
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes#login_processes_count = 3
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# Maximum number of extra login processes to create. The extra process count
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# usually stays at login_processes_count, but when multiple users start logging
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# in at the same time more extra processes are created. To prevent fork-bombing
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# we check only once in a second if new processes should be created - if all
0662ed52e814f8f08ef0e09956413a792584eddffuankg# of them are used at the time, we double their amount until limit set by this
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# setting is reached. This setting is used only if login_process_per_use is yes.
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes#login_max_processes_count = 128
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# Maximum number of connections allowed in login state. When this limit is
0662ed52e814f8f08ef0e09956413a792584eddffuankg# reached, the oldest connections are dropped. If login_process_per_connection
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# is no, this is a per-process value, so the absolute maximum number of users
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# logging in actually login_processes_count * max_logging_users.
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes#login_max_logging_users = 256
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# Greeting message for clients.
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes#login_greeting = Dovecot ready.
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# Space-separated list of elements we want to log. The elements which have
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# a non-empty variable value are joined together to form a comma-separated
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes#login_log_format_elements = user=<%u> method=%m rip=%r lip=%l %c
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg# Login log format. %$ contains login_log_format_elements string, %s contains
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# the data we want to log.
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes#login_log_format = %$: %s
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes## Mail processes
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# Maximum number of running mail processes. When this limit is reached,
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# new users aren't allowed to log in.
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes#max_mail_processes = 1024
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# Show more verbose process titles (in ps). Currently shows user name and
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# IP address. Useful for seeing who are actually using the IMAP processes
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# (eg. shared mailboxes or if same uid is used for multiple accounts).
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes#verbose_proctitle = no
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# Show protocol level SSL errors.
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes#verbose_ssl = no
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# Valid UID range for users, defaults to 500 and above. This is mostly
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# to make sure that users can't log in as daemons or other system users.
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# Note that denying root logins is hardcoded to dovecot binary and can't
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# be done even if first_valid_uid is set to 0.
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes#first_valid_uid = 500
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes#last_valid_uid = 0
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# Valid GID range for users, defaults to non-root/wheel. Users having
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# non-valid GID as primary group ID aren't allowed to log in. If user
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# belongs to supplementary groups with non-valid GIDs, those groups are
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes#first_valid_gid = 1
cf7ca2f9eaa6523fefcccba4287b91637391fb51fuankg#last_valid_gid = 0
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# Grant access to these extra groups for mail processes. Typical use would be
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# to give "mail" group write access to /var/mail to be able to create dotlocks.
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes#mail_extra_groups =
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# ':' separated list of directories under which chrooting is allowed for mail
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# processes (ie. /var/mail will allow chrooting to /var/mail/foo/bar too).
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# This setting doesn't affect login_chroot or auth_chroot variables.
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# WARNING: Never add directories here which local users can modify, that
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# may lead to root exploit. Usually this should be done only if you don't
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# allow shell access for users. See doc/configuration.txt for more information.
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes#valid_chroot_dirs =
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# Default chroot directory for mail processes. This can be overridden for
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# specific users in user database by giving /./ in user's home directory
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg# (eg. /home/./user chroots into /home). Note that usually there is no real
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# need to do chrooting, Dovecot doesn't allow users to access files outside
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# their mail directory anyway.
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes#mail_chroot =
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# Enable mail process debugging. This can help you figure out why Dovecot
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# isn't finding your mails.
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes#mail_debug = no
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# Default MAIL environment to use when it's not set. By leaving this empty
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# dovecot tries to do some automatic detection as described in
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# doc/mail-storages.txt. There's a few special variables you can use, eg.:
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# %u - username
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# %n - user part in user@domain, same as %u if there's no domain
8ffac2c334103c0336602aaede650cb578611151fuankg# %d - domain part in user@domain, empty if there's no domain
8ffac2c334103c0336602aaede650cb578611151fuankg# %h - home directory
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# See doc/variables.txt for full list. Some examples:
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# default_mail_env = mbox:~/mail/:INBOX=/var/mail/%u
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# default_mail_env = mbox:/var/mail/%d/%n/:INDEX=/var/indexes/%d/%n
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes#default_mail_env =
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg# If you need to set multiple mailbox locations or want to change default
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg# namespace settings, you can do it by defining namespace sections:
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# You can have private, shared and public namespaces. The only difference
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# between them is how Dovecot announces them to client via NAMESPACE
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# extension. Shared namespaces are meant for user-owned mailboxes which are
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg# shared to other users, while public namespaces are for more globally
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# accessible mailboxes.
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# REMEMBER: If you add any namespaces, the default namespace must be added
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# explicitly, ie. default_mail_env does nothing unless you have a namespace
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# without a location setting. Default namespace is simply done by having a
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes# namespace with empty prefix.
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes#namespace private {
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes # Hierarchy separator to use. You should use the same separator for all
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes # namespaces or some clients get confused. '/' is usually a good one.
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes #separator = /
0662ed52e814f8f08ef0e09956413a792584eddffuankg # Prefix required to access this namespace. This needs to be different for
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes # all namespaces. For example "Public/".
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes # Physical location of the mailbox. This is in same format as
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes # default_mail_env, which is also the default for it.
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes # There can be only one INBOX, and this setting defines which namespace
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes #inbox = yes
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes # If namespace is hidden, it's not advertised to clients via NAMESPACE
0662ed52e814f8f08ef0e09956413a792584eddffuankg # extension or shown in LIST replies. This is mostly useful when converting
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes # from another server with different namespaces which you want to depricate
# flags, date.sent, date.received, size.virtual, size.physical
# Log prefix for mail processes. See doc/variables.txt for list of possible
#auth_executable = /usr/libexec/dovecot/dovecot-auth
# default (usually /etc/krb5.keytab) if not specified.
# path = /var/run/dovecot-auth-master
# path = /var/run/dovecot-auth-client
# path = /var/run/dovecot-auth-master