docker-mailserver icon indicating copy to clipboard operation
docker-mailserver copied to clipboard

[TODO]: Postfix `master.cf` should avoid duplicating Amavis config

Open polarathene opened this issue 2 years ago • 0 comments

Description

This task is available for anyone that wants to tackle it.


https://github.com/docker-mailserver/docker-mailserver/blob/0889b0ff063a37b482113a684d934e4bd728a33c/target/scripts/startup/setup.d/security/misc.sh#L228

While we don't support container restarts for config changes handled by the startup scripts, requiring recreating the container from a known state. We should try be compatible with restarts that don't adjust config.

Presently, since Amavis was extracted out of master.cf in v12 (changelog entry), it is now always appending a copy each container restart.

  • We could store our master.cf at a different location and recreate /etc/postfix/master.cf at startup.
  • Alternatively, a quick fix is to not append to master.cf when the amavis services are already there.

Another similar bug with master.cf and main.cf is documented here: https://github.com/docker-mailserver/docker-mailserver/issues/3784#issuecomment-1894738266

polarathene avatar Apr 22 '23 00:04 polarathene