Add backwards compatibility for old dns_blocklists.cf files #6158
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Contribution Guidelines
What does this PR include?
Short Description
Some people had problems with the latest mailcow release (2024-11, see https://community.mailcow.email/d/4244-i-no-longer-receive-emails-and-i-no-longer-send-emails). The reason for the problems was an older version of data/conf/postfix/dns_blocklists.cf which was created with another indentation than the currently used one.
A new Postfix config line was introduced in c53bf85 which led to erroneous parsing due to the indentation and resulting in this error:
Due to the indentation of data/conf/postfix/dns_blocklists.cf the content was added to the lmtp_destination_recipient_limit parameter, leading to the error.
The fix strips the whitespaces at the beginning of the line containing "postscreen_dnsbl_sites" to restore a proper indentation.
Affected Containers
Did you run tests?
Yes
What did you tested?
Edited /opt/postfix.sh inside the container to apply my new command, tested multiple variants of the dns_blocklists.cf file
What were the final results? (Awaited, got)
The indentation was corrected.
Before:
After: