procmail
[Top] [All Lists]

Re: (!cond1 || !cond2) recipes?

1995-12-03 15:30:37
Robert Brown asked twice,

| I tried looking in the FAQ for this.  Is it possible to have
| (!cond1 || !cond2) recipes?  That is, I'd like something like:
| 
| ::
| *(!^Subject: foo)|(!^From: bar)
| folder
| 
| Right now, I'm doing:
| 
| :c
| *^Subject: foo
| *^From: bar
| :E:
| folder
| 
| but this seems like a hack.

Nothing hackish about it, except that you need proper syntax.  The `c' flag
and the lack of an action line after the conditions will trip you up.  The
following format works properly and I use it all the time (except that
usually the conditions that I want to OR are positive, so they show up
negated in my recipes):

 :0
 * ^Subject: foo
 * ^From: bar
 { } # null operator
 :E:
 folder

You might prefer the following form, which has the same results:

 :0:
 * 2147483647^0 ! ^Subject: foo
 * 1^0 ! ^From: bar
 folder

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