Skip to content

[BUGFIX] Deliver mail with UTF-8 in its headers to relay hosts without SMTPUTF8 - #629

Merged
Kanti merged 1 commit into
webdevops:masterfrom
andersundsehr:bugfix/postfix-smtputf8
Nov 17, 2026
Merged

Kanti merged 1 commit into
webdevops:masterfrom
andersundsehr:bugfix/postfix-smtputf8

Conversation

@Kanti

@Kanti Kanti commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Postfix flags a message from sendmail with UTF-8 in its headers, for example in the subject, as SMTPUTF8, and bounces it when the relay host does not offer SMTPUTF8, as many mail catchers do not. The start script of Postfix now sets smtputf8_enable = no, so such a message is delivered as 8BITMIME.

Related issue: #289 (Postfix SMTPUTF8 should be off by default), closed, but it still applies to the published images.

Changes

  • provisioning/base/general/bin/service.d/postfix.d/10-init.sh: smtputf8_enable = no in main.cf; make generate.
  • Image test testMailWithUtf8InTheSubjectReachesTheRelayHost in PostfixChecks: mail() with Grüße in the subject reaches the SMTP sink of the tests, which does not offer SMTPUTF8.
  • docs/images/php.md, section Mail: Postfix does not use SMTPUTF8.

How it was verified

php-dev:8.5-alpine with POSTFIX_RELAYHOST=[127.0.0.1]:2525 and the SMTP sink of the image tests (ci/image-tests/Fixtures/opt/image-tests/smtp-sink.php), mail() with the subject Image test with UTF-8: Grüße:

Published image With the new 10-init.sh
postconf smtputf8_enable ${{$compatibility_level} <level {1} ? {no} : {yes}} no
Postfix log dsn=5.6.7, status=bounced (message requires SMTPUTF8, but no server was found …) dsn=2.0.0, status=sent (250 stored)
SMTP sink no message the message with the subject

"With the new 10-init.sh" is the published image with the script of this pull request mounted over /opt/docker/bin/service.d/postfix.d/10-init.sh.

Rebased on master with #627; ci/console generate changes nothing. The CI run of this pull request runs the new test in the development images (Postfix runs there), Debian and Alpine, amd64 and arm64.

Not verified: a relay host that offers SMTPUTF8 together with UTF-8 addresses.

…t SMTPUTF8

Postfix flags a message from sendmail with UTF-8 in its headers, e.g. in
the subject, as SMTPUTF8, and bounces it with "SMTPUTF8 is required, but
was not offered by host" when the relay host does not offer SMTPUTF8, as
many mail catchers do not. The start script of Postfix now sets
smtputf8_enable = no, so such a message is delivered as 8BITMIME.
@sonarqubecloud

Copy link
Copy Markdown

@Kanti
Kanti marked this pull request as ready for review November 17, 2026 08:56
@Kanti
Kanti merged commit 49650a5 into webdevops:master Nov 17, 2026
180 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant