We're currently testing an exim configuration for our multi-visp
platform, and I'm having problems with the config file. Our setup is
such that we could have up to 100,000 local domains, and we want to
store them in our LDAP directory.
The DIT is set up so that all the domains are stored in objects
"cn=<domain>,ou=mailDomains,o=cwc", and each domain entry has the
attribute 'domainDITSearchBase' which contains the base DN for the local
parts of addresses for that domain. For example, for the domain
'myvisp.net', there will be an object
"cn=myvisp.net,ou=mailDomains,o=cwc" with
domainDITSearchBase="ou=users,ou=myvisp,ou=domains,o=cwc", under which
sit all the user objects. Still with me? :o)
I'm having (I think) two problems. The first is the local_domains
specified in the config file. Currently it is set to:
ldap;"ldap://ldapserv:30011/ou=mailDomains,o=cwc?commonName?one?(cn=$key)"
but this isn't working. Can someone please correct my syntax?
The second problem is a little more non-trivial. Because the search
base for the local part is itself contained in the DIT, I'm going to
need to do a nested lookup. Currently, the relevent director and
transport are set up as (Long lines will probably wrap badly):
visp_delivery:
driver = appendfile
directory = ${lookup ldap{ldap://ldapserv:30011/${lookup
ldap{ldap://ldapserv:30011/ou=mailDomains,o=cwc?domainDITSearchBase?one?(cn=$domain)}
{$value} fail}?mailboxLocation?one?(mail=$local_part@$domain)} {$value}
fail}
maildir_format = true
delivery_date_add
envelope_to_add
return_path_add
user = mail
group = mail
mode = 0660
(and)
visp_lookup:
driver = aliasfile
domains =
ldap;"ldap://ldapserv:30011/ou=mailDomains,o=cwc?commonName?one?(cn=$key)"
search_type = ldap
query = "ldap://ldapserv:30011/${lookup
ldap{ldap://ldapserv:30011/ou=mailDomains,o=cwc?domainDITSearchBase?one?(cn=$domain)}
{value} fail}?canonicalEmailAddress?one?(mail=$local_part@$domain)"
transport = visp_delivery
I'm having the same problem with the domains here as in local_domains
above, and I'm sure this is down to my poor syntax, but there's another
problem when I cheat and set the domains = myvisp.net:
I'm running a trace on the directory, and I can see it make the nested
query (base DN ou=mailDomains,o=cwc) and get back the correct result,
but it doesn't make the outermost query, and returns that the local part
I send it is unknown in that domain.
What I *think* is going on is that the DN returned as the value of the
domainDITSearchBase attribute is not in the correct format to be passed
into an ldap:// URL as a search base.
I apologise for the spammy nature of this mail. Any help greatly
appreciated.
Will
--
"I think the true test of a genius is the ability to see the follies of
one's own times. The ability to change one's own times is the true test
of a leader. And the ability to do both is the true test of a visionary
who will never be elected." - Marilyn vos Savant