procmail
[Top] [All Lists]

RE: new user: what am I doing wrong with this recipe?

2002-09-16 07:38:23
From: "Terry Poperszky" <Terry(_dot_)Poperszky(_at_)sosstaffing(_dot_)com>

[Dallman Ross had written:] 

Note, Terry, that I've put attribution back in that you
left out.  It is highly useful to attribute text you quote.
In the case of your mail, there was actually no quoting at
all, and the result is that it looks as if you wrote my words.
Boo!

[I have also undone your abominable top-quoting and reverted to
standard Usenet posting format by moving your comment on my text
back to the bottom here.]

What you are forgetting in your algorithm is the logic
rule that says [ not-A AND not-B ] is equivalent to [ A OR B ].
Thus, the "Reverse DeMorgan" is properly done like so:

     :0
     * ! ^TO_foo
     * ! ^TO_bar
        { }  # do nothing

     :0 E # else . . .
     /dev/null

Acknowledgment and thanks to David Tamkin for turning me and many others
of us on to the Reverse DeMorgan years ago.

-- 
dman


Oh, and please don't quote signatures without a reason.


Maybe I'm missing something, but it seems to me that the logic works
for all mail with one of the two conditions (OR) or neither of the two
conditions (NOT).

Yes, you're missing something, I'm afraid. :)  Condition lines are ANDed.
That means that both "not ^TO_foo" and "not ^TO_bar" would have to be
in the message for this recipe to be triggered.  Since that does happen
to any mail that isn't to the one or the other (or both), then the
recipe would get triggered on that mail.  The recipe says, though, to
do exctly *nothing* (what's in the empty curly braces).

Then we have an ELSE recipe.  That only gets triggered if we *didn't*
succeed on the previous recipe.  In other words, if the message WAS
"^TO_foo" or "^TO_bar" (or both), we are here.  Since we don't like
foo or bar, we do what we intended: trash the mail.

-- 
dman

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