Re: [exim] Help to logical OR two conditions

Góra strony
Delete this message
Reply to this message
Autor: Cyborg
Data:  
Dla: exim-users
Temat: Re: [exim] Help to logical OR two conditions
Am 01.10.20 um 09:59 schrieb Victor Sudakov via Exim-users:
>
>> accept  condition  = ${if or{\
>>                                { and{ {CONDITION 1}{CONDITION 2} }}\
>>                                { CONDITION 3 }\
>>                               } {1}}
> So, for my case it should look like this, right )(copied verbatim from my test config):
>
>   accept condition =  ${if or{\
>                       ${lookup{$local_part@$domain}lsearch{/etc/dovecot/aliases}{yes}} \
>                       ${lookup{$local_part@$domain}lsearch{/etc/dovecot/users}{yes}} \
>                       } {yes}}

>
>
> Does not work however:
> failed to expand ACL string "${if or{${lookup{$local_part@$domain}lsearch{/etc/dovecot/aliases}{yes}} ${lookup{$local_part@$domain}lsearch{/etc/dovecot/users}{yes}} } {yes}}": each subcondition inside an "or{...}" condition must be in its own {}
>
>
> What am I doing wrong?
>
>

I cant explain it better than the error message already does :

each subcondition inside an "or{...}" condition must be in its own {}


means:

  accept condition =  ${if or{\
                      *{*${lookup{$local_part@$domain}lsearch{/etc/dovecot/aliases}{yes}}*}* \
                      *{*${lookup{$local_part@$domain}lsearch{/etc/dovecot/users}{yes}}*}* \
                      } {yes}}



best regards,
Marius