procmail
[Top] [All Lists]

Re: Using an "OR"

2002-06-05 14:32:21
At 16:16 2002-06-05 -0400, Jean-Sebastien Morisset did say:
I read that by illiminating

Illuminating?  With gold foil or a lightbulb?

Where'd you read this anyway - it wouldn't have been in the MANPAGES. Find whoever wrote it, and slap them good.

 the '*', it would create 'ORs' instead of 'ANDs'. Is this correct?

Absolutely, positively NOT.

The reason I'm asking is that the following doesn't seem to work:

Have you tried enabling VERBOSE=ON and examining the LOGFILE? I'm guessing not.

:0

You are missing the LOCKFILE flag ':'

* ^From: .*(shopping-values.com|cybercarsonline(_at_)yahoo(_dot_)com|gtreet245(_at_)excite(_dot_)com|marketing(_at_)imfc(_dot_)com)
  ^From: WebProNews

bzzt. If the first condition (properly prefixed by the condition flag '*') were to match, then procmail would attempt to deliver to a file called ^From... If it didn't, then for each of the several lines you had following the second one, the procmail log would report "Skipping...", because the syntax is hosed.

Also, is it possible to mix header and body matches?

Yes, just prefix Body matches with the appropriate Body syntax (B ??). But to get the OR effect for separate condition lines, the easiest (and probably "cleanest") way is to use scoring:

:0:
* 9876543210^0 ^From:.*(shopping-values\.com|cybercarsonline(_at_)yahoo\(_dot_)com|gtreet245(_at_)excite\(_dot_)com|marketing(_at_)imfc\(_dot_)com)
* 9876543210^0 ^From: WebProNews
* 9876543210^0 ^Errors-To: morejunkmail
* 9876543210^0 ^Subject:.*(Credit Card|    [0-9][0-9][0-9][0-9][0-9]*$)
* 9876543210^0 ^Subject:.*[Aa][Dd][Vv]: .*$
* 9876543210^0 B ?? ^I send you this file in order to have your advice$
* 9876543210^0 B ?? ^Te mando este archivo para que me des tu punto de vista$
${SPAM}


You could break the addresses down to separate scoring lines if it were easier for you to visualize. I'd order the most likely hits first, and body matches LAST (even if they're likely), since the body matches are a bit more CPU intensive.

---
 Sean B. Straw / Professional Software Engineering

 Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
 Please DO NOT carbon me on list replies.  I'll get my copy from the list.

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

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