service(postfix): Better handling of the compatibility_level setting#2597
Conversation
This should no longer be required. Removing it falls back to the default `0` level which does output a log with every change made to config, suggesting to set it to `2` to hide that log notice. Could explicitly set compatibility in the config, or revert this commit if suitable.
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.
|
Haha :D I noticed the |
compatibility_level
Sorry, did not read all in the beginning. I would actually add it to
|
Applying review feedback. We retain the level`2` value previously set via scripts. This avoids log noise that isn't helpful. In tests we override this to be `0` to leverage detecting config that should be adjusted, or prevent introducing implicit defaults that compatibility levels treat differently (eg: `chroot`).
|
compatibility_levelcompatibility_level
casperklein
left a comment
There was a problem hiding this comment.
LGTM. You may add my comment suggestion if you want.
I will do that thanks! I saw something related to the compatibility level change in postfix docs that I want to look into further before merging this. I want to make sure it does get caught if it's compatibility default would impact tests 😅 |
The log detection doesn't work for each affected feature until it's actually used. Applied review feedback to give maintainers some context with this setting and why we have it presently set to `2`.
26eb445
We generally prefer spaces to avoid mixed indents creeping in.
|
Reverted the change to set Other compatibility rules don't seem to be a concern with our current config. Since we can't properly detect each with the log detection and it may result in tests behaving differently than what we ship, I think it's best to ignore that idea 😅 When the next Debian release happens we should have Postfix 3.6 available and can bump the |
compatibility_levelcompatibility_level setting
Description
I wanted to fix a typo specifically. But also looked into why the postfix compatibility level was set to
2(both from the same PR in Sep 2017, while the compatibility level test was introduced in May 2017):It seems leaving this at the default (
0) is passing the mentioned PCRE test just fine.It was not made clear what logging errors were a concern. There was one regarding the
sender-cleanupservice that the PR added with implicit chroot default. The default compatibility level0would set this toy, otherwise it'd ben. This PR makes thenexplicit.If choosing to leave Postfix
compatibility_levelat the default0,when the config is changed (eg: via(only seems to happen withpostconf), it will log the following each timepostfix reloadorsupervisorctl restart postfix):This is noise, so reverting the
compatibility_levelback to being set to2would be understandable. Would we want this in_setup_postfix_override_configurationstill, or intarget/postfix/main.cf? Leaving it at0would catch any compatibility default settings being applied during tests though; each level is listed here.Type of change