(A copy of this message has also been posted to the following newsgroups:
news.admin.net-abuse.email)
Hi there;
I've got a question about the following procmail recipe. I've Cc'd this
message to the procmail mailing list for further comments, especially
since the topic of procmail and spam prevention has been a topic of recent
popularity.
CPDOM=`cat $HOME/cyberpromo.domains`
:0 Hir
* ^TO_.*${CPDOM}
/dev/null
I'm not sure I see how that works.
CPDOM=`cat...` will result in CPDOM looking something like:
1-500-fingers.com 1stamend.com adbenterprises.com
Which will result in a regexp that looks something like:
* ^TO_.*1-500-fingers.com 1stamend.com adbenterprises.com
Which, in theory, should only match email addressed to
the 1-500-finger.com domain -- the rest of those domain entries would be
ignored. To match all the domains, wouldn't
one need a vertical bar between each entry? Something like:
CPDOM=`cat $HOME/cyberpromo.domains | tr '\n' '|'`
:0 Hir
* ^TO_.*(${CPDOM})
Which would result in:
* ^TO_.*(1-500-fingers.com|1stamend.com|adbenterprises.com|etc...)
Additionally: that ^TO_.* needs to be fixed (read the current procmailrc
man page for the difference between ^TO_, ^TO, and why you shouldn't add
that '.*' on the end), the 'H' flag on a recipe is redundant (only the
header is egrep'd by default), and the 'ir' flags are probably unnecessary
when writing to /dev/null (I've never encountered a problem without them);
this:
CPDOM=`cat $HOME/cyberpromo.domains | tr '\n' '|'`
:0
* ^TO(${CPDOM})
/dev/null
Should accomplish the intended purpose (though I have not, as yet, tested it).
Comments? This makes sense to me, but that doesn't necessarily mean
anything towards the end of the week :-).
-- Lars
PS For procmail list readers, this is how you can pick up the list of
cyberpromo domains:
The following is a complete (so far as I can tell) list of
domains used by Cyber Promotions and/or that company's customers.
It is being posted for informational purposes only, and will be
reposted (with any updates) weekly. You can also get it from
the following URL:
ftp://ftp.cybernothing.org/pub/spamkill/cyberpromo.domains
---
Lars Kellogg-Stedman * lars(_at_)bu(_dot_)edu * (617) 353-8277
Boston University Office of Information Technology