Install a Commercial SSL Certificate on Zimbra Safely

Install the commercial certificate with Zimbra’s zmcertmgr: preserve the private key that matches the CSR, prepare the CA chain, run verifycrt, then deploy. These steps cover a single-server CLI installation; multi-server and older releases need version-specific checks.

Before you start

A commercial TLS certificate is the public certificate issued for your mail hostname. The private key is the secret key created when you generate the Certificate Signing Request (CSR), a text request sent to the Certificate Authority (CA) that issues the certificate. The certificate, private key, and CA chain must match. A CA chain contains the intermediate certificates that connect your server certificate to a trusted root.

  • Confirm the exact mail hostname users reach, such as mail.example.com, and make sure it is covered by the certificate’s Subject Alternative Name (SAN).
  • Have the signed server certificate and CA chain from the issuing CA in PEM/CRT format.
  • Back up the current commercial certificate files and private key securely before changing them. Keep the backup readable only by the Zimbra administrator.
  • Schedule a maintenance window: deploying the certificate and restarting Zimbra services can interrupt mail access.

Zimbra’s CLI certificate guide says to run zmcertmgr as the zimbra account on ZCS 8.7 and later, and as root on versions before 8.7. Confirm the account and command behavior for your exact Zimbra edition and release before starting; do not assume a legacy ZCS 8.x instruction is identical to every current 10.x package.

1. Create or confirm the CSR and matching key

If you already have the CSR that the CA signed and its matching private key is still at /opt/zimbra/ssl/zimbra/commercial/commercial.key, do not create another CSR. Zimbra documents that generating a new CSR can replace the existing key, which would make the issued certificate fail the key-match check.

For a new certificate on ZCS 8.7 or later, switch to the Zimbra account and create a CSR with the public mail hostname in the SAN. Replace the example organization and hostname with your own details:

su - zimbra
/opt/zimbra/bin/zmcertmgr createcsr comm -new   -subject "/C=US/ST=CA/O=Example/CN=mail.example.com"   -subjectAltNames mail.example.com

The tool stores the corresponding commercial key in Zimbra’s commercial certificate directory and reports the CSR path, commonly /opt/zimbra/ssl/zimbra/commercial/commercial.csr. Submit that CSR to your CA. If users access other names, request a certificate whose SAN list covers those names as well. Never email, upload to the CA, or paste the private key; the CA needs the CSR, not the key.

A terminal showing the Zimbra zmcertmgr command to create a CSR for mail.example.com
Create the CSR with the hostname users visit in the SAN; keep the matching private key on the Zimbra server.

2. Stage the issued certificate and CA chain

Place the CA-issued server certificate and its CA chain in a temporary directory readable by the account that will run zmcertmgr. In this example, the files are /tmp/certs/commercial.crt and /tmp/certs/commercial_ca.crt. The matching private key remains at /opt/zimbra/ssl/zimbra/commercial/commercial.key.

If the CA gave you separate intermediate files, combine them in issuer order, starting with the intermediate that issued your server certificate. Zimbra’s CLI guide shows an intermediate certificate before the root certificate. Follow your CA’s current bundle instructions about whether the root belongs in the file; certificate chains and filenames change, so do not reuse an old provider-specific bundle from another server or certificate. Do not concatenate the server/leaf certificate into the CA chain argument.

On ZCS 8.7+, the Zimbra guide specifies mode 640 for commercial.key; older releases have different permission guidance. Preserve the file’s proper owner and mode for your release. Never make the key world-readable to solve a permissions error.

A file manager showing the issued commercial certificate and CA chain in a temporary certs folder, with the private key kept in Zimbra’s commercial directory
Stage the public certificate and CA chain separately; the private key stays in Zimbra’s protected commercial directory.

3. Verify the certificate before deployment

Run verifycrt with the private key, issued certificate, and chain file. The command checks that the certificate matches the private key and that the certificate chain validates:

/opt/zimbra/bin/zmcertmgr verifycrt comm   /opt/zimbra/ssl/zimbra/commercial/commercial.key   /tmp/certs/commercial.crt   /tmp/certs/commercial_ca.crt

Proceed only if the output confirms the key match and a valid certificate. If verification fails, stop and correct the specific issue: a mismatch usually means you have the wrong private key or certificate; a chain error usually means the CA bundle is incomplete, incorrectly ordered, or incompatible with the issuing chain. Check the certificate’s SAN and validity dates as well. Do not use deploycrt as a way to test an unverified certificate.

A terminal with the zmcertmgr verifycrt command and its three input paths for the key, certificate, and CA chain
Run the verification command with the matching key and CA chain; resolve any error before deployment.

4. Deploy, restart, and check the certificate users receive

After verification succeeds, deploy the commercial certificate using the same CA chain file:

/opt/zimbra/bin/zmcertmgr deploycrt comm   /tmp/certs/commercial.crt   /tmp/certs/commercial_ca.crt

Zimbra’s tool installs the certificate for the relevant Zimbra services and updates its certificate configuration. Restart the services as the zimbra account so mailboxd and other components load the new certificate:

zmcontrol restart
/opt/zimbra/bin/zmcertmgr viewdeployedcrt

Wait until services return, then review the deployed certificate details. From a separate machine, inspect the public webmail endpoint with the hostname clients use:

openssl s_client -connect mail.example.com:443   -servername mail.example.com -showcerts </dev/null

Confirm the presented certificate has the expected hostname, issuer, validity dates, and intermediate chain. Open webmail in a browser and check that the certificate warning is gone. Test SMTP/IMAP or proxy endpoints separately if your deployment exposes them on different hostnames or ports.

A terminal showing Zimbra certificate deployment, service restart, and deployed certificate inspection commands
Deploy only after verification, restart Zimbra, and inspect the certificate that the public mail hostname actually serves.

Multi-server and common failure notes

In a multi-server deployment, a certificate must cover every hostname users or Zimbra services present, and Zimbra’s CLI guide describes installing the certificate and chain on each relevant node. The required key and certificate arrangement depends on the topology and certificate SANs. Confirm the procedure for your release before copying private-key material between hosts; where supported, use certificates and keys appropriate to each node.

  • Certificate and key do not match: use the key that created the submitted CSR; do not generate another CSR to fix a signed certificate.
  • Chain validation fails: download the current chain from the issuing CA and rebuild it in the correct issuer order.
  • Browser still shows the old certificate: check the public proxy/load balancer as well as the mailbox host; TLS may terminate on a different server.
  • Certificate appears deployed but service fails: review Zimbra service logs and verify that every relevant node has the correct certificate files and chain.

Renew using the same sequence and confirm the live endpoint before the current certificate expires.

Official references

Leave a Comment

How to