Take spamhaus return codes into account in status check and postfix config #2332
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.
Spamhaus defines a number of return codes in its blocklist lookups, e.g. 127.0.0.1 or 127.255.255.252 These are described here Not all these codes indicate that an ip or domain is really on the Spamhaus blacklist. It could also be that an open DNS server is used, or too much queries are made from the same DNS server. This is usually caused by not using the DNS resolver built-in in the MiaB installation.
The issue here is that the status check and postfix will trigger a false positive in case that Spamhaus returns an error code (one of the 127.255.255.* codes). Thus, Mail-in-a-Box incorrectly describes these as a hit on a Spamhaus blocklist. (e.g. "This domain is listed in the Spamhaus domain blocklist...") and postfix will also incorrectly reject a mail as spam.
This commit: