[exim] Lookup ASN of sender

Góra strony
Delete this message
Reply to this message
Autor: Sven Hartge
Data:  
Dla: exim-users
Temat: [exim] Lookup ASN of sender
Hi.

I just want to share this little ACL snippet, which uses dnsdb to add
the ASN to which the senders IP belongs into a X-header, (as discussed
in http://twiki.iwethey.org/twiki/bin/view/Main/SpamByASN) so tools like
SpamAssassin might pickup the most "spammy" ASNs using their bayes
qualifier.

warn message = X-Received-ASN: AS${extract{1}{\n}{${lookup \
dnsdb{txt=\
${extract{4}{.}{$sender_host_address}}.\
${extract{3}{.}{$sender_host_address}}.\
${extract{2}{.}{$sender_host_address}}.\
${extract{1}{.}{$sender_host_address}}.\
asn.routeviews.org}}}}

Improvements are of course welcome.

Grüße,
Sven.

--
Sven Hartge -- professioneller Unix-Geek
Meine Gedanken im Netz: http://sven.formvision.de/blog/