Volker Kuhlmann:
[Volker: add attribution]
reversing the IP octets in procmail is a PITA which I
plain refuse thinking about.
IP = '1.2.3.4'
:0
* IP ?? ^^\/[0-9]+
{ IP1 = $MATCH }
:0
* IP ?? ^^[0-9]+[.]\/[0-9]+
{ IP2 = $MATCH }
:0
* IP ?? ^^[0-9]+[.][0-9]+[.]\/[0-9]+
{ IP3 = $MATCH }
:0
* IP ?? ^^[0-9]+[.][0-9]+[.][0-9]+[.]\/[0-9]+
{ IP4 = $MATCH }
REV_IP = "$IP4.$IP3.$IP2.$IP1"
For the new procmail, maybe the code of this project can be reused:
http://rblcheck.sourceforge.net/
$ rblcheck -v
rblcheck 1.5
Copyright (C) 1997, 1998, 1999, 2000, 2001 Edward S. Marshall
Example:
$ rblcheck -s bl.spamcop.net www.google.com
www.google.com resolved to mutiple addresses: checking 66.249.93.104
www.google.com not RBL filtered by bl.spamcop.net
With -q, it quietly reports a status.
--
Grtz, Ruud
____________________________________________________________
procmail mailing list Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail