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
1.0 KiB
Plaintext
27 lines
1.0 KiB
Plaintext
# The OAuth2 driver is a so-called "Success/Failure Database".
|
|
# These databases simply verify if the given password is correct
|
|
# for the user. Dovecot doesn't get the correct password from the
|
|
# database, it only gets a success or a failure reply. This means
|
|
# that these databases can't be used with non-cleartext
|
|
# authentication mechanisms.
|
|
#
|
|
# This implies it cannot be configured for the non-plaintext SASL
|
|
# mechanisms listed here: https://doc.dovecot.org/2.4.3/developers/design/auth_process.html#password-databases
|
|
#
|
|
# TODO check if still valid
|
|
# However that is not the case, these mechanisms are still valid to prevent trying other incompatible mechanisms (like `plain`).
|
|
#
|
|
# REF https://doc.dovecot.org/2.4.3/core/config/auth/passdb.html#success-failure-database
|
|
# https://doc.dovecot.org/2.4.3/core/config/auth/databases/oauth2.html#open-authentication-v2-0-database-oauth2
|
|
|
|
auth_mechanisms {
|
|
oauthbearer = yes
|
|
xoauth2 = yes
|
|
}
|
|
|
|
oauth2 {
|
|
introspection_url =
|
|
introspection_mode = auth
|
|
username_attribute = email
|
|
}
|