Files
Chris FunderburgandGeorg Lauterbach 98b6a5b86c fix: dovecot CE builds for 2.4 (#4834)
* fix(build): use Debian's Dovecot config layout with the CE packages

The Dovecot CE repo ships a minimal config layout that DMS does not
expect: no 15-lda.conf, 90-fts.conf or 20-pop3.conf, a 2.3-style
20-managesieve.conf, and a dovecot.conf without the commented
protocols/listen lines or the local.conf include. The startup scripts
then fail to enable LMTP, so Postfix cannot deliver to Dovecot, and a
custom dovecot.cf is ignored.

When DOVECOT_COMMUNITY_REPO=1, install the config files from Debian's
own packages of the same release, as Debian's postinst does. Also
tolerate the missing 90-fts-flatcurve.conf, which only Debian ships,
as the build otherwise fails.

* fix(build): install ssl-cert explicitly

Dovecot and Postfix default to the snakeoil cert from the ssl-cert
package. Debian's dovecot-core depends on ssl-cert, but the Dovecot CE
package does not, so with DOVECOT_COMMUNITY_REPO=1 the cert is missing
and Dovecot fails to start when no SSL_TYPE is set.

* fix(dovecot): disable attachment detection keywords explicitly

Dovecot 2.4.2 changed the default of mail_attachment_detection_options
to add-flags for maildir and dbox. This per-driver default is applied
even with dovecot_config_version = 2.4.0, so LMTP adds a
$HasNoAttachment keyword and maildir stores new mail in cur/ instead of
new/. Set it explicitly to keep the 2.4.0/2.4.1 behaviour. This is a
no-op with Debian's Dovecot 2.4.1.

* tests: make the letsencrypt doveconf check work with Dovecot 2.4.2+

Querying `doveconf ssl_server` prints nothing with Dovecot 2.4.5, and
querying the full setting names prints empty values with 2.4.1. Use
`doveconf -n -P`, which prints the same lines on both.

* docs: add changelog entries for the Dovecot CE build fixes

* docs: link the changelog entries to #4834

* fix(build): exclude the CE repo instead of matching deb.debian.org

Matching the deb.debian.org host made builds behind a different Debian
mirror (Artifactory, apt-cacher-ng, regional mirrors) fail to find the
Debian version of dovecot-core. There are only two sources, so exclude
repo.dovecot.org instead.

* docs: describe the attachment detection setting as a deliberate choice

Mail in cur/ without the S flag is still valid maildir and still
unread, so the explicit empty value is for parity with the Debian
build, not a bug fix. Say so in the config comment and the changelog,
and mention how to enable the feature.

---------

Co-authored-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>
2026-11-05 22:47:12 +01:00
..