mail.conf revision 9ff39148453aa6db8887ec1cde46bd7489109c09
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen## Mailbox locations and namespaces
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# Location for users' mailboxes. This is the same as the old default_mail_env
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# setting. The default is empty, which means that Dovecot tries to find the
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# mailboxes automatically. This won't work if the user doesn't have any mail
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# yet, so you should explicitly tell Dovecot the full location.
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# If you're using mbox, giving a path to the INBOX file (eg. /var/mail/%u)
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# isn't enough. You'll also need to tell Dovecot where the other mailboxes are
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# kept. This is called the "root mail directory", and it must be the first
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# path given in the mail_location setting.
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# There are a few special variables you can use, eg.:
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# %u - username
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# %n - user part in user@domain, same as %u if there's no domain
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# %d - domain part in user@domain, empty if there's no domain
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# %h - home directory
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# See doc/wiki/Variables.txt for full list. Some examples:
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# mail_location = maildir:~/Maildir
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# mail_location = mbox:~/mail:INBOX=/var/mail/%u
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# mail_location = mbox:/var/mail/%d/%1n/%n:INDEX=/var/indexes/%d/%1n/%n
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen#mail_location =
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# If you need to set multiple mailbox locations or want to change default
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# namespace settings, you can do it by defining namespace sections.
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# You can have private, shared and public namespaces. Private namespaces
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# are for user's personal mails. Shared namespaces are for accessing other
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# users' mailboxes that have been shared. Public namespaces are for shared
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# mailboxes that are managed by sysadmin. If you create any shared or public
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# namespaces you'll typically want to enable ACL plugin also, otherwise all
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# users can access all the shared mailboxes, assuming they have permissions
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# on filesystem level to do so.
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# REMEMBER: If you add any namespaces, the default namespace must be added
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# explicitly, ie. mail_location does nothing unless you have a namespace
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# without a location setting. Default namespace is simply done by having a
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# namespace with empty prefix.
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen # Namespace type: private, shared or public
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen #type = private
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen # Hierarchy separator to use. You should use the same separator for all
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen # namespaces or some clients get confused. '/' is usually a good one.
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen # The default however depends on the underlying mail storage format.
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen # Prefix required to access this namespace. This needs to be different for
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen # all namespaces. For example "Public/".
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen # Physical location of the mailbox. This is in same format as
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen # mail_location, which is also the default for it.
108340ffacae3b7d09fa51b566d77aa51dd6483bTimo Sirainen # There can be only one INBOX, and this setting defines which namespace
108340ffacae3b7d09fa51b566d77aa51dd6483bTimo Sirainen # If namespace is hidden, it's not advertised to clients via NAMESPACE
108340ffacae3b7d09fa51b566d77aa51dd6483bTimo Sirainen # extension. You'll most likely also want to set list=no. This is mostly
108340ffacae3b7d09fa51b566d77aa51dd6483bTimo Sirainen # useful when converting from another server with different namespaces which
108340ffacae3b7d09fa51b566d77aa51dd6483bTimo Sirainen # you want to deprecate but still keep working. For example you can create
108340ffacae3b7d09fa51b566d77aa51dd6483bTimo Sirainen # hidden namespaces with prefixes "~/mail/", "~%u/mail/" and "mail/".
108340ffacae3b7d09fa51b566d77aa51dd6483bTimo Sirainen #hidden = yes
108340ffacae3b7d09fa51b566d77aa51dd6483bTimo Sirainen # Show the mailboxes under this namespace with LIST command. This makes the
108340ffacae3b7d09fa51b566d77aa51dd6483bTimo Sirainen # namespace visible for clients that don't support NAMESPACE extension.
108340ffacae3b7d09fa51b566d77aa51dd6483bTimo Sirainen # "children" value lists child mailboxes, but hides the namespace prefix.
108340ffacae3b7d09fa51b566d77aa51dd6483bTimo Sirainen # Namespace handles its own subscriptions. If set to "no", the parent
108340ffacae3b7d09fa51b566d77aa51dd6483bTimo Sirainen # namespace handles them (empty prefix should always have this as "yes")
108340ffacae3b7d09fa51b566d77aa51dd6483bTimo Sirainen #subscriptions = yes
108340ffacae3b7d09fa51b566d77aa51dd6483bTimo Sirainen# Example shared namespace configuration
108340ffacae3b7d09fa51b566d77aa51dd6483bTimo Sirainen #type = shared
108340ffacae3b7d09fa51b566d77aa51dd6483bTimo Sirainen #separator = /
108340ffacae3b7d09fa51b566d77aa51dd6483bTimo Sirainen # Mailboxes are visible under "shared/user@domain/"
108340ffacae3b7d09fa51b566d77aa51dd6483bTimo Sirainen # %%n, %%d and %%u are expanded to the destination user.
108340ffacae3b7d09fa51b566d77aa51dd6483bTimo Sirainen #prefix = shared/%%u/
108340ffacae3b7d09fa51b566d77aa51dd6483bTimo Sirainen # Mail location for other users' mailboxes. Note that %variables and ~/
108340ffacae3b7d09fa51b566d77aa51dd6483bTimo Sirainen # expands to the logged in user's data. %%n, %%d, %%u and %%h expand to the
108340ffacae3b7d09fa51b566d77aa51dd6483bTimo Sirainen # destination user's data.
108340ffacae3b7d09fa51b566d77aa51dd6483bTimo Sirainen #location = maildir:%%h/Maildir:INDEX=~/Maildir/shared/%%u
108340ffacae3b7d09fa51b566d77aa51dd6483bTimo Sirainen # Use the default namespace for saving subscriptions.
108340ffacae3b7d09fa51b566d77aa51dd6483bTimo Sirainen #subscriptions = no
108340ffacae3b7d09fa51b566d77aa51dd6483bTimo Sirainen # List the shared/ namespace only if there are visible shared mailboxes.
108340ffacae3b7d09fa51b566d77aa51dd6483bTimo Sirainen #list = children
108340ffacae3b7d09fa51b566d77aa51dd6483bTimo Sirainen# System user and group used to access mails. If you use multiple, userdb
108340ffacae3b7d09fa51b566d77aa51dd6483bTimo Sirainen# can override these by returning uid or gid fields. You can use either numbers
108340ffacae3b7d09fa51b566d77aa51dd6483bTimo Sirainen# Group to enable temporarily for privileged operations. Currently this is
108340ffacae3b7d09fa51b566d77aa51dd6483bTimo Sirainen# used only with INBOX when either its initial creation or dotlocking fails.
108340ffacae3b7d09fa51b566d77aa51dd6483bTimo Sirainen# Typically this is set to "mail" to give access to /var/mail.
108340ffacae3b7d09fa51b566d77aa51dd6483bTimo Sirainen#mail_privileged_group =
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# Grant access to these supplementary groups for mail processes. Typically
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# these are used to set up access to shared mailboxes. Note that it may be
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# dangerous to set these if users can create symlinks (e.g. if "mail" group is
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# set here, ln -s /var/mail ~/mail/var could allow a user to delete others'
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# mailboxes, or ln -s /secret/shared/box ~/mail/mybox would allow reading it).
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen#mail_access_groups =
4ee00532a265bdfb38539d811fcd12d51210ac35Timo Sirainen# Allow full filesystem access to clients. There's no access checks other than
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# what the operating system does for the active UID/GID. It works with both
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# maildir and mboxes, allowing you to prefix mailboxes names with eg. /path/
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen#mail_full_filesystem_access = no
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen## Mail processes
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# Don't use mmap() at all. This is required if you store indexes to shared
46b823ac3bce2c0f9f0fc73911e48d3a77b04fbeTimo Sirainen# filesystems (NFS or clustered filesystem).
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen#mmap_disable = no
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# Rely on O_EXCL to work when creating dotlock files. NFS supports O_EXCL
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# since version 3, so this should be safe to use nowadays by default.
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen#dotlock_use_excl = yes
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# Don't use fsync() or fdatasync() calls. This makes the performance better
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# at the cost of potential data loss if the server (or the file server)
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen#fsync_disable = no
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# Mail storage exists in NFS. Set this to yes to make Dovecot flush NFS caches
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# whenever needed. If you're using only a single mail server this isn't needed.
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen#mail_nfs_storage = no
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# Mail index files also exist in NFS. Setting this to yes requires
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# mmap_disable=yes and fsync_disable=no.
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen#mail_nfs_index = no
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# Locking method for index files. Alternatives are fcntl, flock and dotlock.
e869616aca1c2469c436e1e99dad93f7e4b2ae8aTimo Sirainen# Dotlocking uses some tricks which may create more disk I/O than other locking
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# methods. NFS users: flock doesn't work, remember to change mmap_disable.
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen#lock_method = fcntl
af5fc8ca268d69dd3ebbe0416ec6270f94121e39Timo Sirainen# Valid UID range for users, defaults to 500 and above. This is mostly
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# to make sure that users can't log in as daemons or other system users.
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# Note that denying root logins is hardcoded to dovecot binary and can't
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# be done even if first_valid_uid is set to 0.
9d0be57bcc352f776a327d7e2a6c6232137f4a04Timo Sirainen#first_valid_uid = 500
9d0be57bcc352f776a327d7e2a6c6232137f4a04Timo Sirainen#last_valid_uid = 0
9d0be57bcc352f776a327d7e2a6c6232137f4a04Timo Sirainen# Valid GID range for users, defaults to non-root/wheel. Users having
9d0be57bcc352f776a327d7e2a6c6232137f4a04Timo Sirainen# non-valid GID as primary group ID aren't allowed to log in. If user
9d0be57bcc352f776a327d7e2a6c6232137f4a04Timo Sirainen# belongs to supplementary groups with non-valid GIDs, those groups are
9d0be57bcc352f776a327d7e2a6c6232137f4a04Timo Sirainen#first_valid_gid = 1
9d0be57bcc352f776a327d7e2a6c6232137f4a04Timo Sirainen#last_valid_gid = 0
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# Maximum allowed length for mail keyword name. It's only forced when trying
0482d891a6669537e10a1abc9866b45f2fc55fccTimo Sirainen# to create new keywords.
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen#mail_max_keyword_length = 50
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# ':' separated list of directories under which chrooting is allowed for mail
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# processes (ie. /var/mail will allow chrooting to /var/mail/foo/bar too).
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# This setting doesn't affect login_chroot, mail_chroot or auth chroot
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# settings. If this setting is empty, "/./" in home dirs are ignored.
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# WARNING: Never add directories here which local users can modify, that
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# may lead to root exploit. Usually this should be done only if you don't
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# allow shell access for users. <doc/wiki/Chrooting.txt>
ad9afb64630511d5e25bc5bc11c5304986156928Timo Sirainen#valid_chroot_dirs =
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# Default chroot directory for mail processes. This can be overridden for
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# specific users in user database by giving /./ in user's home directory
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# (eg. /home/./user chroots into /home). Note that usually there is no real
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# need to do chrooting, Dovecot doesn't allow users to access files outside
9d0be57bcc352f776a327d7e2a6c6232137f4a04Timo Sirainen# their mail directory anyway. If your home directories are prefixed with
aab5704d21173f9f825c016812c8099d16ea5b9fTimo Sirainen# the chroot directory, append "/." to mail_chroot. <doc/wiki/Chrooting.txt>
9d0be57bcc352f776a327d7e2a6c6232137f4a04Timo Sirainen#mail_chroot =
9d0be57bcc352f776a327d7e2a6c6232137f4a04Timo Sirainen# UNIX socket path to master authentication server to find users.
9d0be57bcc352f776a327d7e2a6c6232137f4a04Timo Sirainen# This is used by imap (for shared users) and lda.
9d0be57bcc352f776a327d7e2a6c6232137f4a04Timo Sirainen#auth_socket_path = /var/run/dovecot/auth-userdb
aab5704d21173f9f825c016812c8099d16ea5b9fTimo Sirainen# Directory where to look up mail plugins.
9d0be57bcc352f776a327d7e2a6c6232137f4a04Timo Sirainen#mail_plugin_dir = /usr/lib/dovecot
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen## Mailbox handling optimizations
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# The minimum number of mails in a mailbox before updates are done to cache
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# file. This allows optimizing Dovecot's behavior to do less disk writes at
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# the cost of more disk reads.
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen#mail_cache_min_mail_count = 0
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# When IDLE command is running, mailbox is checked once in a while to see if
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# there are any new mails or other changes. This setting defines the minimum
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# time to wait between those checks. Dovecot can also use dnotify, inotify and
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# kqueue to find out immediately when changes occur.
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen#mailbox_idle_check_interval = 30 secs
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# Save mails with CR+LF instead of plain LF. This makes sending those mails
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# take less CPU, especially with sendfile() syscall with Linux and FreeBSD.
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# But it also creates a bit more disk I/O which may just make it slower.
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# Also note that if other software reads the mboxes/maildirs, they may handle
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# the extra CRs wrong and cause problems.
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen#mail_save_crlf = no
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen## Maildir-specific settings
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# By default LIST command returns all entries in maildir beginning with a dot.
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# Enabling this option makes Dovecot return only entries which are directories.
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# This is done by stat()ing each entry, so it causes more disk I/O.
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# (For systems setting struct dirent->d_type, this check is free and it's
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# done always regardless of this setting)
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen#maildir_stat_dirs = no
efe78d3ba24fc866af1c79b9223dc0809ba26cadStephan Bosch# When copying a message, do it with hard links whenever possible. This makes
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# the performance much better, and it's unlikely to have any side effects.
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen#maildir_copy_with_hardlinks = yes
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# When copying a message, try to preserve the base filename. Only if the
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# destination mailbox already contains the same name (ie. the mail is being
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# copied there twice), a new name is given. The destination filename check is
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# done only by looking at dovecot-uidlist file, so if something outside
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# Dovecot does similar filename preserving copies, you may run into problems.
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# NOTE: This setting requires maildir_copy_with_hardlinks = yes to work.
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen#maildir_copy_preserve_filename = no
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# Assume Dovecot is the only MUA accessing Maildir: Scan cur/ directory only
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# when its mtime changes unexpectedly or when we can't find the mail otherwise.
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen#maildir_very_dirty_syncs = no
075081e25ef07989be10f7c9cf85f833f90be46fTimo Sirainen## mbox-specific settings
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# Which locking methods to use for locking mbox. There are four available:
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# dotlock: Create <mailbox>.lock file. This is the oldest and most NFS-safe
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# solution. If you want to use /var/mail/ like directory, the users
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# will need write access to that directory.
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# dotlock_try: Same as dotlock, but if it fails because of permissions or
3858a7a5da361c35f1e6e50c8e3214dc0cf379d6Phil Carmody# because there isn't enough disk space, just skip it.
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# fcntl : Use this if possible. Works with NFS too if lockd is used.
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# flock : May not exist in all systems. Doesn't work with NFS.
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# lockf : May not exist in all systems. Doesn't work with NFS.
075081e25ef07989be10f7c9cf85f833f90be46fTimo Sirainen# You can use multiple locking methods; if you do the order they're declared
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# in is important to avoid deadlocks if other MTAs/MUAs are using multiple
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# locking methods as well. Some operating systems don't allow using some of
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# them simultaneously.
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen#mbox_read_locks = fcntl
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen#mbox_write_locks = dotlock fcntl
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# Maximum time to wait for lock (all of them) before aborting.
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen#mbox_lock_timeout = 5 mins
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# If dotlock exists but the mailbox isn't modified in any way, override the
3858a7a5da361c35f1e6e50c8e3214dc0cf379d6Phil Carmody# lock file after this much time.
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen#mbox_dotlock_change_timeout = 2 mins
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# When mbox changes unexpectedly we have to fully read it to find out what
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# changed. If the mbox is large this can take a long time. Since the change
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# is usually just a newly appended mail, it'd be faster to simply read the
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# new mails. If this setting is enabled, Dovecot does this but still safely
075081e25ef07989be10f7c9cf85f833f90be46fTimo Sirainen# fallbacks to re-reading the whole mbox file whenever something in mbox isn't
24d6fd2b8e2c327ae2a20a0c4be8af2ef7b3b468Timo Sirainen# how it's expected to be. The only real downside to this setting is that if
24d6fd2b8e2c327ae2a20a0c4be8af2ef7b3b468Timo Sirainen# some other MUA changes message flags, Dovecot doesn't notice it immediately.
24d6fd2b8e2c327ae2a20a0c4be8af2ef7b3b468Timo Sirainen# Note that a full sync is done with SELECT, EXAMINE, EXPUNGE and CHECK
24d6fd2b8e2c327ae2a20a0c4be8af2ef7b3b468Timo Sirainen#mbox_dirty_syncs = yes
24d6fd2b8e2c327ae2a20a0c4be8af2ef7b3b468Timo Sirainen# Like mbox_dirty_syncs, but don't do full syncs even with SELECT, EXAMINE,
24d6fd2b8e2c327ae2a20a0c4be8af2ef7b3b468Timo Sirainen# EXPUNGE or CHECK commands. If this is set, mbox_dirty_syncs is ignored.
24d6fd2b8e2c327ae2a20a0c4be8af2ef7b3b468Timo Sirainen#mbox_very_dirty_syncs = no
24d6fd2b8e2c327ae2a20a0c4be8af2ef7b3b468Timo Sirainen# Delay writing mbox headers until doing a full write sync (EXPUNGE and CHECK
24d6fd2b8e2c327ae2a20a0c4be8af2ef7b3b468Timo Sirainen# commands and when closing the mailbox). This is especially useful for POP3
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# where clients often delete all mails. The downside is that our changes
24d6fd2b8e2c327ae2a20a0c4be8af2ef7b3b468Timo Sirainen# aren't immediately visible to other MUAs.
24d6fd2b8e2c327ae2a20a0c4be8af2ef7b3b468Timo Sirainen#mbox_lazy_writes = yes
075081e25ef07989be10f7c9cf85f833f90be46fTimo Sirainen# If mbox size is smaller than this (e.g. 100k), don't write index files.
075081e25ef07989be10f7c9cf85f833f90be46fTimo Sirainen# If an index file already exists it's still read, just not updated.
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen#mbox_min_index_size = 0
24d6fd2b8e2c327ae2a20a0c4be8af2ef7b3b468Timo Sirainen## mdbox-specific settings
24d6fd2b8e2c327ae2a20a0c4be8af2ef7b3b468Timo Sirainen# Maximum dbox file size until it's rotated.
24d6fd2b8e2c327ae2a20a0c4be8af2ef7b3b468Timo Sirainen#mdbox_rotate_size = 2M
24d6fd2b8e2c327ae2a20a0c4be8af2ef7b3b468Timo Sirainen# Minimum dbox file size before it's rotated (overrides mdbox_rotate_days)
24d6fd2b8e2c327ae2a20a0c4be8af2ef7b3b468Timo Sirainen#mdbox_rotate_min_size = 16k
24d6fd2b8e2c327ae2a20a0c4be8af2ef7b3b468Timo Sirainen# Maximum dbox file age until it's rotated. Typically in days. Day begins
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# from midnight, so 1d = today, 2d = yesterday, etc. 0 = check disabled.
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen#mdbox_rotate_interval = 1d
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# Don't purge a dbox file until this many % of it contains expunged messages.
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen# 0 purges always, 100 purges never.
8aeae03f9f447c8a792b215c9fb954468053c556Timo Sirainen#mdbox_purge_min_percentage = 0