Add metadata to the Bayesian filtering process, allowing the Bayesian filters to learn information based on the ASN of the connecting IP address.

Enable an ASN Lookup Provider

For SpamAssassin 3.4.X

Go to Warden -> Settings -> Plugin Settings -> ASN and set ASN lookup to: _ASN_ _ASNCIDR_

If using IPv6 set ASN lookup IPv6 to: _ASN_ _ASNCIDR_

Press the update button to save the page.

For SpamAssassin 4.0.X

SpamAssassin 4.0 can use the local MaxMind ASN database to lookup ASN information for an IP address so it does not require that you use external lookups like SpamAssassin 3.4.X. Sign up for your free MaxMind API key and download the MaxMind databases if you haven't done so already. See here for more information.



The default config will add a header field that looks like this:

 X-Spam-ASN: AS24940

Where "24940" is the ASN and "" is the route announced by that ASN where the connecting IP address came from. If the AS announces multiple networks (more/less specific), they will all be added to the _ASNCIDR_ tag, separated by spaces, eg:

 X-Spam-ASN: AS24940

Note that the literal "AS" before the ASN in the _ASN_ tag is configurable through the asn_prefix directive and may be set to an empty string.

Related Pages