[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

5.4 Boolean Operators

The following table lists the boolean operators that can be used in Anubis conditional expressions in the order of increasing binding strength:

As an example, let's consider the following statement:

 
if header[X-Mailer] "mutt" or header[X-Mailer] "mail" \
   and not header[Content-Type] "^multipart/mixed;.*"
   action
fi

In this case the action will be executed if the X-Mailer header contains the word `mutt'. The same action will also be executed if the X-Mailer header contains the word `mail' and the value of the Content-Type header does not begin with the string `multipart/mixed'.

Now, if we wished to execute the action for any message sent using mail or mutt whose Content-Type header does not begin with the string `multipart/mixed', we would write the following:

 
if (header[X-Mailer] "mutt" or header[X-Mailer] "mail") \
   and not header[Content-Type] "^multipart/mixed;.*"
   action
fi

Notice the use of parentheses to change the binding strength of the boolean operators.


This document was generated on May, 24 2014 using texi2html 1.76.