summaryrefslogtreecommitdiff
path: root/doc/README.ldap
blob: 80293de50e9a1142a151fe26bcf62145256c827f (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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148


Dbmail-2 as of 2.1.0 supports ldap for authentication and delivery information.


NOTICE:

If you have an existing userbase in sql that you which to migrate to ldap-auth, you 
must make sure that the uidNumber in ldap is the same as the dbmail_users.user_idnr 
in sql. If your tables are in MySQL/innoDB or PostgreSQL, and you have a proper cascade 
setup for the foreign key in dbmail_mailboxes like:

 CONSTRAINT dbmail_mailboxes_ibfk_1 FOREIGN KEY (owner_idnr) 
  REFERENCES dbmail_users (user_idnr) 
  ON DELETE CASCADE ON UPDATE CASCADE

you should be able to issue simple UPDATE statements to reset the user_idnr values in sql.



LDAP-SCHEMA:

I'm providing an example dbmail.schema file that should get you started. 



CONFIGURATION:

dbmail.conf contains some new ldap items:
 
---

"BIND_DN"

This is the Distinguished Name of the user who has read and write access to the LDAP
server.

	example: BIND_DN=cn=admin,dc=mydomain,dc=com


"BIND_PW"

The plain text password of the account above.

	example: BIND_PW=password


"BASE_DN"

The root or starting point from which searches will be conducted. All searches
use the SCOPE option to search everything in this base and below.

	example: BASE_DN=ou=People,dc=mydomain,dc=com


"PORT"

The port number that the LDAP server is listerning on. By default, 389 for
insecure and 636 for secure, however secure LDAP is currently unsupported.

	example: PORT=389


"HOSTNAME"

The hostname of the LDAP server. May be an IP address.

	example: HOSTNAME=ldap


"SCOPE"

The search scope for ldap searches.

	example: SCOPE=SubTree


"USER_OBJECTCLASS"

The object class to use as a search filter for users.

	example: USER_OBJECTCLASS=top,account,dbmailUser


"FIELD_UID"

The field which contains the user login name of the user. Required.

	example: FIELD_UID=uid


	example: CN_STRING=uid
	

"FIELD_QUOTA"

The field which contains the quota, in bytes, of the user. Not required.

	example: FIELD_QUOTA=mailQuota


"FIELD_PASSWD"

The field which contains the password of the user. Not implemented.

	example: FIELD_PASSWD=userPassword


"FIELD_MAIL"

The field which contains the primary email address of the user. Required.

	example: FIELD_MAIL=mail


"FIELD_NID"

The field which contains the user id number of the user. Required.

	example: FIELD_NID=uidNumber

	example: MIN_NID=10000
	example: MAX_NID=15000


"FIELD_CID"

The field which contains the group id number of the user. Not required.

	example: FIELD_CID=gidNumber


	example: MIN_CID=10000
	example: MAX_CID=15000


"FORW_OBJECTCLASS"

	example: FORW_OBJECTCLASS=top,account,dbmailForwardingAddress
	

"FIELD_FWDTARGET"

The field which contains a destination email address for forwarding mail.

	example: FIELD_FWDTARGET=mailForwardingAddress