Re: [Exim] Re: Multi level if-and statements

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: support
CC: exim-users
Subject: Re: [Exim] Re: Multi level if-and statements
On Fri, 27 Jun 2003 support@??? wrote:

> Since there has been no response, is this currently possible in exim 4 (im using
> 4.20)? I'm not looking for someone to solve my problem, just looking for an
> example of a condition statement with 3 conditions (currently 2 works fine, but I
> have yet to figure out 3).


No time to answer fully, but just add another condition:

  ${if and {
           {cond1}
           {cond1}
           {cond3}
           ...
           }
           {truestring}{falsestring}}


> I started with:
> condition = ${if and {{!def:header_X-GForce-Host-Number:}{!eq {$localhost_number}
> {2}}} {yes}{no}}
>
> Which works, but I need to add another condition to verify that the user is a local
> user.  I ended up with:
> condition = ${if and {\
>        {${if and {{!def:header_X-GForce-Host-Number:}{!eq


No, no, you don't need anothe "if", just another condition.


condition = ${if and {
        {!def:header_X-GForce-Host-Number:}
        {!eq {$localhost_number}{2}}


       ==> Just add the next condition here (with suitable \ continuations)


        } {yes}{no}}


--
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.
Get the Exim 4 book:    http://www.uit.co.uk/exim-book