procmail
[Top] [All Lists]

Re: Spamassassin and the like

2003-06-25 16:40:49
At 16:58 2003-06-25 -0600, LuKreme  (List User Kreme) wrote:

(I don't know off hand how you do a lookup against the RBL, but I would think spamhous.org would have that info.)

# set REVERSE_DOTTED_QUAD to the reverse dotted quad of the IP you're
# looking to check on.

# dig would work as well, as will nslookup
RBLLOOKUP=`host -t A ${REVERSE_DOTTED_QUAD}.rbl.spamhaus.org`

# Note: if the returned string includes "NXDOMAIN" it isn't listed.

:0
* RBLLOOKUP ?? (has address )\/.*
{
        # was found in DNSBL
        LOG="spammer $MATCH${NL}"
}

Further, there are specific addresses you could check for, depending upon the DNSBL, and whether you care what it's listed in the DNSBL for. in the above example, the returned address is in $MATCH, so you can handle it within an internal condition chain.

---
 Sean B. Straw / Professional Software Engineering

 Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
 Please DO NOT carbon me on list replies.  I'll get my copy from the list.


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>