Hi Benny,

On Thu, Jan 28, 2021 at 03:06:12PM +0100, Benny Pedersen wrote:
> https://lite.ip2location.com/database/ip-asn
> 
> is it possible to use it in spamassassin ?

SpamAssassin already has an IP to ASN plugin:

    
https://spamassassin.apache.org/full/3.2.x/doc/Mail_SpamAssassin_Plugin_ASN.html

Is there some other info from the above database(s) that you were
interested in?

The above plugin only exposes the ASN of the connecting IP address.
The DNS database that it uses (asn.routeviews.org) only provides the
ASN:

$ dig -t txt +noall +answer 232.80.119.85.asn.routeviews.org
232.80.119.85.asn.routeviews.org. 86400 IN TXT  "8943" "85.119.80.0" "21"

but there is the Cymru IP-to-ASN database that does provide more
info:

$ dig -t txt +noall +answer 232.80.119.85.origin.asn.cymru.com
232.80.119.85.origin.asn.cymru.com. 14400 IN TXT "8943 | 85.119.80.0/21 | GB | 
ripencc | 2010-03-03"

So perhaps another plugin along the lines of Plugin::ASN could be
used to get some of that info?

Cymru database docs at:
https://team-cymru.com/community-services/ip-asn-mapping/#dns

Cheers,
Andy

Reply via email to