Addition/OpenLDAP/Personal LDAP Address Book
From iRedMail
(Difference between revisions)
(→Configure OpenLDAP) |
|||
| Line 16: | Line 16: | ||
</pre>}} | </pre>}} | ||
| - | Then add below lines ABOVE it ('''NOTE''': You must replace '''dc=iredmail,dc=org''' by your own LDAP suffix | + | Then add below lines ABOVE it ('''NOTE''': You must replace '''dc=iredmail,dc=org''' by your own LDAP suffix below): |
{{cfg|slapd.conf|<pre> | {{cfg|slapd.conf|<pre> | ||
access to dn.regex="cn=[^,]+,mail=([^,]+)@([^,]+),ou=Users,domainName=([^,]+),o=domains,dc=iredmail,dc=org$" | access to dn.regex="cn=[^,]+,mail=([^,]+)@([^,]+),ou=Users,domainName=([^,]+),o=domains,dc=iredmail,dc=org$" | ||
Revision as of 18:17, 13 February 2011
Contents |
Summary
Per-user personal LDAP address book allow user to store their personal contacts in LDAP instead of MySQL.
Configure OpenLDAP
Open OpenLDAP config file slapd.conf, it could be one of below:
- RHEL/CentOS/OpenSuSE: /etc/openldap/slapd.conf
- Debian/Ubuntu: /etc/ldap/slapd.conf
- FreeBSD: /usr/local/etc/openldap/slapd.conf
Find this line:
| File: slapd.conf |
access to attrs="userPassword,mailForwardingAddress" |
Then add below lines ABOVE it (NOTE: You must replace dc=iredmail,dc=org by your own LDAP suffix below):
| File: slapd.conf |
access to dn.regex="cn=[^,]+,mail=([^,]+)@([^,]+),ou=Users,domainName=([^,]+),o=domains,dc=iredmail,dc=org$"
by anonymous none
by self none
by dn.exact="cn=vmail,dc=iredmail,dc=org" read
by dn.exact="cn=vmailadmin,dc=iredmail,dc=org" write
by dn.regex="mail=$1@$2,ou=Users,domainName=$3,o=domains,dc=iredmail,dc=org$" write
by users none
|
The final result looks like below:
| File: slapd.conf |
access to dn.regex="cn=[^,]+,mail=([^,]+)@([^,]+),ou=Users,domainName=([^,]+),o=domains,dc=iredmail,dc=org$"
by anonymous none
by self none
by dn.exact="cn=vmail,dc=iredmail,dc=org" read
by dn.exact="cn=vmailadmin,dc=iredmail,dc=org" write
by dn.regex="mail=$1@$2,ou=Users,domainName=$3,o=domains,dc=iredmail,dc=org$" write
by users none
access to attrs="userPassword,mailForwardingAddress"
[...SKIP OTHER LINES HERE...]
|
Restart OpenLDAP service to make it work.
