procmail
[Top] [All Lists]

How to match IP's

2001-09-05 14:33:31
Hi,
Here is something I use to block a range of IP's.
It is ugly and labor intensive.

# XI'AN DATA BUREAU CN 61.134.3.0 - 61.134.20.95
# dtwx.com.cn ([61.134.9.52])
:0
* ^Received:.*(\[61\.134\.[3-9]\.[0-9]*|
\[61\.134\.1[0-9]\.[0-9]*|
\[61\.134\.20\.[0-9]*)
JunkMail.$TODAY

(I added line breaks so it would fit into email format)

My .procmailrc has lots of similar rules.
Is there an easier way? I would like to be able to just 
put '61.134.3.0 - 61.134.20.95' in a rule.  I am tempted to code this into
procmail itself, or would it make more sense to spin off a simple util
program?
cheers -- Rick

Rick Leir         rleir(_at_)igs(_dot_)net
613-828-8289 http://www.igs.net/~rleir/
"Those who do not understand Unix are condemned to reinvent it,
 poorly." -  Henry Spencer


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