OpenLDAP data structure configured by iRedMail

This is a brief introduction of the OpenLDAP data structure 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, 5 are shipped by OpenLDAP, 1 shipped by Amavisd, one by iRedMail:

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
            |- ou=Groups
            |- ...
            |- ou=Users
                |- mail=postmaster@example.com
                |- mail=xxx
                |- ...

With this predictable structure:

If you don't use this structure: