Re: [exim] Multiple ldap Condition Check

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Tony Finch
Data:  
Para: Mark T. Valites
CC: exim-users
Asunto: Re: [exim] Multiple ldap Condition Check
On Fri, 11 Feb 2005, Mark T. Valites wrote:
>
> Hmmm. With that in mind, how would I combine a lookup with a regular
> condition - is the (then/else)/and still required?


Expansion conditions can only be used with ${if. You can construct AND and
OR logic out of any expansion items that have then and else branches,
including ${if, ${lookup, ${extract, in any combination.

> condition = ${lookup ldap {ldap:///ou=<ou>,o=<o>?uid?sub?(uid=$local_part)}{true}{false}}
> condition = ${if eq {$h_X-Header:}{YES}{no}{yes}}


condition = ${lookup ldap {ldap:///ou=<ou>,o=<o>?uid?sub?(uid=$local_part)} \
                     {${if !eq{$h_X-Header:}{YES} \
                           {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}}