Repository navigation
Conversation
Postfix 3.8.x makedefs only knows Linux kernels 3 to 6, so `make makefiles` fails with "Unknown system type" on kernel 7 hosts; the legacy branches (3.8.21, 3.9.15, 3.10.14) have the same check, and 3.11 is the first release that accepts Linux 7. The tarball is now checked against a pinned SHA-256 (the release was verified with Wietse Venema's signature), since it's fetched over plain HTTP. The generated main.cf drops smtpd_tls_dh1024_param_file and the dhparam step: the setting is deprecated since 3.9 (postconf warns on every call), and DHE is never negotiated with the ECDHE-only cipher list, so TLS behaviour is unchanged. Apart from that, `postconf -n` differs only in compatibility_level (3.8 -> 3.11), whose only effects are smtp_tls_security_level (already set to may) and TLSRPT (not built).
alias_maps defaults to hash:/etc/aliases, but the image had no aliases table, so every local recipient (root@localhost, postmaster@<site>) was deferred with "451 4.3.0 Temporary lookup failure" and PHP mail() returned false. Ship Debian's default `postmaster: root` and build aliases.db at image build time. The table lives outside /etc/postfix, so it also reaches existing sites, whose /etc/postfix is a volume seeded from an older image; clearing alias_maps in main.cf would only have reached new sites.
There was a problem hiding this comment.
🔵 Needs a closer look
The multi-release mail-server upgrade needs human confirmation of the reported build and runtime tests, especially compatibility with existing configuration volumes.
No open issues 🎉
What changed in this PR
Updates the Postfix image to support Linux kernel 7 builds and supplies the missing aliases table needed for local mail delivery.
Changes:
- Upgrades Postfix from 3.8.3 to 3.11.7 and adds pinned SHA-256 verification of the downloaded source.
- Removes the deprecated DH parameter setting and generation step.
- Creates
/etc/aliasesand builds its lookup database outside persisted Postfix configuration volumes.
| File | Description |
|---|---|
postfix/Dockerfile |
Updates and verifies Postfix sources, removes deprecated TLS configuration, and initializes local aliases. |
Review effort: Balanced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refreshes the postfix image. Postfix 3.8.3 is from November 2023, and its
makedefsonly knows Linux kernels 3 to 6, so the image no longer builds on kernel 7 hosts ("Unknown system type: Linux 7.0.0-…" inmake makefiles). GitHub's runners are still on kernel 6, which is why CI hasn't caught it.Changes
makedefsaccepts Linux 7; the latest 3.8, 3.9 and 3.10 patch releases still stop at kernel 6. The tarball is fetched over plain HTTP, so it's now checked against a pinned SHA-256 (POSTFIX_VERSION/POSTFIX_SHA256build args). This also brings in the security fixes released since 3.8.3, such as the SMTP smuggling fix (smtpd_forbid_bare_newline = normalizeis the default now).smtpd_tls_dh1024_param_fileand the dhparam step removed. The setting is deprecated since 3.9 (postconfwarns on every call), and DHE is never negotiated with the ECDHE-only cipher list, so TLS behaviour doesn't change./etc/aliasesshipped (postmaster: root, built withnewaliases).alias_mapsdefaults tohash:/etc/aliases, but the image had no aliases table, so mail to a local recipient (root@localhost,postmaster@<site>) was deferred with451 4.3.0 Temporary lookup failureand PHPmail()returnedfalse. The table sits outside/etc/postfix, so sites whose config volume was seeded by an older image get it too when their container is recreated.postconf -ndiffers from the current image only incompatibility_level(3.8 → 3.11) and the dropped DH line. Level 3.11 only changessmtp_tls_security_level(already set tomayhere) and TLSRPT (not built in).Testing
postconf -h mail_version= 3.11.7,postmap -q postmaster hash:/etc/aliases= root,postconf -nprints no warnings,postfix statusrunning, mail toroot@localhostdelivered to/var/mail/root, SMTP banner220 … ESMTP Postfix./etc/postfixseeded and configured byeasyengine/postfix:v4.13.1(as EasyEngine does it), then started with this image. PHPmail()through msmtp from a php container returnstrueforroot@localhostandpostmaster@site.testand both are delivered (the old image defers them); an external recipient behaves as before. Old volumes keepcompatibility_level = 3.8and the DH line, so postfix logs a deprecation warning and a compatibility notice there; mail delivery is unaffected.