
Connect Zimbra Sign-Ins to an External LDAP Directory
Configure per-domain LDAP authentication in Zimbra with a bind template or search filter, encrypted transport, and a test account before rollout.
To authenticate outbound mail from Zimbra, generate the domain’s DKIM key with zmdkimkeyutil, publish its public-key TXT record, add an SPF TXT record for every authorized sending service, and start DMARC with a monitoring policy. Finally, send a message to an external mailbox and confirm that a passing SPF or DKIM result aligns with the visible From domain.
Illustrative scenario, not a tested deployment: ExampleCorp uses example.com for employee email and operates Zimbra at mail.example.com. Its only direct outbound mail server is assigned the documentation-only public IP 192.0.2.25. The organization also controls DNS for example.com and has a working mailbox at dmarc-reports@example.com. Replace these sample values with verified details from your environment.
Before editing DNS, identify the public IP address that recipient servers see. On the Zimbra host, hostname -f and hostname -I help identify the machine, but a private interface address or NAT address is not necessarily the outbound source IP. Check your firewall, outbound gateway, or SMTP relay configuration instead of assuming the host’s interface address will appear to recipients.

For ExampleCorp, the sending path is Zimbra directly to the internet from 192.0.2.25. If an outbound security gateway or cloud relay sends the final SMTP connection, use that service’s approved SPF mechanism or public IP instead. List website notification services, CRM tools, newsletters, and any other systems that send using the same domain.
zimbra account.DKIM signs outgoing messages with a private key and lets recipients retrieve the matching public key from DNS. Zimbra documents DKIM signing using zmdkimkeyutil on an MTA server. Run the following as the zimbra operating-system user for a domain that does not already have a DKIM configuration:
su - zimbra
/opt/zimbra/libexec/zmdkimkeyutil -a -d example.com

The command writes the signing data to Zimbra’s LDAP configuration and prints the DNS selector and public TXT record. The exact selector is generated by your installation; it is not a fixed string such as zimbra2026 shown in a sample screen. Copy the actual selector and complete public key from the command output. Never publish or share the private key.
Create one DNS TXT record at SELECTOR._domainkey.example.com, replacing SELECTOR with the returned value. Its content begins with v=DKIM1; k=rsa; p= and continues with the complete public-key material. DNS control panels usually ask for a relative host such as SELECTOR._domainkey; some ask for the full name. Avoid entering the domain twice.

For long 2048-bit public keys, a DNS provider may split one TXT record into multiple quoted strings. That is acceptable when the strings belong to one TXT resource record and concatenate into the original value. Do not publish separate competing DKIM TXT records at the same selector. Zimbra’s official DKIM signing instructions document the add, query, update, and DNS verification commands. Use the documented -u operation only when intentionally rotating an existing key; leave the old selector record available long enough for already-sent mail to verify.
SPF identifies which servers can send mail using the SMTP envelope domain. ExampleCorp sends directly from the one documentation IP, so it can publish this TXT value at example.com (often represented by @ in a DNS editor):
v=spf1 ip4:192.0.2.25 ~all

ip4: authorizes that address, while ~all gives a soft-fail result for other senders. It is a reasonable initial choice while inventorying senders; -all asserts a harder failure for unmatched sources and should follow a complete audit. If a legitimate provider also sends for ExampleCorp, merge its officially documented include: mechanism or other supported authorization into the same SPF record. Never create multiple independent v=spf1 TXT records for one hostname.
SPF has a limit of ten DNS-lookup-causing mechanisms and modifiers during evaluation, not simply ten include: entries. Exceeding it produces a permanent error. IP literals do not consume that lookup budget. See RFC 7208, Sender Policy Framework, and Google’s SPF setup guidance for sender inventory and DNS publication details.
DMARC checks whether a passing DKIM signature domain or SPF-authenticated envelope domain aligns with the address people see in the message’s From: header. One aligned passing mechanism is enough for DMARC to pass; SPF and DKIM do not both have to pass every message. ExampleCorp starts with this TXT record:
| DNS field | Example value |
|---|---|
| Type | TXT |
| Host | _dmarc |
| Value | v=DMARC1; p=none; rua=mailto:dmarc-reports@example.com |
The p=none policy requests monitoring without asking receivers to quarantine or reject failed messages. The rua mailbox must exist and be able to accept aggregate reports; reports may arrive with a delay and are not guaranteed from every receiver. If reports go to a different organizational domain, extra destination authorization may be required. After you identify and fix legitimate senders that fail alignment, gradually consider p=quarantine and then p=reject, based on real results rather than a fixed waiting period.
Do not confuse SPF authorization with DMARC alignment. A bulk-mail service can pass SPF using its own envelope domain but still fail DMARC for From: employee@example.com unless it offers aligned DKIM signing or a custom aligned return-path domain. The rules and policy tags are defined in RFC 7489, DMARC.
Wait until the authoritative DNS service has accepted the records. From a machine with dig, query the public TXT answers. Replace SELECTOR with the actual DKIM selector reported by Zimbra:
dig +short TXT example.com
dig +short TXT SELECTOR._domainkey.example.com
dig +short TXT _dmarc.example.com
Check that you receive exactly one SPF policy at the sending domain, a complete DKIM public key at the intended selector, and the expected DMARC policy. If the new TXT record does not appear, inspect the authoritative nameservers and DNS panel’s handling of relative names; recursive resolver caches may take time to refresh. If your installation includes OpenDKIM’s test utility, Zimbra documents a further check using /opt/zimbra/common/sbin/opendkim-testkey with your domain, selector, and /opt/zimbra/conf/opendkim.conf.
Then send a normal message directly from user@example.com to an external account such as Gmail. Inspect the message’s original headers or authentication details and look for results such as dkim=pass, spf=pass, and dmarc=pass. Verify that the DKIM d= domain or SPF-authenticated domain aligns with example.com; a result shown as pass for an unrelated domain may not satisfy DMARC. Google documents these requirements in its Gmail sender guidelines.
If DKIM fails, compare the DNS selector against the message’s DKIM-Signature header and make sure a relay is not modifying signed content. If SPF fails, confirm the observed outbound IP, the envelope sender domain, and the complete sender inventory. If both pass but DMARC fails, investigate domain alignment rather than publishing a second SPF record. Passing these checks confirms authentication for that sample message; it does not guarantee inbox placement, which also depends on reputation and other sender requirements.

Configure per-domain LDAP authentication in Zimbra with a bind template or search filter, encrypted transport, and a test account before rollout.

Configure every Zimbra Proxy host to redirect webmail traffic to HTTPS, restart Nginx, and verify the redirect and certificate safely.

Set the GAL polling interval for a Zimbra domain, run an immediate sync, and verify updates without confusing directory lookup with address-book synchronization.

Diagnose a Zimbra LDAP boot failure by checking slapd, startup logs, disk space, TLS permissions, and host connectivity before restarting dependent services.

Trace Zimbra TLS handshake failures to LDAP certificates, trusted CA chains, or SMTP port settings, then verify the repair without disabling encryption.

Place local rules in Zimbra’s supported directory, validate them before reload, then test their score on a controlled message.

Choose the right Zimbra export: save mailbox messages as EML in a ZIP archive, or create a PST from a fully synced Outlook profile.

The hook lands in two seconds flat. Comments are full of "Who made this?" Then someone asks, "Can we just do that?" Most brands go one of two ways here, both wrong.

Check the right in-place, rolling, or NG migration path, prepare backups and licensing, and verify each Zimbra server after upgrading to Daffodil 10.1.