[exim] Lookup ASN of sender

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Sven Hartge
Fecha:  
A: exim-users
Asunto: [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/