📄 dovecot.conf
字号:
## Dovecot configuration file# If you're in a hurry, see http://wiki.dovecot.org/QuickConfiguration# '#' character and everything after it is treated as comments. Extra spaces# and tabs are ignored. If you want to use either of these explicitly, put the# value inside quotes, eg.: key = "# char and trailing whitespace "# Default values are shown for each setting, it's not required to uncomment# any of the lines.# Base directory where to store runtime data.#base_dir = /var/run/dovecot/# Protocols we want to be serving: imap imaps pop3 pop3s# If you only want to use dovecot-auth, you can set this to "none".protocols = imap imaps pop3 pop3s# IP or host address where to listen in for connections. It's not currently# possible to specify multiple addresses. "*" listens in all IPv4 interfaces.# "[::]" listens in all IPv6 interfaces, but may also listen in all IPv4# interfaces depending on the operating system.## If you want to specify ports for each service, you will need to configure# these settings inside the protocol imap/pop3 { ... } section, so you can# specify different ports for IMAP/POP3. For example:# protocol imap {# listen = *:10143# ssl_listen = *:10943# ..# }# protocol pop3 {# listen = *:10100# ..# }#listen = [::]# Disable LOGIN command and all other plaintext authentications unless# SSL/TLS is used (LOGINDISABLED capability). Note that if the remote IP# matches the local IP (ie. you're connecting from the same computer), the# connection is considered secure and plaintext authentication is allowed.#disable_plaintext_auth = no# Should all IMAP and POP3 processes be killed when Dovecot master process# shuts down. Setting this to "no" means that Dovecot can be upgraded without# forcing existing client connections to close (although that could also be# a problem if the upgrade is eg. because of a security fix). This however# means that after master process has died, the client processes can't write# to log files anymore.#shutdown_clients = yes#### Logging### Use this logfile instead of syslog(). /dev/stderr can be used if you want to# use stderr for logging (ONLY /dev/stderr - otherwise it is closed).#log_path = # For informational messages, use this logfile instead of the default#info_log_path = # Prefix for each line written to log file. % codes are in strftime(3)# format.#log_timestamp = "%b %d %H:%M:%S "# Syslog facility to use if you're logging to syslog. Usually if you don't# want to use "mail", you'll use local0..local7. Also other standard# facilities are supported.#syslog_facility = mail#### SSL settings### IP or host address where to listen in for SSL connections. Defaults# to above if not specified.#ssl_listen =# Disable SSL/TLS support.#ssl_disable = no# PEM encoded X.509 SSL/TLS certificate and private key. They're opened before# dropping root privileges, so keep the key file unreadable by anyone but# root. Included doc/mkcert.sh can be used to easily generate self-signed# certificate, just make sure to update the domains in dovecot-openssl.cnf#ssl_cert_file = /etc/pki/dovecot/certs/dovecot.pem#ssl_key_file = /etc/pki/dovecot/private/dovecot.pem# If key file is password protected, give the password here. Alternatively# give it when starting dovecot with -p parameter.#ssl_key_password =# File containing trusted SSL certificate authorities. Usually not needed.# The CAfile should contain the CA-certificate(s) followed by the matching # CRL(s). CRL checking is new in dovecot .rc1#ssl_ca_file = # Request client to send a certificate.#ssl_verify_client_cert = no# How often to regenerate the SSL parameters file. Generation is quite CPU# intensive operation. The value is in hours, 0 disables regeneration# entirely.#ssl_parameters_regenerate = 168# SSL ciphers to use#ssl_cipher_list = ALL:!LOW# Show protocol level SSL errors.#verbose_ssl = no#### Login processes### Directory where authentication process places authentication UNIX sockets# which login needs to be able to connect to. The sockets are created when# running as root, so you don't have to worry about permissions. Note that# everything in this directory is deleted when Dovecot is started.#login_dir = /var/run/dovecot/login# chroot login process to the login_dir. Only reason not to do this is if you# wish to run the whole Dovecot without roots.# http://wiki.dovecot.org/Rootless#login_chroot = yes# User to use for the login process. Create a completely new user for this,# and don't use it anywhere else. The user must also belong to a group where# only it has access, it's used to control access for authentication process.# Note that this user is NOT used to access mails.# http://wiki.dovecot.org/UserIds#login_user = dovecot# Set max. process size in megabytes. If you don't use# login_process_per_connection you might need to grow this.#login_process_size = 32# Should each login be processed in it's own process (yes), or should one# login process be allowed to process multiple connections (no)? Yes is more# secure, espcially with SSL/TLS enabled. No is faster since there's no need# to create processes all the time.#login_process_per_connection = yes# Number of login processes to keep for listening new connections.#login_processes_count = 3# Maximum number of login processes to create. The listening process count# usually stays at login_processes_count, but when multiple users start logging# in at the same time more extra processes are created. To prevent fork-bombing# we check only once in a second if new processes should be created - if all# of them are used at the time, we double their amount until the limit set by# this setting is reached.#login_max_processes_count = 128# Maximum number of connections allowed per each login process. This setting# is used only if login_process_per_connection=no. Once the limit is reached,# the process notifies master so that it can create a new login process.# You should make sure that the process has at least# 16 + login_max_connections * 2 available file descriptors.#login_max_connections = 256# Greeting message for clients.#login_greeting = Dovecot ready.# Space-separated list of elements we want to log. The elements which have# a non-empty variable value are joined together to form a comma-separated# string.#login_log_format_elements = user=<%u> method=%m rip=%r lip=%l %c# Login log format. %$ contains login_log_format_elements string, %s contains# the data we want to log.#login_log_format = %$: %s#### Mailbox locations and namespaces### Location for users' mailboxes. This is the same as the old default_mail_env# setting. The default is empty, which means that Dovecot tries to find the# mailboxes automatically. This won't work if the user doesn't have any mail# yet, so you should explicitly tell Dovecot the full location.## If you're using mbox, giving a path to the INBOX file (eg. /var/mail/%u)# isn't enough. You'll also need to tell Dovecot where the other mailboxes are# and where Dovecot can place its index files. This is called the "root mail# directory", and it must be the first path given in the mail_location setting.## There are a few special variables you can use, eg.:## %u - username# %n - user part in user@domain, same as %u if there's no domain# %d - domain part in user@domain, empty if there's no domain# %h - home directory## See doc/variables.txt for full list. Some examples:## mail_location = maildir:~/Maildir# mail_location = mbox:~/mail:INBOX=/var/mail/%u# mail_location = mbox:/var/mail/%d/%1n/%n:INDEX=/var/indexes/%d/%1n/%n## http://wiki.dovecot.org/MailLocation##mail_location = # If you need to set multiple mailbox locations or want to change default# namespace settings, you can do it by defining namespace sections:## You can have private, shared and public namespaces. The only difference# between them is how Dovecot announces them to client via NAMESPACE# extension. Shared namespaces are meant for user-owned mailboxes which are# shared to other users, while public namespaces are for more globally# accessible mailboxes.## REMEMBER: If you add any namespaces, the default namespace must be added# explicitly, ie. mail_location does nothing unless you have a namespace# without a location setting. Default namespace is simply done by having a# namespace with empty prefix.#namespace private { # Hierarchy separator to use. You should use the same separator for all # namespaces or some clients get confused. '/' is usually a good one. # The default however depends on the underlying mail storage format. #separator = # Prefix required to access this namespace. This needs to be different for # all namespaces. For example "Public/". #prefix = # Physical location of the mailbox. This is in same format as # mail_location, which is also the default for it. #location = # There can be only one INBOX, and this setting defines which namespace # has it. #inbox = yes # If namespace is hidden, it's not advertised to clients via NAMESPACE # extension or shown in LIST replies. This is mostly useful when converting # from another server with different namespaces which you want to depricate # but still keep working. For example you can create hidden namespaces with # prefixes "~/mail/", "~%u/mail/" and "mail/". #hidden = yes#}# Grant access to these extra groups for mail processes. Typical use would be# to give "mail" group write access to /var/mail to be able to create dotlocks.#mail_extra_groups =# Allow full filesystem access to clients. There's no access checks other than# what the operating system does for the active UID/GID. It works with both# maildir and mboxes, allowing you to prefix mailboxes names with eg. /path/# or ~user/.#mail_full_filesystem_access = no#### Mail processes### Enable mail process debugging. This can help you figure out why Dovecot# isn't finding your mails.#mail_debug = no# Log prefix for mail processes. See doc/variables.txt for list of possible# variables you can use.#mail_log_prefix = "%Us(%u): "# Use mmap() instead of read() to read mail files. read() seems to be a bit# faster with my Linux/x86 and it's better with NFS, so that's the default.# Note that OpenBSD 3.3 and older don't work right with mail_read_mmaped = yes.#mail_read_mmaped = no# Don't use mmap() at all. This is required if you store indexes to shared# filesystems (NFS or clustered filesystem).#mmap_disable = no# Don't write() to mmaped files. This is required for some operating systems# which use separate caches for them, such as OpenBSD.#mmap_no_write = no# Locking method for index files. Alternatives are fcntl, flock and dotlock.# Dotlocking uses some tricks which may create more disk I/O than other locking# methods. NOTE: If you use NFS, remember to change also mmap_disable setting!#lock_method = fcntl# Drop all privileges before exec()ing the mail process. This is mostly# meant for debugging, otherwise you don't get core dumps. It could be a small# security risk if you use single UID for multiple users, as the users could# ptrace() each others processes then.#mail_drop_priv_before_exec = no# Show more verbose process titles (in ps). Currently shows user name and# IP address. Useful for seeing who are actually using the IMAP processes# (eg. shared mailboxes or if same uid is used for multiple accounts).#verbose_proctitle = no# Valid UID range for users, defaults to 500 and above. This is mostly# to make sure that users can't log in as daemons or other system users.# Note that denying root logins is hardcoded to dovecot binary and can't# be done even if first_valid_uid is set to 0.#first_valid_uid = 500#last_valid_uid = 0# Valid GID range for users, defaults to non-root/wheel. Users having# non-valid GID as primary group ID aren't allowed to log in. If user# belongs to supplementary groups with non-valid GIDs, those groups are# not set.#first_valid_gid = 1#last_valid_gid = 0# Maximum number of running mail processes. When this limit is reached,# new users aren't allowed to log in.#max_mail_processes = 1024# Set max. process size in megabytes. Most of the memory goes to mmap()ing# files, so it shouldn't harm much even if this limit is set pretty high.#mail_process_size = 256# Maximum allowed length for mail keyword name. It's only forced when trying# to create new keywords.#mail_max_keyword_length = 50# Default umask to use for mail files and directories.#umask = 0077# ':' separated list of directories under which chrooting is allowed for mail# processes (ie. /var/mail will allow chrooting to /var/mail/foo/bar too).# This setting doesn't affect login_chroot or auth_chroot variables.# WARNING: Never add directories here which local users can modify, that# may lead to root exploit. Usually this should be done only if you don't# allow shell access for users. See doc/configuration.txt for more information.#valid_chroot_dirs = # Default chroot directory for mail processes. This can be overridden for# specific users in user database by giving /./ in user's home directory# (eg. /home/./user chroots into /home). Note that usually there is no real# need to do chrooting, Dovecot doesn't allow users to access files outside# their mail directory anyway.#mail_chroot = ##
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -