procmail(_at_)deliberate(_dot_)net wrote:
On Thu, 09 Jan 2003 06:49:25 -0500 (EST), dman(_at_)nomotek(_dot_)com wrote:
=> So this is some stuff from genvars:
=> OCTET = "([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])"
=> DOTQUAD = "$OCTET\.$OCTET\.$OCTET\.$OCTET"
=> # Private IP space
=> SLASH_EIGHT = "0?10\.$OCTET" # 10.0. - 10.255
=> SLASH_TWELVE = "172\.(0?1[6-9]|0?2[0-9]|0?3[01])" # 172.16. - 172.31
=> SLASH_SIXTEEN = "192\.168" # 192.168
=> RESERVED_IPs = "($SLASH_EIGHT|$SLASH_TWELVE|$SLASH_SIXTEEN)"
Thanks! I think many folks learn a great deal from seeing
posts such as this [your] real life stuff. It may not be always
You're welcome.
=> Okay, so now, back in the main rc, if I want to have a condition such
=> as Hammond/Peterson are discussing, I do:
=> * $ ^Received:.*[[(]209\.163\.100\.$OCTET
Any reason why you're not including the closing
paren/bracket at the end?
No, no reason whatever. No reason not to.
One thing I started using was my own variable $OR
(defined in my equiv of genvars) so I could do the following
scoring by adding in IP ranges as needed, cleanly and easily:
# IP ranges are for example only
OR="2147483647^0" # defined in initialization
:0
* $ $OR ^Received:.*[[(]209\.163\.100\.$OCTET[])]
* $ $OR ^Received:.*[[(]000\.000\.000\.$OCTET[])]
* $ $OR ^Received:.*[[(]000\.000\.000\.$OCTET[])]
{ some spam variable or action set here }
Cool, I lok your "$OR". I use $GO in a very similar way,
setting it to 9876543210; but then I write
* $GO^0 something
* $GO^0 another something
I like the word "GO," because it tells me that (with the supremum
oversaturated in the value assigned) I will jump right to the
action-line on any match. But "$O$" is a cool way to think about
it too. And I like how you put the ^0-part into your variable
definition itself.
--
dman
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail