• Please make sure that your use of the plugin does not overload your ASN providers infrastructure - this generally means that you should not use this plugin in a high-volume environment.
• GeoDB (GeoIP ASN) database lookups are supported since SpamAssassin 4.0 and it's recommended to use them instead of DNS queries, unless _ASNCIDR_ is needed.

This plugin uses DNS lookups to the services of an external DNS zone such as at to do the actual work. You can create template tags containing the connecting IP's AS number and route info for that AS number. The bayes tokenizer will use ASN data for bayes calculations, and thus affect which BAYES_* rule will trigger for a particular message. No in-depth analysis of the usefulness of bayes tokenization of ASN data has been performed.

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