Connect Zimbra Sign-Ins to an External LDAP Directory

Configure external LDAP authentication on the Zimbra domain whose users should sign in with directory credentials. Set the domain’s authentication mechanism to ldap, provide the LDAP URL, and map each Zimbra account to an external bind DN with a template; use a search filter and service bind only when usernames cannot be mapped directly. Zimbra accounts still need to exist in Zimbra’s own directory unless you separately configure account auto-provisioning.

Choose the account-matching method

Zimbra validates the submitted password by binding to the external directory. The account must resolve to a valid DN there, and its Zimbra account name must map to the right directory user. Decide how that DN will be found before changing the domain.

MethodUse it whenWhat to configure
Bind DN templateThe login name has a predictable relationship to the LDAP DN or user principal name.zimbraAuthLdapBindDn with variables such as %u or %n.
Search filterThe DN cannot be derived from the Zimbra login name.A search base, filter, and restricted search-bind account plus password.
Per-account external DNA small number of accounts need individual mappings.zimbraAuthLdapExternalDn on each affected account.

Zimbra’s current Administrator Guide states that external LDAP and external Active Directory authentication validate passwords against the external directory, while Zimbra LDAP continues to support the rest of Zimbra’s account and service data. This is authentication, not directory synchronization. If you need new users created automatically, treat auto-provisioning as a separate configuration task.

A dark administration form with a navigation column, dropdown fields, text fields, and an enabled toggle
Start with the target Zimbra domain and confirm which authentication method it should use.

Prepare the directory endpoint and TLS

Before configuring Zimbra, collect the external LDAP hostname, port, user attribute or DN pattern, and the search base if you will use a filter. Confirm that the Zimbra mailbox servers can resolve and reach that hostname. Use an encrypted connection: Zimbra documents ldaps:// for SSL/TLS LDAP and requires the directory server’s certificate to be trusted. For LDAPS, a common endpoint format is ldaps://ldap.example.net:636. If your directory requires StartTLS on port 389, verify the supported Zimbra attribute and trust setup for your installed release before enabling it; do not assume that a plain ldap:// connection encrypts passwords.

For a self-signed or private-CA certificate, install the issuing certificate in the trust store used by the Zimbra Java service, following Zimbra’s release-specific LDAP TLS instructions. An untrusted or expired certificate can make authentication fail even when the host and credentials are correct.

An administration form with several server-setting rows and two toggle controls
Enter the external directory endpoint and select a TLS mode supported by its certificate and Zimbra version.

Set the domain authentication attributes

You can use the Administration Console’s domain authentication configuration workflow or set the domain attributes with zmprov. In the console, select the domain, open its authentication configuration, choose external LDAP, and enter the server URL and mapping information. Exact wizard labels can vary by Zimbra release; test the configuration in the wizard before applying it broadly.

For a direct bind-DN template, an OpenLDAP-style example is:

su - zimbra
zmprov md example.com \
  zimbraAuthMech ldap \
  zimbraAuthLdapURL ldaps://ldap.example.net:636 \
  zimbraAuthLdapBindDn 'uid=%u,ou=people,dc=example,dc=net'

Replace the domain, hostname, and directory path with values from your environment. Zimbra documents %u as the username without its @ portion, %n as the supplied username including @ when present, %d as the email domain, and %D as that domain formatted as LDAP components. For Active Directory, an account may instead bind with a user principal name such as %u@ad.example.net; choose the format your directory accepts.

An administration form with a large text area and two masked credential fields
When a DN template cannot identify users, configure a scoped search base and a least-privilege search account.

When the directory requires a search

If the external DN varies, configure zimbraAuthLdapSearchBase, zimbraAuthLdapSearchFilter, zimbraAuthLdapSearchBindDn, and zimbraAuthLdapSearchBindPassword. The filter should return one user entry, not multiple matches. For example, if the directory’s mail attribute matches the Zimbra address, a filter can use (&(mail=%n)(objectClass=person)). Adapt the object class and attribute to your directory schema. The search-bind account needs only permission to search the required user subtree.

Because the search-bind password is a credential, do not place a real password in a shared script, ticket, or article example. Restrict administrative access and use the Administration Console or your organization’s approved secret-handling process when entering it. Test the filter with a known account in the external directory before applying it to the production domain.

Test login and check the fallback behavior

Test with a regular, non-administrator account that already exists in both directories. First validate the settings with the console’s authentication test if available, then sign in to the Zimbra web client with the test account and its external directory password. Also test a known invalid password; it should fail. Confirm that the Zimbra account address maps to the expected LDAP user and that unrelated domains still use their existing authentication method.

Review zimbraAuthFallbackToLocal before rollout. When enabled, Zimbra can fall back to its local authentication if external authentication returns an error. That behavior may help preserve access during an LDAP outage, but it can also allow a locally stored Zimbra password to authenticate. Decide whether that is acceptable for your security policy and verify the attribute’s current value for the domain rather than assuming its default.

An administration test form with two input fields, a blue action button, and a results panel
Use a test account and inspect the authentication result before enabling the change for all users.

Quick verification checklist

  • zimbraAuthMech is set to ldap on the intended Zimbra domain.
  • The LDAP URL uses the correct hostname and encrypted transport; its certificate is trusted.
  • The bind-DN template resolves to the correct user, or the search filter returns exactly one DN.
  • The account exists in Zimbra and the external directory, unless separate auto-provisioning is configured.
  • A test user can sign in with the directory password, while an incorrect password is rejected.
  • Fallback behavior and the effect of an LDAP outage match your access policy.

For version-specific details, see the Zimbra Collaboration Administrator Guide, Zimbra’s external Active Directory authentication procedure, its LDAP authentication reference, and the maintained external LDAP authentication notes.

Leave a Comment

How to