Re: [exim] Concatenating condtions

Top Page
Delete this message
Reply to this message
Author: Jasen Betts
Date:  
To: exim-users
Subject: Re: [exim] Concatenating condtions
On 2013-08-24, soumya tr <soumya.324@???> wrote:
> Hi,
>
> How can I concatenate the below 2 conditions with an 'or'
>
>
> condition = ${lookup {${sg{${extract{2}{@}{$h_from:}}}{>| .*}{}}} lsearch
> {/etc/exim/exim-blacklisted-senders} {1}{0}}
> condition = ${lookup {$authenticated_id} lsearch
> {/etc/exim/exim-blacklisted-senders} {1}{0}}
>
> I tried,
>
> ${if and{{${lookup {${sg{${extract{2}{@}{abc@???}}}{>| .*}{}}}
> lsearch {/etc/exim/exim-blacklisted-senders} {1}{0}}} {${lookup {directi}
> lsearch {/etc/exim/exim-blacklisted-senders} {1}{0}}}} {1}{0}}


why did you use 'and' if you want an 'or'

> but its generating error :(
>
> Please assist


Assuming you want 'or'
the easiest way to combine those using or is to put the second lookup in the
failure value of the first, {if ...} works with conditions which lookups
aren't


   condition = ${lookup {${sg{${extract{2}{@}{$h_from:}}}{>| .*}{}}} lsearch
 {/etc/exim/exim-blacklisted-senders}
     {1}{${lookup {$authenticated_id} lsearch{/etc/exim/exim-blacklisted-senders} {1}{0}}}}


--
⚂⚃ 100% natural