Skip to content

[BUGFIX] Pass SERVICE_POSTFIX_OPTS to postfix before the start command - #635

Open
Kanti wants to merge 1 commit into
webdevops:masterfrom
andersundsehr:bugfix/postfix-options
Open

Kanti wants to merge 1 commit into
webdevops:masterfrom
andersundsehr:bugfix/postfix-options

Conversation

@Kanti

@Kanti Kanti commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The Postfix start script ran postfix start $SERVICE_POSTFIX_OPTS. postfix takes its options before the command (postfix [-Dv] [-c config_dir] command), so the variable had no effect. The script now runs postfix $SERVICE_POSTFIX_OPTS start, so -v, -D and -c work.

Related issues: none found.

Changes

  • provisioning/base/general/bin/service.d/postfix.sh: options before start; make generate.
  • Image test testPostfixOptionsFromTheEnvironment in PostfixChecks (development images, where Postfix runs): in a container with SERVICE_POSTFIX_OPTS=-v, the verbose message name_mask shows up in the container log, on Alpine as postfix: name_mask: …, on Debian through syslog as postfix[pid]: name_mask: ….
  • docs/environment-variables.md: SERVICE_POSTFIX_OPTS under Services.
  • docs/known-issues.md: the entry for SERVICE_POSTFIX_OPTS is removed.
  • AGENTS.md: its example of a variable that a script reads without effect was SERVICE_POSTFIX_OPTS; it now says that the variable used to be passed after start.

How it was verified

The published development images with SERVICE_POSTFIX_OPTS=-v, and the same images with the new postfix.sh mounted over /opt/docker/bin/service.d/postfix.sh (mode 755):

Image Published image With the new postfix.sh
php-dev:8.5 Postfix runs, no name_mask line Postfix runs; [SYSLOG] postfix[90]: name_mask: all in the container log
php-dev:8.5-alpine Postfix runs, no name_mask line Postfix runs; postfix: name_mask: ipv4 and three more in the container log

Without SERVICE_POSTFIX_OPTS, Postfix runs with the new script as before, without verbose messages, on both.

Image tests from the fork: on the published php-dev:8.5 and php-dev:8.5-alpine the new test fails (no verbose message); with the new postfix.sh it passes, together with the other Postfix tests.

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

Not verified: -c with another configuration directory.

The Postfix start script ran "postfix start $SERVICE_POSTFIX_OPTS", but
postfix takes its options before the command, so the variable had no
effect. It now runs "postfix $SERVICE_POSTFIX_OPTS start", so -v, -D
and -c work.

A new image test of the development images sets SERVICE_POSTFIX_OPTS to
-v and finds the verbose messages in the container log, on Debian
through syslog. The variable is documented, and its known issue is
removed.
@sonarqubecloud

Copy link
Copy Markdown

@Kanti
Kanti marked this pull request as ready for review November 18, 2026 08:35
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