service(postfix): Better handling of the compatibility_level setting (#2597)

* chore: Fix typo

* chore: Apply explicit chroot default for `sender-cleanup`

The implicit default is set to `y` as a compatibility fallback, but otherwise it is [advised to set to `n` going forward](http://www.postfix.org/COMPATIBILITY_README.html#chroot).

Test was changed to catch any backwards-compatibility logs, not just those for `chroot=y`. `using` added as a prefix to avoid catching log message whenever a setting is changed that the default compatibility level is active.

* chore: Set `compatibility_level` in `main.cf`

We retain the level`2` value previously set via scripts. This avoids log noise that isn't helpful.

Applied review feedback to give maintainers some context with this setting and why we have it presently set to `2`.
This commit is contained in:
Brennan Kinney 2022-06-05 12:10:20 +12:00 committed by GitHub
parent 1bd8ef3976
commit 3d6e7a7bb8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 14 deletions

View file

@ -762,9 +762,6 @@ function _setup_postfix_override_configuration
else
_log 'trace' "No extra Postfix settings loaded because optional '/tmp/docker-mailserver/postfix-master.cf' was not provided"
fi
_log 'trace' "Set Postfix's compatibility level to 2"
postconf compatibility_level=2
}
function _setup_postfix_sasl_password