procmail
[Top] [All Lists]

Re: "if this then that" logic doesn't seem to work

2001-04-02 21:10:28
Don Hammond wrote:
On  2 Apr, Wade A. Mosely wrote:
...
| :0
| * ^From(_dot_)123247N(_at_)knotes(_dot_)kodak(_dot_)com
| * ^Subject:.*test
| * B ?? xxff
| ! bird(_at_)cyber(_dot_)kodak(_dot_)com
| 
|      :0 A:
|      in-testing
| 

I think you're almost correct in your first assertion and incorrect in
the second, and all-in-all have a better solution. ;-)

The only reason you're only almost correct is you forgot a "c" flag on
the first part of the recipe, so it'll never get to the second. The
message will be forwarded and procmail will consider itself done.  As
for the second assertion, mine is no more efficient.  Since the
conditions are "anded" together, procmail doesn't bother with the body
search if your first two conditions don't match. So other than the
missing "c" flag, I believe the two are functionally identical and yours
gets the nod for simplicity.

First off: I offer thanks to both Stan and Don for their replies.

I appreciate the explanation regarding the conditions being
ANDed.  I did a little experimenting and confirmed that it seems
a procmail recipe does, in fact, fail as soon as the first
no-match occurs, rather than evaluating all conditions first and
then ANDing them, which is what I was assuming.  That's good to
know. :o)

I see now where I missed the 'c' flag and understand the problem
with that.  Thanks. 

        -- Mr. Wade

-- 
Linux: The Choice of the GNU Generation


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