We are running inbound mail services using postfix for a large number of domains and looking to reject more junk email earlier in the path.
We have already implemented the postconf setting remote_header_rewrite_domain = domain.invalid
, which means that any email arriving for any of our domains without a domain in the From:
header will get @domain.invalid
appended.
This is fine - but we want to tighten it further, and reject messages with malformed From:
headers instead of just 'marking' them.
There is the postfix header_checks
acl that allows a PCRE expression to match any header and make a decision based on that.
Does the header_checks
acl get checked before the remote_header_rewrite_domain
-- or after? (which would allow us to use @domain.invalid
in our PCRE)
Can anyone see an issue with rejecting email based on a missing domain in the From:
header?
Thanks!