[EXIM] help with 'and' in condition

Top Page
Delete this message
Reply to this message
Author: James FitzGibbon
Date:  
To: exim-users
Subject: [EXIM] help with 'and' in condition

I have been trying to get this to work for the past few days, but no
matter what I do I keep getting syntax errors back from exim. Hopefully
someone on the list will spot my probably obvious mistake:

I am trying to make the use of a director conditional on two things: that
the $local_part is all numeric and that a query-style lookup succeeds (not
returning a null string). This implies use of the 'and' operator, so I tried
this:


${if and{
    {match{$local_part}{^\\d+\$}}
    {def:${lookup ldapauth {$local_part:control} {$value} fail}}
} {1} {0} }


But in both test_expand and verification through exim, I get the message

Failed: unknown variable:

(it doesn't tell me what variable is unknown). The ldapauth lookup type is
once I wrote for our site, and the query is properly formatted, so that's
not the problem. I've made the 'and' syntax work on it's own by duplicating
the match condition twice, but as soon as I try to integrate the lookup, it
fails.

Any help is greatly appreciated.

--
j.

James FitzGibbon                                                james@???
System Engineer, ACC Global Net                   Voice/Fax (416)207-7171/7610



--
*** Exim information can be found at http://www.exim.org/ ***