The message Unable to start TLS: SSL handshake failed means a client and server could not complete the negotiation that starts an encrypted connection. In Zimbra, the message can come from different places. A frequent variation appears during zmcontrol status and says the connection to the LDAP master failed certificate verification. A mail client or an SMTP relay can also report a handshake problem on a public mail port.
The fix depends on which connection failed. Start by identifying the service and hostname in the surrounding log lines. Then check the certificate, its issuing chain, the system clock, and the TLS endpoint. Avoid disabling TLS as a first response: that can hide the symptom while weakening or breaking internal mail-server communication.
What to know before changing anything
TLS is the protocol that encrypts a network connection. A TLS handshake is the initial exchange in which the two systems agree on encryption parameters and validate the server certificate. STARTTLS begins as a plain protocol connection, then switches to TLS when both sides request it. LDAP and SMTP can both use STARTTLS, so this error alone does not identify the failing service.
Before running repair commands, record the Zimbra version, whether the installation is single-node or multi-node, the exact command or client that shows the error, and the complete log line around it. Schedule certificate deployment or service restarts during a maintenance window. Keep a backup of certificate files and configuration before editing them.
- Run administrative commands as the account and with the permissions required by your Zimbra release.
- Do not paste private keys, passwords, or unredacted mail logs into tickets or public forums.
- Do not change LDAP security flags or protocol settings until you know which endpoint failed and have checked its certificate.
Step 1: Identify the failing TLS connection
First reproduce the problem and read the full message. If it appears when Zimbra checks service status and includes wording such as when connecting to ldap master, investigate internal LDAP TLS. If only a mail client fails on SMTP submission, investigate the public SMTP endpoint and the client’s hostname, port, and encryption mode.
su - zimbra
zmcontrol status
Review recent Zimbra log entries for the same timestamp. On many installations, the main log is /var/log/zimbra.log; use the log location configured on your server.
grep -Ei 'Unable to start TLS|SSL handshake|certificate|ldap|STARTTLS' /var/log/zimbra.log | tail -n 80
Look for the process name, remote host, port, and any more specific OpenSSL detail such as certificate verification failure, expired certificate, unknown issuer, or protocol alert. Those details separate a certificate-trust problem from a network or protocol mismatch.
For an internal LDAP error, check which LDAP hosts this server is configured to use. Query the local configuration keys individually and compare their hostnames with DNS and the server certificate:
zmlocalconfig ldap_url
zmlocalconfig ldap_master_url
zmlocalconfig ldap_starttls_supported
zmlocalconfig ldap_starttls_required
Key availability and output can vary by Zimbra version and node role. These are diagnostic reads; do not change a value just because it appears in the output. Zimbra’s documentation describes the role of the LDAP STARTTLS settings and recommends keeping internal TLS enabled: Zimbra TLS and STARTTLS local configuration values.
Step 2: Check the system clock, DNS, and reachability
Certificate validation depends on the server’s clock. If the clock is far behind or ahead, a valid certificate can appear not yet valid or expired. Confirm the time on the Zimbra host and on any LDAP master or replica involved in the connection.
date -u
getent hosts ldap.example.com
Replace ldap.example.com with the LDAP hostname found in the configuration or log. Confirm that it resolves to the expected server address and that the configured LDAP port is reachable through the host firewall and network. In multi-node installations, test from the Zimbra node that logged the failure to the actual LDAP node—not only from your workstation.
For a client-facing SMTP STARTTLS connection, Zimbra’s SMTP troubleshooting guide demonstrates testing port 25 with OpenSSL. Port 587 is also commonly used for message submission with STARTTLS. Use the hostname and port configured in the mail client:
openssl s_client -starttls smtp -connect mail.example.com:587 -servername mail.example.com -showcerts
For SMTP on port 25, replace 587 with 25. Port 465 uses implicit TLS, so do not add -starttls smtp when testing that port. A successful TCP connection does not by itself prove that the certificate is trusted or that the client is using the right security mode. See Zimbra’s SMTP and OpenSSL troubleshooting guide.
Step 3: Inspect the certificate Zimbra actually deployed
A certificate is a signed identity document for a server. The certificate must be valid for the hostname clients use, be within its validity dates, and chain to a certificate authority the connecting component trusts. A certificate can look correct in a browser while a different certificate is deployed on LDAP, Postfix, or a proxy node.
As the Zimbra administrator, view the certificate Zimbra reports as deployed:
/opt/zimbra/bin/zmcertmgr viewdeployedcrt
Check each listed certificate’s subject or Subject Alternative Name (SAN), issuer, expiration date, and services. The SAN should contain the host name actually used for the LDAP or mail connection. Also check that all nodes in a multi-server deployment have the expected certificate and chain. Zimbra notes that deployed-certificate viewing is local to the server, so run the check on each relevant node.
If you have the source certificate files, inspect their dates and names before deployment:
openssl x509 -in /tmp/commercial.crt -noout -dates -subject -issuer -ext subjectAltName
Replace the example path with the certificate file you are evaluating. A missing SAN, expired leaf or intermediate certificate, wrong hostname, or a certificate issued for another server can all cause validation to fail.
Step 4: Verify the private key and certificate chain
The certificate chain is the set of issuer certificates that lets a client trace the server certificate back to a trusted authority. If the chain file omits an intermediate certificate or contains the wrong chain, clients may reject the server even when the leaf certificate is current. The certificate and private key must also be a matching pair.
For a commercial certificate, Zimbra’s certificate tools provide a verification step. Adapt the file paths to your installation and certificate authority:
/opt/zimbra/bin/zmcertmgr verifycrt comm /opt/zimbra/ssl/zimbra/commercial/commercial.key /tmp/commercial.crt /tmp/ca_chain.crt
Proceed only if verification confirms that the certificate and private key match and that the certificate chain is valid. Do not deploy a certificate after a failed verification. Use the intermediate chain supplied by the certificate authority and the chain format expected by your Zimbra version; do not assemble a chain by guessing or appending unrelated root certificates.
Zimbra’s certificate guide documents the verification and deployment sequence, including the CA chain: Zimbra certificate installation and CLI tools. Its certificate-chain troubleshooting page also explains issuer-chain verification errors: Zimbra certificate chain guidance.
Step 5: Correct and deploy the certificate safely
If verification shows an expired certificate, wrong key, missing intermediate, or hostname mismatch, obtain or generate the correct files before deployment. Follow the procedure for your Zimbra release and certificate type. For a commercial certificate, the documented command has this general form:
/opt/zimbra/bin/zmcertmgr deploycrt comm /tmp/commercial.crt /tmp/ca_chain.crt
Use the exact command syntax and privileges documented for your installed release. Zimbra’s CLI can install certificates for components such as the MTA, LDAP, and proxy, so deployment may affect several services. In a multi-node environment, confirm that the certificate is correctly deployed on every relevant server, including the LDAP master.
After a verified deployment, restart Zimbra services during the planned maintenance window if the release procedure requires it, then confirm service status and deployed certificates:
su - zimbra
zmcontrol restart
zmcontrol status
/opt/zimbra/bin/zmcertmgr viewdeployedcrt
A restart interrupts mail and web access while services stop and return. Do not run it casually on a busy production server. The Zimbra certificate guide documents using zmcontrol restart after deployment and checking the result with viewdeployedcrt.
Step 6: Check LDAP trust configuration without disabling TLS
If the certificate itself verifies but Zimbra’s LDAP client still rejects it, inspect the LDAP trust material and the failing node. Zimbra’s archived MTA troubleshooting note lists an invalid CA chain, expired CA certificates, and unexpected files in /opt/zimbra/conf/ca among possible causes of LDAP STARTTLS failures. Treat this as a diagnostic lead, not as a reason to delete files: compare the directory with a known-good backup or version-specific guidance, and preserve its contents before making changes.
For a simple LDAP STARTTLS probe, an OpenLDAP client can require StartTLS and query the Root DSE without supplying account credentials:
ldapsearch -x -ZZ -H ldap://ldap.example.com:389 -b "" -s base namingContexts
Use the actual LDAP host and port in your deployment. With OpenLDAP tools, -ZZ requests StartTLS and treats failure to establish it as an error. If this probe fails with a trust or certificate message, compare the certificate returned by the LDAP endpoint with the deployed certificate and the CA trust available to the client. If the test succeeds from one node but fails from another, investigate differences in DNS, CA files, or local configuration.
Step 7: Consider protocol compatibility only after certificate checks
A handshake can also fail if the client and server cannot agree on a TLS protocol version or cipher suite. This can happen with obsolete clients, custom hardening, or version-specific defaults. Test the endpoint with a current OpenSSL client and inspect Zimbra’s TLS settings for the exact product version. Avoid copying old protocol commands from archived pages into a newer installation; cipher and protocol configuration can change between releases.
Do not “fix” the error by enabling SSLv3, weakening verification, or globally disabling LDAP STARTTLS. A Zimbra forum thread contains a historical workaround that turned off LDAP STARTTLS, but another responder correctly warned that disabling a security feature is not a sound certificate repair. Zimbra’s own local-configuration notes recommend leaving interprocess TLS and LDAP STARTTLS enabled. Use such a change only as a tightly controlled, temporary diagnostic if Zimbra support directs you to do so, and restore secure settings immediately.
How to confirm the repair
zmcontrol status completes without the LDAP TLS error, if that was the failing operation.
- The affected LDAP or SMTP endpoint presents the expected, unexpired certificate and complete issuer chain.
- A test from the same host and network path succeeds with the intended TLS mode.
- Zimbra logs no longer show certificate verification or handshake errors at the test time.
- For SMTP, send a test message in both directions and confirm delivery in the relevant queues or logs.
If the failure remains, collect the complete error, Zimbra release, affected service and hostname, certificate dates and SAN, verification output, and the relevant log lines. Redact private keys, credentials, user addresses, and sensitive host details before sharing. The precise message is a symptom, not a complete diagnosis; the surrounding service name and OpenSSL reason determine the right repair.
Documentation note: Zimbra’s public certificate and TLS pages include material for multiple releases, and some troubleshooting pages are explicitly archived. The commands here reflect the documented CLI pattern, but certificate paths, privileges, and restart requirements should be checked against the documentation for the installed Zimbra version. Reviewed October 6, 2026.