Introduce the OpenLDAP server configured by iRedMail

This is a brief introduction of the OpenLDAP server configured by iRedMail. It may help a little if you want to migrate from/to other LDAP server.

LDAP schema files

iRedMail requires 7 LDAP schema files listed below (1-5 are shipped by OpenLDAP, no. 6 is shipped by Amavisd, no. 7 is shipped by iRedMail):

  1. core.schema
  2. corba.schema
  3. cosine.schema
  4. inetorgperson.schema
  5. nis.schema
  6. amavisd.schema (names are different on different linux/bsd distros)
  7. iredmail.schema

If you're migrating to other LDAP server, it must include them all, otherwise you may not be able to add or update mail accounts.

Data structure

OpenLDAP configured by iRedMail has hard-coded / predictable structure, and Postfix / Dovecot / iRedAPD /... are configured to query LDAP based on this structure.

dc=xx,dc=xx
    |- o=domains
        |- domainName=example.com
            |- ou=Aliases
                | mail=alias@example.com
                | ...
            |- ou=Groups
                | mail=list@example.com
                | ...
            ...
            |- ou=Users
                |- mail=postmaster@example.com
                |- mail=xxx
                |- ...

With this predictable structure:

If you don't use this structure: