On 6 Feb, Ruud H.G. van Tol wrote:
| Paul Tram skribis:
|
| > In my .procmailrc file, I wrote:
| > :0:
| > *
!(^From:(_dot_)*email1(_at_)hotmail(_dot_)com|^From:(_dot_)*email2(_at_)hotmail(_dot_)com|\
| >
^From:(_dot_)*email3(_at_)yahoo(_dot_)com|^From:(_dot_)*somebody(_at_)yahoo(_dot_)com|\
| >
^From:(_dot_)*friend(_at_)aol(_dot_)com|^From:(_dot_)*friend(_at_)hotmail(_dot_)com|\
| >
^From:(_dot_)*brother(_at_)serv(_dot_)net|^From:(_dot_)*sister(_at_)qwest(_dot_)net|\
| >
^To:(_dot_)*procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE|^Subject:.*[CyberDojo]|\
| > ^From:(_dot_)*(_at_)somemailinglist(_dot_)com)
| > Spam
|
| I assume there is more in your .procmailrc than just the above,
| lines like 'SHELL=/bin/sh' and 'LOGFILE=$HOME/pm.log' and
| 'MAILDIR=$HOME/mail'.
|
| A first rewrite (untested):
| :0:
| * ! ^From:.*(\
| (email1|email2|friend)@hotmail\.com|\
| (email3|somebody)@yahoo\.com|\
| friend(_at_)aol\(_dot_)com|\
| (brother(_at_)serv|sister(_at_)qwest)\.net|\
| @somemailinglist\.com|\
| @@)
| * ! ^Sender:.*procmail-admin@
| * ! ^Subject:.*[CyberDojo]
| * ! ^TO_(myaddress1|myaddress2)@domain1\.tld
| Spam
|
| But From:'friend(_at_)aol(_dot_)com(_dot_)cn' will not go to Spam.
I don't know if it was specified in the original message, but I suspect
the Subject: condition is intended to match a list tag of [CyberDojo].
As written, it'll be interpreted as a character class and match a lot
more than intended (if I'm correct). If so, the opening square bracket
needs to be escaped:
* ! ^Subject:.*\[CyberDojo]
--
Email address in From: header is valid * but only for a couple of days *
This is my reluctant response to spammers' unrelenting address harvesting
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail