Addition/OpenLDAP/Personal LDAP Address Book
From iRedMail
Revision as of 18:17, 13 February 2011 by ZhangHuangbin (Talk | contribs)
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 here):
| 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.
