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

>I already made this try :

>exim -bem /tmp/test.eml '${if
>  and {
>      { ${lookup ldap
{ldap:///ou=cer5372,dc=infagri,dc=laval?mail?sub?([email protected])}{
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
>

You have bracket in wrong position. You have 
        and { _${lookup ldap{ldap...}_{true}{false}}}
I have underlined the and{} condition - as you can see, you haven't closed
the ${lookup} section, only ldap{} one.
That should look like 
{ ${lookup ldap
{ldap:///ou=cer5372,dc=infagri,dc=laval?mail?sub?([email protected])}}
{true}{false} }

Give it a try.

> 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


--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


-- 
## List details at http://lists.exim.org/mailman/listinfo/exim-users 
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

Reply via email to