Sometimes you need to combine two or more LDAP directories with same suffixes to one directory or you just need to have a proxy. My first attempts to combine two OpenLDAP directories was to make replication from two different sources. This solution however has some disadvantages. First of all: to have syncprov replication your environment must be uniform, this means all source servers and proxy needs to be OpenLDAP. Second: I observed that this is not so stable, because of mentioned earlier issues with OpenLDAP replication.
LDAP
Unique attributes in OpenDJ
Sometimes you need to set some attributes as unique, for example: if LDAP contains system users, then uid attribute shouldn’t repeat in whole system.
OpenDJ is equipped with proper plugin, but it’s not enabled by default. In case of mail system, attribute mail should be unique. Here we don’t have ready to use plugin, but we can easily create it basing on UID Unique Attribute and this description and this one.
But I didn’t make this post to send you to other pages. I would like to show you how to add Plugin with dsconfig and how to copy it to replica with LDIF export/import.
Mail delivery configuration with LDAP
Last time I wrote about users’ authentication in LDAP directory to allow them receiving and sending e-mails. Now is time to configure Postfix for mail delivery to appropriate mailboxes.
If you compile Postfix themselves, you need to remember to add support for LDAP. My description is based on Ubuntu, so I only need to install postfix-ldap package:
$ sudo -i # apt-get install postfix-ldap
This will add support for ldap: maps in Postfix.
Now we go to Postfix configuration:
# cd /etc/postfix # vi main.cf