procmail
[Top] [All Lists]

Re: boolean condition?

2002-01-10 02:50:46
At 08:45 2002-01-10 +0000, John Conover wrote:

How do you do a strict boolean condition? Something like

If var is set to the string 'true', or var is a non-empty string?

I use a flag that enables/disabled a number of testing recipes (scattered througought some filters - not stuff that can simply be tossed into a single include I can comment out or something), and it's quite simple:

# enable/disable the filters
SOMEFLAG=on

:0
* SOMEFLAG ?? on
* someother condition, etc

or, if you want to check for it being set AT ALL:

:0
* ! SOMEFLAG ?? ^^^^


---
 Sean B. Straw / Professional Software Engineering

 Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
 Please DO NOT carbon me on list replies.  I'll get my copy from the list.

_______________________________________________
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>