mirror of
https://github.com/docker-mailserver/docker-mailserver
synced 2026-11-21 13:44:26 +01:00
* breaking(dovecot): ship a self-reliant Dovecot configuration DMS imported the config files of Debian's Dovecot package at build time and patched them with `sed` at startup. For the Dovecot Community Edition (CE) it even downloaded Debian's packages only to extract their config. The result depended on whatever the packages shipped, and every feature toggle was an `!include` line that a script had to comment or uncomment. Provide the complete configuration in the repository instead: - `target/dovecot/dovecot.conf` replaces the `10-*`, `15-*`, `20-*` and `90-*` files as well as the `*.inc` files. Everything that is not set there uses Dovecot's built-in defaults. - `target/dovecot/features/` holds the optional parts (passwd-file, LDAP and OAuth2 authentication, quotas, Rspamd learning). Startup copies the ones that are enabled into the empty `/etc/dovecot/conf.d/`, which `dovecot.conf` includes before `local.conf` (`dovecot.cf`). - The scripts only substitute ENV-derived values now; the include toggling and the second `sed` per feature are gone. - Drop the Debian config import and the CE-only download from the build. Breaking: files that users replaced, bind-mounted or patched in `/etc/dovecot/conf.d/` no longer exist (see the changelog for the mapping). Debian's deprecated ManageSieve listener on port 2000 and its `fts_autoindex*` defaults are gone as well. Add tests for the removed port 2000 and for a valid `doveconf -n` with the protocols enabled according to ENV, and adjust the existing tests and fixtures to the new file layout. Rewrite the Dovecot override docs. Closes #4841 * fix(dovecot): load enabled features before user supplied config Features that DMS enables were copied to `conf.d/`, so Dovecot read them in file name order together with user drop-ins. A user file such as `90-custom.conf` was read before `quota.conf` or `auth-ldap.conf`, and the feature silently overrode the user's settings. - copy enabled features to `/etc/dovecot/features.d/` instead, which `dovecot.conf` includes before `conf.d/*.conf` - include the master user passdb before `conf.d/*.conf` as well, so a drop-in can override `auth_master_user_separator` - create `features.d/auth-ldap.conf` with mode 640 (group `dovecot`), as it contains the LDAP bind password - link the changelog entries to the PR, document the always-active master passdb, and adjust docs and tests to the new layout - test that a `conf.d/` file overrides the quota feature, and that `auth-ldap.conf` is not world-readable
27 lines
931 B
Plaintext
27 lines
931 B
Plaintext
# Authentication for passwd-file users (`ACCOUNT_PROVISIONER=FILE`).
|
|
# Copied to `features.d/` by `_setup_dovecot_local_user`.
|
|
#
|
|
# ref: https://doc.dovecot.org/main/core/config/auth/databases/passwd_file.html
|
|
|
|
passdb passdb-default {
|
|
driver = passwd-file
|
|
passwd_file_path = /etc/dovecot/userdb
|
|
auth_username_format = %{user | lower}
|
|
mechanisms_filter = plain login
|
|
default_password_scheme = SHA512-CRYPT
|
|
}
|
|
|
|
userdb userdb-default {
|
|
driver = passwd-file
|
|
passwd_file_path = /etc/dovecot/userdb
|
|
auth_username_format = %{user | lower}
|
|
|
|
# Default field values to use when they're not set for user accounts sourced via `/etc/dovecot/userdb`.
|
|
# NOTE: That file is created from `postfix-accounts.cf` + `postfix-virtual.cf`
|
|
fields {
|
|
uid:default = docker
|
|
gid:default = docker
|
|
home:default = /var/mail/%{user | domain}/%{user | username}/home
|
|
}
|
|
}
|