Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I've got a fromail recipe embeded in my .procmailrc that I use to determine the following information:
This works fine for my main isp, Earthlink. but, I want it to also work for my own domain, toadnet.com and for mail I pickup from yahoo using fetchyahoo. All mail is being filtered through procmail, I just can't get the above information added to toadnet and yahoo at the end of the headers. Below is the recipe:
# Add X-ASN header
# KMSelf Sun Jul 11 04:05:32 PDT 2004
# Add headers for ASN and originating IP.
# Original author: Karsten M. Self
# Requires FORMAIL variable be set (most procmail recipe sets do this).
# You *must* set your SMTP_SERVER identifier.
# Run this *BEFORE* any spamassassin processing. The header tag itself
# should start being scored as a Bayesian attributed.
# Reverse IP for reverse DNS query
REVERSE_SENDERIP = `expr "$SENDERIP" | \
# Query asn.routeviews.org for the ASN.
# Note that this is pretty aggressive: wait six seconds, retry ten
# times, may slow mail processing, but tends to improve data quality.
# Run a caching DNS server for improved performance.
# Raw is a mostly unmunged output (save quotes and prefix). Contains
# ASN, IP, and CIDR prefix.
RAW_ASN = `host -W 6 -R 10 -t txt $REVERSE_SENDERIP.asn.routeviews.org | \
sed -e 's/.* text //' -e 's/"//g'`
ASN = `echo $RAW_ASN | cut -d ' ' -f 1`
ASN_CIDR = `echo $RAW_ASN | cut -d ' ' -f 2`/`echo $RAW_ASN | cut -d ' ' -f 3`