We want to use the Spamassassin plugin “AskDNS” to check the MX record of the domain in the “Reply-To” header, if this has been set.
The following note can be found in the source code of AskDNS.pm:
The specially supported HEADER() tag can be used to query any header content using the same header names/modifiers supported by the header rules.
For example, _HEADER(Reply-To:addr:domain)_ can be used to query the shortened domain part of the Reply-To address. For more information about header rules, see the Mail::SpamAssassin::Conf documentation.
We use the following rule in custom.cf:
The DNS server log shows that AskDNS does not perform any MX lookup for the reply-to domain.
A debug output from Spamassassin shows that the AskDNS plugin was previously loaded.
Other self-made rules in custom.cf work without problems.
Any hints?
regards,
Exo
The following note can be found in the source code of AskDNS.pm:
The specially supported HEADER() tag can be used to query any header content using the same header names/modifiers supported by the header rules.
For example, _HEADER(Reply-To:addr:domain)_ can be used to query the shortened domain part of the Reply-To address. For more information about header rules, see the Mail::SpamAssassin::Conf documentation.
We use the following rule in custom.cf:
Perl:
ifplugin Mail::SpamAssassin::Plugin::AskDNS
add_header all AskDNS loaded
# Block MX hosts from domains listed in Reply-To
askdns LOCAL_REPLYTOMX _HEADER(Reply-To:addr:domain)_ MX /mx.unwantedreplyto.com/
describe LOCAL_REPLYTOMX block list of MX hosts searched by Reply-To
Result LOCAL_REPLYTOMX 1.0
endif # Mail::SpamAssassin::Plugin::AskDNS
The DNS server log shows that AskDNS does not perform any MX lookup for the reply-to domain.
A debug output from Spamassassin shows that the AskDNS plugin was previously loaded.
Other self-made rules in custom.cf work without problems.
Any hints?
regards,
Exo