Re: [exim] problem with condition an lookup

Pàgina inicial
Delete this message
Reply to this message
Autor: Pascal Bourdais
Data:  
A: exim-users
Assumpte: Re: [exim] problem with condition an lookup
Le Tue, 1 Sep 2009 02:52:16 -0700,
Phil Pennock <exim-users@???> a écrit :

> On 2009-08-31 at 09:50 +0200, Pascal Bourdais wrote:


Hello,

Thank you for your answer,

> > 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}}
>


I already made this try :

exim -bem /tmp/test.eml '${if
   and {
      { ${lookup ldap {ldap:///ou=cer5372,dc=infagri,dc=laval?mail?sub?(mail=pbourdais@???)}{true}{false} } }
      { ! def:h_X-From71:}
   }
{true}{false}
}'
Return-path taken from "Return-path:" header line
Failed: condition name expected, but found "${lookup ldap {l" inside "and{...}" condition


and the error message is (quite) the same, that why i tried with an
extra brace.

I try without any braces around ${lookup and the message is

Failed: each subcondition inside an "and{...}" condition must be in its own {},

which conforms with the doc.

The aim is to test the availibity of a user (in the ldap base, i have a field which says that)

regards,

Pascal