On Thu, Mar 25, 2004 at 10:26:56AM +0100, Stefan Heinrichsen wrote:
Am Do 25.03.04 um 01:29 CET schrieb Dallman Ross
<dman(_at_)nomotek(_dot_)com>:
There are many approaches. [Some Workarounds]
I tried it and it works for me thanks. But what's if the statement
becomes more complex? My spamfilter is still work in progress and this
is propably not the final statement. I just can't believe that it's
not possible to use such an "or not" statement in a natural way.
But I gave you exactly that, Stefan! It was my final opus. :-)
You perhaps didn't notice the logic expressed in the reverse
De Morgan recipe set.
:0
* ! ^Blacklist: Yes
* ^Whitelist: Yes
{ }
:0 E
do_something
! Blacklist
OR
! Blacklist AND ! Whitlist
Is the same, thanks to De Morgan's law, as the negation of all of
! Blacklist
AND
Whitelist
That's why the first recipe sets the ANDed conditions, then gives a
final action of "nothing" (there must be a blank space between the
brackets). That recipe fails on the circumstance of the condition
set you want, so we descend to the Else statement and execute what
we wanted for them.
I'm now awake, and I tested it. :-) And it works.
If you really want OR-NOT, you can do it this way, but it seems
not nearly as elegant to me:
:0
* (^Blacklist: Yes| ! ^Whitelist: Yes)
do_something
--
dman
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail