Mailing List Archive

ip2location.com
https://lite.ip2location.com/database/ip-asn

is it possible to use it in spamassassin ?
Re: ip2location.com [ In reply to ]
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
Re: ip2location.com [ In reply to ]
On 2021-01-28 15:27, Andy Smith wrote:
> 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?

i like to use postgrsql backend so not using dns anymore, i do this with
db-file ipcc country database, but this miss asn support

the above does not miss data, but just implemention possible to
spamassassin

https://metacpan.org/release/IP-Country-DB_File/source/lib/IP/Country/DB_File/Builder.pm