Re: [exim] problem with condition an lookup

Top Page
Delete this message
Reply to this message
Author: Phil Pennock
Date:  
To: Pascal Bourdais
CC: exim-users
Subject: Re: [exim] problem with condition an lookup
On 2009-08-31 at 09:50 +0200, Pascal Bourdais wrote:
> exim -bem /tmp/test.eml '${if
> >    and {
> >       { { ${lookup ldap {ldap:///ou=cer5372,dc=infagri,dc=laval?mail?sub?(&(employeeType=actif:1)(mail=pbourdais@???))}{true}{false} } } }
> >       { ! def:h_X-From71:}
> >    }
> > {true}{false}
> > }'
> Failed: condition name expected, but found "{ ${lookup ldap " inside
> "and{...}" condition

>
>
> But the result is not what i expected.


You can't just freely add {...} braces wherever you like. They have
structural meaning.

${if and{{COND1}{COND2}{COND3}} {true-branch}{false-branch}}

You have an extra set of braces around your ${lookup...} -- that's what
the error message says. You have:
${if and{{{COND1}}{COND2}} {true-branch}{false-branch}}

Regards,
-Phil