[linux-elitists] Procmail recipie to add X-ASN header

Karsten M. Self kmself@ix.netcom.com
Sun Jul 11 05:01:02 PDT 2004


I've posted here previously about the merits of tracking spam by ASN.

I cobbled together a procmail recipie today which adds an X-ASN header
to mail.  I use this in conjunction with a set of recipies derived from
Lars Wirzenius's rules via the Debian spamfilters package.

You should be able to INCLUDE this into your current processing.  Do so
*before* you run SpamAssassin or any other tool which modifies headers
to obscure Received line.

Edit the SMTP_SERVER value to match the text entered by your (or your
trusted upstream) mailserver.

Note that this is a bit simple-minded and won't deal with mailing lists
completely intelligently.


If you're running a Bayesian classifier (e.g.:  SpamAssassin, crm,
etc.), it should pick up this automatically and start classifying this
token.


The rule:

  - Generates SENDERIP and REVERSE_SENDERIP
  - Queries asn.routeviews.org for ASN
  - Logs ASN
  - Inserts X-SenderIP: header (dotted quad)
  - Inserts X-ASN: header as "ASN-###" (a bare number is a less unique
    token)


Recipie at:

    http://linuxmafia.com/~karsten/Download/procmail-asn-header


Peace.

-- 
Karsten M. Self <kmself@ix.netcom.com>        http://kmself.home.netcom.com/
 What Part of "Gestalt" don't you understand?
    Karsten Self is married to Rick Moen?
    - Seen on linux-elistists
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://allium.zgp.org/pipermail/linux-elitists/attachments/20040711/36607e8c/attachment.pgp 


More information about the linux-elitists mailing list