[exim] Multiple ldap Condition Check

Top Page
Delete this message
Reply to this message
Author: Mark T. Valites
Date:  
To: exim-users
Subject: [exim] Multiple ldap Condition Check
I'm attempting to set up a router that will only accept email if the
local_part exists as a uid in two different ldap directories, but I can't
seem to get the syntax down quite right.

My router currently looks like this:

condition = "${if and {\
                         ${lookup ldap {ldap:///ou=<ou>,o=<o>?uid?sub?(uid=$local_part)}}\
                         ${lookup ldap {ldap://<2nd_ldap_server>/dc=<dc>,dc=<dc>,dc=<dc>?uid?sub?(uid=$local_part)}}\
                      }\
                {true}{false}\
              }"


(Apologies for the long lines)

The error I get for this condition is:

2005-02-10 13:40:16 failed to expand condition "${if and {${lookup ldap
{ldap:///ou=<ou>,o=<o>?uid?sub?(uid=$local_part)}}${lookup ldap
{ldap://<2nd_ldap_server>/dc=<dc>,dc=<dc>,dc=<dc>?uid?sub?(uid=$local_part)}}}{true}{false}}"
for router_name router: subcondition in {} expected inside "and{...}"
condition

I've tried a bunch of small modifications to the condition above, but all
have failed with the same messages as above, or one similar to this:

2005-02-10 13:46:52 failed to expand condition "${if and {${lookup ldap
{ldap:///ou=People,o=geneseo.edu?uid?sub?(uid=$local_part)}}${lookup ldap
{ldap://cs.geneseo.edu/dc=cs,dc=geneseo,dc=edu?uid?sub?(uid=$local_part)}}}{true}{false}}"
for cs_user router: subcondition in {} expected inside "and{...}"
condition

What am I missing here?

--
Mark T. Valites
Unix Systems Analyst
Computing & Information Technology
SUNY Geneseo
>--))> >--))>