1Mail::SpamAssassin::PluUgsienr::CAoSnNt(r3i)buted Perl DMoaciulm:e:nStpaatmiAosnsassin::Plugin::ASN(3)
2
3
4

NAME

6       Mail::SpamAssassin::Plugin::ASN - SpamAssassin plugin to look up the
7       Autonomous System Number (ASN) of the connecting IP address.
8

SYNOPSIS

10        loadplugin Mail::SpamAssassin::Plugin::ASN
11
12        asn_lookup asn.routeviews.org _ASN_ _ASNCIDR_
13
14        asn_lookup_ipv6 origin6.asn.cymru.com _ASN_ _ASNCIDR_
15
16        add_header all ASN _ASN_ _ASNCIDR_
17
18        header TEST_AS1234 X-ASN =~ /^1234$/
19

DESCRIPTION

21       This plugin uses DNS lookups to the services of an external DNS zone
22       such as at "http://www.routeviews.org/" to do the actual work. Please
23       make sure that your use of the plugin does not overload their
24       infrastructure - this generally means that you should not use this
25       plugin in a high-volume environment or that you should use a local
26       mirror of the zone (see "ftp://ftp.routeviews.org/dnszones/").  Other
27       similar zones may also be used.
28

TEMPLATE TAGS

30       This plugin allows you to create template tags containing the
31       connecting IP's AS number and route info for that AS number.
32
33       The default config will add a header field that looks like this:
34
35        X-Spam-ASN: AS24940 213.239.192.0/18
36
37       where "24940" is the ASN and "213.239.192.0/18" is the route announced
38       by that ASN where the connecting IP address came from.  If the AS
39       announces multiple networks (more/less specific), they will all be
40       added to the "_ASNCIDR_" tag, separated by spaces, eg:
41
42        X-Spam-ASN: AS1680 89.138.0.0/15 89.139.0.0/16
43
44       Note that the literal "AS" before the ASN in the _ASN_ tag is
45       configurable through the asn_prefix directive and may be set to an
46       empty string.
47

CONFIGURATION

49       The standard ruleset contains a configuration that will add a header
50       field containing ASN data to scanned messages.  The bayes tokenizer
51       will use the added header field for bayes calculations, and thus affect
52       which BAYES_* rule will trigger for a particular message.
53
54       Note that in most cases you should not score on the ASN data directly.
55       Bayes learning will probably trigger on the _ASNCIDR_ tag, but probably
56       not very well on the _ASN_ tag alone.
57

SEE ALSO

59       http://www.routeviews.org/ - all data regarding routing, ASNs, etc....
60
61       http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4770 -
62       SpamAssassin Issue #4770 concerning this plugin
63

STATUS

65       No in-depth analysis of the usefulness of bayes tokenization of ASN
66       data has been performed.
67

ADMINISTRATOR SETTINGS

69       asn_lookup asn-zone.example.com [ _ASNTAG_ _ASNCIDRTAG_ ]
70           Use this to lookup the ASN info in the specified zone for the first
71           external IPv4 address and add the AS number to the first specified
72           tag and routing info to the second specified tag.
73
74           If no tags are specified the AS number will be added to the _ASN_
75           tag and the routing info will be added to the _ASNCIDR_ tag.  You
76           must specify either none or both of the tag names.  Tag names must
77           start and end with an underscore.
78
79           If two or more asn_lookups use the same set of template tags, the
80           results of their lookups will be appended to each other in the
81           template tag values in no particular order.  Duplicate results will
82           be omitted when combining results.  In a similar fashion, you can
83           also use the same template tag for both the AS number tag and the
84           routing info tag.
85
86           Examples:
87
88             asn_lookup asn.routeviews.org
89
90             asn_lookup asn.routeviews.org _ASN_ _ASNCIDR_
91             asn_lookup myview.example.com _MYASN_ _MYASNCIDR_
92
93             asn_lookup asn.routeviews.org _COMBINEDASN_ _COMBINEDASNCIDR_
94             asn_lookup myview.example.com _COMBINEDASN_ _COMBINEDASNCIDR_
95
96             asn_lookup in1tag.example.net _ASNDATA_ _ASNDATA_
97
98       asn_lookup_ipv6 asn-zone6.example.com [_ASN_ _ASNCIDR_]
99           Use specified zone for lookups of IPv6 addresses.  If zone supports
100           both IPv4 and IPv6 queries, use both asn_lookup and asn_lookup_ipv6
101           for the same zone.
102
103       clear_asn_lookups
104           Removes any previously declared asn_lookup entries from a list of
105           queries.
106
107       asn_prefix 'prefix_string'       (default: 'AS')
108           The string specified in the argument is prepended to each ASN when
109           storing it as a tag. This prefix is rather redundant, but its
110           default value 'AS' is kept for backward compatibility with versions
111           of SpamAssassin earlier than 3.4.0. A sensible setting is an empty
112           string. The argument may be (but need not be) enclosed in single or
113           double quotes for clarity.
114
115
116
117perl v5.32.1                      2021-04-14Mail::SpamAssassin::Plugin::ASN(3)
Impressum