procmail
[Top] [All Lists]

Re: (il)logical algebra

2004-03-25 03:58:27
Stefan Heinrichsen wrote:

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.
Regular expressions generally define matching patterns and have no concept of negation, the negation using ! is a procmail extension and applies to the whole expression, so you cannot do

   * patternA| !patternB

However, A or not B is equivalent to not (not A and B), so instead of writing

   :0
   * A | !B
   delivery

you can write

   :0
   * !A
   * B
   {}

   :0 E
   delivery

Hope that helps

--
Klaus Johannes Rusch
KlausRusch(_at_)atmedia(_dot_)net
http://www.atmedia.net/KlausRusch/



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

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