procmail
[Top] [All Lists]

Re: How to do OR - Conditions in recipes ?

1998-04-23 02:13:24
On Wed, 22 Apr 1998 10:22:35 -0500 (CDT), dattier(_at_)wwa(_dot_)com 
(David W. Tamkin) wrote:
Thomas Witt asked,
| How do I set up a OR-Condition, f.E.
:0:
* ^Subject:.*surfing|^From:(.*\>?surfing(_at_)mailinglist\(_dot_)org
surfing

Watch out here, there's a closing paren missing. Also I'd use \<
instead of \> -- and why not do the same check on the Subject, like
this:

    * 
^Subject:(.*\<)?surfing\>|^From:(.*\<)?surfing(_at_)mailinglist\(_dot_)org\>

This is probably over-cautious but if you really want to do it "right"
you should try to minimize false matches wherever you can.

Other kinds of ORing are more complicated, as we've discussed in
the past on this list, but when you are checking the same search
area for a match to either of two patterns (or to any of three or
more patterns), just alternate them with unescaped pipe symbols.

At the risk of stating the evident, the FAQ has a brief discussion of
this, including ORing by scORing. ;-)
  <http://www.iki.fi/~era/procmail/mini-faq.html>

/* era */

Tangential: Should I post the FAQ pointer more often? Or should I post
the actual FAQ to the list? I had sort of planned at one point to post
the FAQ every 34 days and post the pointer 17 days after the FAQ to
get an effective frequency of something every 17 days. That seems to
be too infrequent, the list typically fills up with stuff that is in
the FAQ about a week after I post the pointer. (Reply in private.)

-- 
 Paparazzi of the Net: No matter what you do to protect your privacy,
  they'll hunt you down and spam you. <http://www.iki.fi/~era/spam/>

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