Re: [exim] Combining conditions with and

Top Page
Delete this message
Reply to this message
Author: Tony Finch
Date:  
To: Alex Charrett
CC: exim-users
Subject: Re: [exim] Combining conditions with and
On Sun, 30 Jan 2005, Alex Charrett wrote:
>
> I'm having a bit of trouble with getting two conditions to work
> together.
>
> The two conditons I want to amalgamate both work OK when on their own in
> server_condition:
>
> server_condition = ${if saslauthd{{$2}{$3}}{1}{0}}
> server_condition = ${lookup{$2}lsearch{/etc/exim/auth_users}{1}{0}}


${lookup can't be used as an expansion condition, i.e. in the first
argument to ${if. So you have to put one test in the true branch of
the other. Also, don't be afraid to use spaces.

server_condition = ${lookup {$2} lsearch {/etc/exim/auth_users} \
                            {${if saslauthd{ {$2} {$3} } \
                                  {yes} {no} }} \
                            {no} }


Tony.
--
<fanf@???> <dot@???> http://dotat.at/ ${sg{\N${sg{\
N\}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}\
\N}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}