1 Date: 25 Jul 2000 13:30:24 +0200
2 From: Oliver Seidel <seidel@in-medias-res.com>
6 my aim was to have an LDAP-driven system for mail delivery. My
7 configuration uses an LDAP directory structure that operates as
8 follows (sensitive parts replaced by "xxx"):
10 dn: dc=in medias res,dc=com
15 dn: ou=People,dc=in medias res,dc=com
18 objectclass: organizationalUnit
20 dn: uid=seidel,ou=People,dc=in medias res,dc=com
21 telephonenumber: 02166 9999 xxx
23 mailalias: Oliver.Seidel
26 objectclass: addressbook
28 objectclass: shadowaccount
29 objectclass: posixAccount
31 mailbox: /var/spool/mail/seidel
32 mail: os10000@in-medias-res.com
40 homedirectory: /home/seidel
42 userpassword: {crypt}xxx
44 This allows the use of the "MS Outlook" address book feature and
45 allows the delivery of email to local mailboxes, with ".forward"
48 My Exim Makefile in "$(EXIM)/Local/Makefile" differs from the original
49 in "$(EXIM)/src/EDITME" as follows:
51 ---------------------------------------------------------------------------
60 > LOOKUP_INCLUDE= -I/tmp/openldap/include
61 > LOOKUP_LIBS= -L/tmp/openldap/lib -lldap -llber
64 < # LDAP_LIB_TYPE=UMICHIGAN
66 > LDAP_LIB_TYPE=UMICHIGAN
68 < # SPOOL_DIRECTORY=/var/spool/exim
70 > SPOOL_DIRECTORY=/var/spool/exim
71 ---------------------------------------------------------------------------
73 Finally, after building and installing exim, I use a "directors
74 section" in the file "/usr/exim/configure" that contains the following
77 ---------------------------------------------------------------------------
81 query = "ldap://192.168.2.89:389/ou=People,dc=in%20medias%20res,dc=com?uid?one?(mailAlias=${local_part})"
82 new_director = ldap_forward
91 user = ${lookup ldap{ldap://192.168.2.89:389/uid=${local_part},ou=People,dc=in%20medias%20res,dc=com?uidnumber?base?}{$value}fail}
93 file_transport = address_file
94 pipe_transport = address_pipe
95 reply_transport = address_reply
100 query = "ldap://192.168.2.89:389/uid=${local_part},ou=People,dc=in%20medias%20res,dc=com?mailbox?base?"
101 user = ${lookup ldap{ldap://192.168.2.89:389/uid=${local_part},ou=People,dc=in%20medias%20res,dc=com?uidnumber?base?}{$value}fail}
103 file_transport = address_file
104 pipe_transport = address_pipe
108 new_address = maildump@in-medias-res.com
109 ---------------------------------------------------------------------------
111 The "ldap_aliases" director checks for entries of the form
112 "mailalias". This ensures that the names "os10000", "oslist" and
113 "Oliver.Seidel" from the above example are recognised. The difference
114 between this director and the others lies in the fact that it looks up
115 the entry "uid" (as can be seen between the "com?" and "?one".
117 The director "ldap_forward" performs the processing of "~/.forward"
118 files. It needs to look up the UNIX uid number.
120 The next entry handles direct delivery to the mailbox, and
122 the last director handles unknown addresses.
124 I hope I was of assistance and thanks to Philip for his software!