On Mon, Apr 07, 2003 at 01:27:25AM +0000, Robert Arnold wrote:
*$ CHECK ?? .*\/[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+
Btw, no leading $ expansor was needed here. I don't see any
damage caused, though.
Also, I like to use
a specific regex for IPs. This defines one octet:
OCTET="([0-9]|[1-9][0-9]|1[0-9][0-9]|2([0-4][0-9]|5[0-5]))"
...so then your nested rule that extracts the IP could be:
:0
*$ CHECK ?? .*\/$OCTET\.$OCTET\.$OCTET\.$OCTET
{ CHECKIP=${MATCH} }
Yes, good plan. I like:
OCTET = ([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])
See my article at
http://www.rosat.mpe-garching.mpg.de/mailing-lists/procmail/2003-01/msg00156.html,
which (from only last January) I had thought was the first instance of same on
this list, but I see now that Philip Guenther used the name in some complex but
interesting stuff in 1999, at
http://www.rosat.mpe-garching.mpg.de/mailing-lists/procmail/1999-03/msg00204.html
.
--
dman
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail