Re: [Exim] Exim and OpenLDAP Configuration

Top Page
Delete this message
Reply to this message
Author: Barry Pederson
Date:  
To: exim-users@exim.org
Subject: Re: [Exim] Exim and OpenLDAP Configuration
Dan Fitzpatrick wrote:
>
> Does anyone know of a detailed tutorial on integrating Exim with
> OpenLDAP? If not, do you have any experiences you would like to share?
>
> I have Exim and OpenLDAP running but I can't find details on getting
> them to communicate. Both applications are new to me.
>
> A few questions:
>
> 1. What changes have to be made to the ldap schema? (What attributes
> does Exim require?)


Exim doesn't require any attributes in particular - it's pretty
generic. You specify within your queries what attributes to look for or
return.



> 2. How do you configure multiple domains in ldap so Exim will accept
> mail for them?


You wouldn't have to really do anything "in ldap" other than setup the
entries you want. The exim configuration would control what gets
accepted and when to check ldap for forwarding and such.



> 3. How does .forward functionality work with ldap data?


Assuming your LDAP entries had "mail" attributes, and the forwarding
info was in an attribute named "mailforwardingaddress" (the way Netscape
Directory server is setup), something like:


cn=Bob Smith, o=Foo, c=US
mail: bob@???
mailforwardingaddress: bsmith@???

you could put something like this in as an Exim director:

-----------
ldap_forward:
  driver = aliasfile
  domains = foo.com
  search_type = ldap
  query = "ldap:///o=Foo, \
           c=US?mailforwardingaddress?sub?(mail=$local_part@$domain)"
-----------


Then mail addressed to bob@??? would be forwarded to bsmith@???
instead. (This is also assuming you have "local_domains = foo.com" and
"ldap_default_servers = " in your main configuration settings)

    Barry