Addition/OpenLDAP/Personal LDAP Address Book
From iRedMail
(Difference between revisions)
(→Test) |
|||
| Line 2: | Line 2: | ||
= Summary = | = Summary = | ||
| + | Per-user personal LDAP address book allow user to store their personal contacts in LDAP instead of MySQL. | ||
= Configure OpenLDAP = | = 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: | ||
| + | {{cfg|slapd.conf|<pre> | ||
| + | access to attrs="userPassword,mailForwardingAddress" | ||
| + | </pre>}} | ||
| + | |||
| + | Then add below lines ABOVE it ('''NOTE''': You must replace '''dc=iredmail,dc=org''' by your own LDAP suffix here): | ||
| + | {{cfg|slapd.conf|<pre> | ||
| + | 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 | ||
| + | </pre>}} | ||
| + | |||
| + | The final result looks like below: | ||
| + | {{cfg|slapd.conf|<pre> | ||
| + | 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...] | ||
| + | </pre>}} | ||
| + | |||
| + | Restart OpenLDAP service to make it work. | ||
= Configure Roundcube Webmail = | = Configure Roundcube Webmail = | ||
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 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.
