procmail
[Top] [All Lists]

Re: my recipe doesn't work.

1998-03-04 12:20:02
# trash anything coming from smut sites
:0
* ^From.*(sex | Sex | SEX | XXX | xxx).*
* *TO.*(sex | Sex | SEX).*
/dev/null

Remove the spaces in "( | | )":

~> echo "From: freestuff(_at_)dailysex(_dot_)com" |egrep 
'^From.*(sex|Sex|SEX|XXX|xxx).*'
From: freestuf(_at_)dailysex(_dot_)com
~> echo "From: freestuff(_at_)dailysex(_dot_)com" |egrep '^From.*( sex | Sex 
| SEX | XXX | xxx).*'
~>

Of course, removing the spaces will now match on anything (essex.com, 
essex.net, sexton.com, etc.)  Maybe do some checking on the body of the
message too?

Chris

<Prev in Thread] Current Thread [Next in Thread>