procmail
[Top] [All Lists]

Re: Unidentified subject! (AND vs. OR)

1998-01-15 09:59:01
At 08:09 AM 1/16/98 +0800, aoc wrote:

:0
* ^(Subject:.*blah.*|To:.*foo.*)
file

If Subject=blah and To=foo
then send it to file
else go to default

What you have is if *EITHER* the subject CONTAINS blah, *OR* the addressee
CONTAINS foo, then file, otherwise continue.

Well, that'd be if the parenthesis were right, but they certainly don't
look it  - I think this would match (for example) "Subject: re: To: all
employees of foodco"

The '.*' after the match strings is unneccessary - it is implied (you're
matching ZERO or more occurrences of any character - meaning the preceeding
text can be at the end of line, or not, doesn't matter).

:0
* ^Subject:.*blah
* ^To:.*foo
file

Would require BOTH headers to contain the specified match texts, according
to your english description of what you want the recipe to do.

---
 Please DO NOT carbon me on list replies.  I'll get my copy from the list.

 Sean B. Straw / Professional Software Engineering
 Post Box 2395 / San Rafael, CA  94912-2395

<Prev in Thread] Current Thread [Next in Thread>
  • Re: Unidentified subject! (AND vs. OR), Professional Software Engineering <=