Upgrading Dovecot CE from 2.4 to 2.4.x
Dovecot CE
v2.4.0 to v2.4.1
- Added
MALLOC_MMAP_THRESHOLD_=131072toimport_environmentwhen building with glibc. Note thatdovecot_config_versionvalue does not affect change - it's always added.
v2.4.2 to v2.4.3
- Using Settings Variables with LDAP settings now requires using
| safefilter to allow passing through LDAP characters that are otherwise escaped. Thesafefilter must always be the last filter in the pipeline. Note that this should be used only for variables coming from trusted sources, not for e.g. username variable.
Changed Setting Defaults
These changes don't take effect until dovecot_config_version is changed from 2.4.0 to 2.4.1.
| Setting | Old Default Value | New Default Value |
|---|---|---|
mail_cache_fields | flags | flags hdr.date hdr.subject hdr.from hdr.sender hdr.reply-to hdr.to hdr.cc hdr.bcc hdr.in-reply-to hdr.message-id date.received size.virtual imap.bodystructure mime.parts hdr.references hdr.importance hdr.x-priority hdr.x-open-xchange-share-url pop3.uidl pop3.order |
service/auth/unix_listener/auth-userdb/group | (empty = root) | $SET:default_internal_group |
service/lmtp/restart_request_count | unlimited | 1 |
lmtp_user_concurrency_limit | unlimited | 10 |
v2.4.1 to v2.4.2
Changed Setting Defaults
These changes don't take effect until dovecot_config_version is changed to 2.4.2.
| Setting | Old Default Value | New Default Value |
|---|---|---|
@metric_defaults/proxy/metric | Adds proxy_session_established | |
service/anvil/unix_listener/anvil/mode | 0600 | 0660 |
service/anvil/unix_listener/anvil/group | (empty = root) | $SET:default_internal_group |
mailbox_directory_name_legacy | yes | no |
mail_attachment_detection_options | add-flags content-type=!application/signature |
v2.4.2 to v2.4.3
Changed Setting Defaults
These changes don't take effect until dovecot_config_version is changed to 2.4.3.
| Setting | Old Default Value | New Default Value |
|---|---|---|
fts_message_max_size | 0 is not allowed anymore to mean unlimited use unlimited instead | |
last_valid_gid | 0 is not allowed anymore to mean unlimited use unlimited instead | |
last_valid_uid | 0 is not allowed anymore to mean unlimited use unlimited instead | |
lazy_expunge_only_last_instance | no | yes |
mail_access_groups | default_internal_group | |
mail_cache_max_header_name_length | 0 is not allowed anymore to mean unlimited use unlimited instead | |
mail_cache_max_headers_count | 0 is not allowed anymore to mean unlimited use unlimited instead | |
mail_sort_max_read_count | 0 is not allowed anymore to mean unlimited use unlimited instead | |
mail_vsize_bg_after_count | 0 is not allowed anymore to mean unlimited use unlimited instead | |
passdb_default_password_scheme | PLAIN | CRYPT |
sieve_quota_script_count | 0 is not allowed anymore to mean unlimited use unlimited instead | |
sieve_quota_storage_size | 0 is not allowed anymore to mean unlimited use unlimited instead | |
submission_max_recipients | 0 is not allowed anymore to mean unlimited use unlimited instead | |
maildir/mail_attachment_detection_options | add-flags content-type=!application/signature | |
passdb_passwd_file/passdb_default_password_scheme | PLAIN | CRYPT |
passdb_sql/passdb_default_password_scheme | PLAIN | CRYPT |
service/doveadm/service_extra_groups | default_internal_group | |
service/imap/service_extra_groups | default_internal_group | |
service/imap-urlauth-worker/service_extra_groups | default_internal_group | |
service/indexer-worker/service_extra_groups | default_internal_group | |
service/lmtp/service_extra_groups | default_internal_group | |
service/pop3/service_extra_groups | default_internal_group | |
service/submission/service_extra_groups | default_internal_group | |
service/managesieve/service_extra_groups | default_internal_group | |
@mailbox_defaults/english/namespace/inbox/mailbox/Drafts/mailbox_auto | no | subscribe |
@mailbox_defaults/english/namespace/inbox/mailbox/Junk/mailbox_auto | no | subscribe |
@mailbox_defaults/english/namespace/inbox/mailbox/Sent/mailbox_auto | no | subscribe |
@mailbox_defaults/english/namespace/inbox/mailbox/Trash/mailbox_auto | no | subscribe |
service/anvil/unix_listener/anvil-auth-penalty/mode | 0600 | 0660 |
service/anvil/unix_listener/anvil-auth-penalty/group | default_internal_group | |
service/imap/unix_listener/imap-master/user | default_internal_user |
Removed Features
| Feature | Notes |
|---|---|
acl_global_path setting | See ACL Settings Migration. |
v2.4.3 to v2.4.4
Forcibly Changed Setting Defaults
Unlike other default setting changes, this change takes effect regardless of dovecot_config_version. This is because indexer-worker now drops root privileges, and the old default could make the service non-working.
| Setting | Old Default Value | New Default Value |
|---|---|---|
service/indexer-worker/service_restart_request_count | service_restart_request_count | 1 |
Changed Setting Defaults
These changes don't take effect until dovecot_config_version is changed to 2.4.4.
| Setting | Old Default Value | New Default Value |
|---|---|---|
push_notification_ox/http_client_request_max_attempts | 1 | 2 |
push_notification_ox/http_client_request_timeout | 1min | 2s |
service/lmtp/service_extra_groups | default_internal_group |
v2.4.4 to v2.4.5
- String List and Boolean List setting keys are now expanded with
Settings variablesthe same way their values already were. Keys defined in the configuration are always expanded. For settings overrides only default overrides expand the keys; keys coming from-ocommand line parameters and from userdb are kept literal. - The per-field time and date Settings Variables providers are now deprecated:
time:hour,time:min,time:minute,time:sec,time:second,time:usecanddate:year,date:month,date:day. Use the newtime:unixprovider together with thedatefilter instead. Note that the old providers always used the local timezone, whereas thedatefilter defaults to UTC, so to keep the old behavior passtz='local': use%{time:unix | date('%H', 'local')}in place of%{time:hour}. The new approach additionally supports UTC, timestamps from any other variable, and ISO 8601 / RFC 3339 output via theiso8601filter. The deprecated providers keep working for now.
Changed Setting Defaults
These changes don't take effect until dovecot_config_version is changed to 2.4.5.
| Setting | Old Default Value | New Default Value |
|---|---|---|
sieve_max_cpu_time | 0 (unlimited) | 30s |
imap_compress_on_proxy | no | yes |
Changed Storage Formats
These changes don't take effect until dovecot_storage_version is changed to 2.4.5.
The dovecot.index.thread index, used by the IMAP THREAD command, has a new v2 format. The Message-ID hashes stored in it are now calculated with a keyed hash using a random per-file key instead of CRC32. This prevents users from crafting Message-IDs whose hashes deliberately collide, which would otherwise slow down threading.
Existing v1 index files are deleted and rebuilt in the v2 format when the mailbox is next opened for threading, so the first THREAD command for a large mailbox can be slower than usual. Dovecot versions older than v2.4.5 don't understand the v2 format and rebuild the index in the v1 format again, so this setting should be increased only once a rollback to an older version is no longer possible.
New Features
| Feature | Notes |
|---|---|
| `escape` filter | Explicitly apply the configured escape function within a variable expansion pipeline. Useful for partial escaping when combined with concat and safe. |
| `time:unix` provider | Returns the current time as a <seconds>.<nanoseconds> UNIX timestamp. Recommended replacement for the deprecated per-field time:/date: providers. |
| `epoch` | Convert and format UNIX timestamps (unit scaling, calendar formatting via strftime, and ISO 8601 / RFC 3339 output). |
Removed Features
| Feature | Notes |
|---|---|
auth: SIGHUP, SIGUSR2 | Use doveadm auth cache flush to flush the cache and doveadm auth cache status to inspect cache statistics instead. |
Sieve
Cumulative CPU usage tracking for sieve_max_cpu_time is no longer kept inside each compiled Sieve binary (.svbin). It is now stored in a single file sieve-rusage at the root of the user's INBOX namespace.
v2.4.5 to v2.4.6
- A passdb lookup returning an empty password now fails authentication instead of allowing login with an empty password. Passdb entries intended to have no fixed password should return the
nopasswordextra field (e.g.user:::::::nopassword=yesin a passwd-file) instead of an empty password field; any non-empty client password is then accepted. - An empty client-supplied password is now always rejected before the passdb lookup, for all passdb drivers. Previously only LDAP auth binds rejected it.
nopassworddoes not allow an empty client password either; only mechanisms that authenticate without a password (EXTERNAL via client certificate, OAuth2) are unaffected. - The EXTERNAL SASL mechanism now treats the client certificate as the authentication and no longer verifies any passdb password. Existing client-certificate setups (e.g. passwd-file entries with an empty password field) keep working. Passdbs that verify the password themselves no longer reject EXTERNAL logins either: e.g. an LDAP auth bind passdb attempts no bind - the lookup succeeds without verifying anything and only provides the extra fields, since the certificate already authenticated the user. For EXTERNAL logins
passdb { skip = authenticated }passdbs are now skipped andskip = unauthenticatedpassdbs run; if all passdbs are skipped, the login fails.
Doveadm Logging Changes
doveadm-server no longer writes the Apache-style access log line for each Doveadm HTTP API request. The same information is now available from events: doveadm_command_finished for the command, the user and the exit code, and http_server_request_finished for the HTTP status and the transferred byte counts. Both are debug level events, so use Event Export to record them. Note that the format differs from the old log line.
doveadm_command_finished is emitted for command line and doveadm server protocol invocations as well, not just for the HTTP API.
Some Doveadm HTTP API log lines also changed level:
| Log line | Old Level | New Level |
|---|---|---|
Executing command, Executing command as '<user>' | info | debug |
Error writing output in command <cmd>: <error> | info | error |
read(<stream>) failed: <error> | info | error |
error writing output: <error> | info | error |
New file path and directory path setting types: a leading
~/in the value is expanded to the user's home directory, and directory paths also drop a trailing/. The mail location*_pathsettings and the rawlog directory settings use these types now. The following settings previously used a~/prefix literally; it is now expanded (or fails, if no user home is available):rawlog_dir(imap, pop3, submission and managesieve)http_client_rawlog_dirhttp_server_rawlog_dir
doveconfoutput no longer drops a trailing/frommail_pathand the other directory path settings; the value is shown as written in the configuration.
Removed Settings
| Setting | Notes |
|---|---|
doveadm_allowed_commands | The setting only matched the command name, while the commands it was typically used to allow already gave full access to any user's mails. Dovecot fails to start if this setting is present in the configuration. Give doveadm server access only to trusted clients. |
The Doveadm HTTP API no longer returns the 403 HTTP response code, which was used only for commands rejected by this setting.