From 2643afa9785f1b255aaafa36dd70440c161fa0be Mon Sep 17 00:00:00 2001 From: Alex Dehnert Date: Mon, 6 May 2019 01:34:43 -0400 Subject: [PATCH] Dovecot updates for Bionic (18.04) --- README | 2 - conf.d/10-logging.conf | 17 ++- conf.d/10-mail.conf | 46 ++++++- ...0-replication.conf => 10-replication.conf} | 0 conf.d/10-ssl.conf | 20 +-- conf.d/20-imap.conf | 130 +++++++++++------- conf.d/90-quota.conf | 3 + conf.d/90-sieve.conf | 76 ++++++++++ dovecot-sql.conf.ext | 3 + 9 files changed, 228 insertions(+), 69 deletions(-) delete mode 100644 README rename conf.d/{30-replication.conf => 10-replication.conf} (100%) diff --git a/README b/README deleted file mode 100644 index 9dcc22a..0000000 --- a/README +++ /dev/null @@ -1,2 +0,0 @@ -Configuration files go to this directory. See example configuration files in -/usr/share/doc/dovecot-core/example-config/ diff --git a/conf.d/10-logging.conf b/conf.d/10-logging.conf index cf49e86..b7d7fda 100644 --- a/conf.d/10-logging.conf +++ b/conf.d/10-logging.conf @@ -75,11 +75,16 @@ log_timestamp = "%Y-%m-%d %H:%M:%S " # possible variables you can use. #mail_log_prefix = "%s(%u): " -# Format to use for logging mail deliveries. You can use variables: +# Format to use for logging mail deliveries: # %$ - Delivery status message (e.g. "saved to INBOX") -# %m - Message-ID -# %s - Subject -# %f - From address -# %p - Physical size -# %w - Virtual size +# %m / %{msgid} - Message-ID +# %s / %{subject} - Subject +# %f / %{from} - From address +# %p / %{size} - Physical size +# %w / %{vsize} - Virtual size +# %e / %{from_envelope} - MAIL FROM envelope +# %{to_envelope} - RCPT TO envelope +# %{delivery_time} - How many milliseconds it took to deliver the mail +# %{session_time} - How long LMTP session took, not including delivery_time +# %{storage_id} - Backend-specific ID for mail, e.g. Maildir filename #deliver_log_format = msgid=%m: %$ diff --git a/conf.d/10-mail.conf b/conf.d/10-mail.conf index 2aaf3df..71cd375 100644 --- a/conf.d/10-mail.conf +++ b/conf.d/10-mail.conf @@ -76,6 +76,8 @@ namespace inbox { # Namespace handles its own subscriptions. If set to "no", the parent # namespace handles them (empty prefix should always have this as "yes") #subscriptions = yes + + # See 15-mailboxes.conf for definitions of special mailboxes. } # Example shared namespace configuration @@ -128,11 +130,23 @@ namespace inbox { # or ~user/. #mail_full_filesystem_access = no -# Dictionary for key=value mailbox attributes. Currently used by URLAUTH, but -# soon intended to be used by METADATA as well. +# Dictionary for key=value mailbox attributes. This is used for example by +# URLAUTH and METADATA extensions. #mail_attribute_dict = mail_attribute_dict = file:%h/.maildir/dovecot-attributes +# A comment or note that is associated with the server. This value is +# accessible for authenticated users through the IMAP METADATA server +# entry "/shared/comment". +#mail_server_comment = "" + +# Indicates a method for contacting the server administrator. According to +# RFC 5464, this value MUST be a URI (e.g., a mailto: or tel: URL), but that +# is currently not enforced. Use for example mailto:admin@example.com. This +# value is accessible for authenticated users through the IMAP METADATA server +# entry "/shared/admin". +#mail_server_admin = + ## ## Mail processes ## @@ -220,6 +234,15 @@ mail_attribute_dict = file:%h/.maildir/dovecot-attributes # also required for IMAP NOTIFY extension to be enabled. #mailbox_list_index = no +# Trust mailbox list index to be up-to-date. This reduces disk I/O at the cost +# of potentially returning out-of-date results after e.g. server crashes. +# The results will be automatically fixed once the folders are opened. +#mailbox_list_index_very_dirty_syncs = yes + +# Should INBOX be kept up-to-date in the mailbox list index? By default it's +# not, because most of the mailbox accesses will open INBOX anyway. +#mailbox_list_index_include_inbox = no + # The minimum number of mails in a mailbox before updates are done to cache # file. This allows optimizing Dovecot's behavior to do less disk writes at # the cost of more disk reads. @@ -227,7 +250,7 @@ mail_attribute_dict = file:%h/.maildir/dovecot-attributes # When IDLE command is running, mailbox is checked once in a while to see if # there are any new mails or other changes. This setting defines the minimum -# time to wait between those checks. Dovecot can also use dnotify, inotify and +# time to wait between those checks. Dovecot can also use inotify and # kqueue to find out immediately when changes occur. #mailbox_idle_check_interval = 30 secs @@ -246,6 +269,19 @@ mail_attribute_dict = file:%h/.maildir/dovecot-attributes # These should exist only after Dovecot dies in the middle of saving mails. #mail_temp_scan_interval = 1w +# How many slow mail accesses sorting can perform before it returns failure. +# With IMAP the reply is: NO [LIMIT] Requested sort would have taken too long. +# The untagged SORT reply is still returned, but it's likely not correct. +#mail_sort_max_read_count = 0 + +protocol !indexer-worker { + # If folder vsize calculation requires opening more than this many mails from + # disk (i.e. mail sizes aren't in cache already), return failure and finish + # the calculation via indexer process. Disabled by default. This setting must + # be 0 for indexer-worker processes. + #mail_vsize_bg_after_count = 0 +} + ## ## Maildir-specific settings ## @@ -271,6 +307,10 @@ mail_attribute_dict = file:%h/.maildir/dovecot-attributes # broken size. The performance hit for enabling this is very small. #maildir_broken_filename_sizes = no +# Always move mails from new/ directory to cur/, even when the \Recent flags +# aren't being reset. +#maildir_empty_new = no + ## ## mbox-specific settings ## diff --git a/conf.d/30-replication.conf b/conf.d/10-replication.conf similarity index 100% rename from conf.d/30-replication.conf rename to conf.d/10-replication.conf diff --git a/conf.d/10-ssl.conf b/conf.d/10-ssl.conf index ee72242..24d7dea 100644 --- a/conf.d/10-ssl.conf +++ b/conf.d/10-ssl.conf @@ -3,14 +3,14 @@ ## # SSL/TLS support: yes, no, required. -#ssl = yes +ssl = yes # 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 = " address is used as a + # sender, depending on the action involved. This setting is important when + # there is no message envelope to extract addresses from, such as when the + # script is executed in IMAP. + #sieve_user_email = + + # The path to the file where the user log is written. If not configured, a + # default location is used. If the main user's personal Sieve (as configured + # with sieve=) is a file, the logfile is set to .log by default. If + # it is not a file, the default user log file is ~/.dovecot.sieve.log. + #sieve_user_log = + + # Specifies what envelope sender address is used for redirected messages. + # The following values are supported for this setting: + # + # "sender" - The sender address is used (default). + # "recipient" - The final recipient address is used. + # "orig_recipient" - The original recipient is used. + # "user_email" - The user's primary address is used. This is + # configured with the "sieve_user_email" setting. If + # that setting is unconfigured, "user_mail" is equal to + # "recipient". + # "postmaster" - The postmaster_address configured for the LDA. + # "" - Redirected messages are always sent from user@domain. + # The angle brackets are mandatory. The null "<>" address + # is also supported. + # + # This setting is ignored when the envelope sender is "<>". In that case the + # sender of the redirected message is also always "<>". + #sieve_redirect_envelope_from = sender + + ## TRACE DEBUGGING + # Trace debugging provides detailed insight in the operations performed by + # the Sieve script. These settings apply to both the LDA Sieve plugin and the + # IMAPSIEVE plugin. + # + # WARNING: On a busy server, this functionality can quickly fill up the trace + # directory with a lot of trace files. Enable this only temporarily and as + # selective as possible. + + # The directory where trace files are written. Trace debugging is disabled if + # this setting is not configured or if the directory does not exist. If the + # path is relative or it starts with "~/" it is interpreted relative to the + # current user's home directory. + #sieve_trace_dir = + + # The verbosity level of the trace messages. Trace debugging is disabled if + # this setting is not configured. Possible values are: + # + # "actions" - Only print executed action commands, like keep, + # fileinto, reject and redirect. + # "commands" - Print any executed command, excluding test commands. + # "tests" - Print all executed commands and performed tests. + # "matching" - Print all executed commands, performed tests and the + # values matched in those tests. + #sieve_trace_level = + + # Enables highly verbose debugging messages that are usually only useful for + # developers. + #sieve_trace_debug = no + + # Enables showing byte code addresses in the trace output, rather than only + # the source line numbers. + #sieve_trace_addresses = no } diff --git a/dovecot-sql.conf.ext b/dovecot-sql.conf.ext index a434244..0f2baec 100644 --- a/dovecot-sql.conf.ext +++ b/dovecot-sql.conf.ext @@ -48,6 +48,9 @@ # # But also adds some new settings: # client_flags - See MySQL manual +# connect_timeout - Connect timeout in seconds (default: 5) +# read_timeout - Read timeout in seconds (default: 30) +# write_timeout - Write timeout in seconds (default: 30) # ssl_ca, ssl_ca_path - Set either one or both to enable SSL # ssl_cert, ssl_key - For sending client-side certificates to server # ssl_cipher - Set minimum allowed cipher security (default: HIGH) -- 2.34.1