loadplugin Mail::SpamAssassin::Plugin::ASN asn_lookup asn.routeviews.org _ASN_ _ASNCIDR_ add_header all ASN _ASN_ _ASNCIDR_
The default config will add a header that looks like this:
X-Spam-ASN: AS24940 18.104.22.168/18
where ``AS24940'' is the ASN and ``22.214.171.124/18'' 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: AS1680 126.96.36.199/15 188.8.131.52/16
Note that in most cases you should not score on the ASN data directly. Bayes learning will probably trigger on the _ASNCIDR_ tag, but probably not very well on the _ASN_ tag alone.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4770 - SpamAssassin Issue #4770 concerning this plugin
No in-depth analysis of the usefulness of bayes tokenization of ASN data has been performed.
If no tags are specified the AS number will be added to the _ASN_ tag and the routing info will be added to the _ASNCIDR_ tag. You must specify either none or both of the tags. Tags must start and end with an underscore.
If two or more asn_lookups use the same set of template tags, the results of their lookups will be appended to each other in the template tag values in no particular order. Duplicate results will be omitted when combining results. In a similar fashion, you can also use the same template tag for both the AS number tag and the routing info tag.
asn_lookup asn.routeviews.org asn_lookup asn.routeviews.org _ASN_ _ASNCIDR_ asn_lookup myview.example.com _MYASN_ _MYASNCIDR_ asn_lookup asn.routeviews.org _COMBINEDASN_ _COMBINEDASNCIDR_ asn_lookup myview.example.com _COMBINEDASN_ _COMBINEDASNCIDR_ asn_lookup in1tag.example.net _ASNDATA_ _ASNDATA_