summaryrefslogtreecommitdiff
path: root/README.ldap-support
blob: 080467766ce73856f590508ae9fee66cc41640c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
LDAP support for warnquota by James Bourne <jbourne@hardrock.org>

The LDAP support added to warnquota allows you to retreive mail routing
information from an LDAP server so that you can send mail to the correct
addresses.  So for example if usera has the email address usera@foo.bar.com
and userb has userb@baz.bar.com you can have the attributes as follows
(obvious things missing here):

dn: uid=usera,ou=People,dc=bar,dc=com
uid: usera
mail: usera@foo.bar.com

dn: uid=userb,ou=People,dc=bar,dc=com
uid: userb
mail: userb@baz.bar.com

warnquota.conf should be set like this (if you allow anonymous binds and
reads of the mail attribute:

LDAP_MAIL = true
LDAP_HOST = ldap.bar.com
LDAP_PORT = 389
LDAP_BASEDN = ou=People,dc=bar,dc=com
LDAP_SEARCH_ATTRIBUTE = uid
LDAP_MAIL_ATTRIBUTE = mail
LDAP_DEFAULT_MAIL_DOMAIN = bar.com

If not, just add:

LDAP_BINDDN = uid=readonly,dc=bar,dc=com
LDAP_BINDPW = it'sapasswd

and you will bind as the user readonly and search that way.

If you need to do lookups using a different attribute (Novell eDir for
example uses cn=username) change the LDAP_SEARCH_ATTRIBUTE to cn.  

Same with LDAP_MAIL_ATTRIBUTE.  If you use mail routing in LDAP (roughly
following the Laser Draft) you can set this to mailLocalAddress and
warnquota will send to that address.  This will guarentee that your quota
mail will be delivered to the correct address.