How To Install SSL Certificate on Zimbra Collaboration Server via command line (CLI)

NetShop ISP
2 min readSep 7, 2022

--

We are publishing this Zimbra tutorial as a lot of customers have reported an issue when trying to install their SSL Certificate using Zimbra’s Admin Console (GUI).

The steps listed below have been proof-tested on Zimbra Collaboration Open Source and Network editions (ZCS 8.7). If you are using an older or newer version of Zimbra and you are a NetShop ISP customer please contact our Support team for assistance.

Installing SSL Certificate using the CLI

Pre-requisites

  1. Zimbra Collaboration Suite (Open Source or Network) installed on a Linux server
  2. SSH access on the server
  3. Active (non-expired) SSL Certificate from your vendor (Don’t have one? Order EssentialSSL at €16.85/year)
  4. You have the following SSL Certificate files: Bundle (Root, Intermediate) and Certificate
  5. SSL key exists on your Zimbra server (/opt/zimbra/ssl/zimbra/commercial/commercial.key)

Step 1 — Upload Certificate on Server

As zimbra user, create a temporary file under (/tmp) and paste the Root and Intermediate certificates content (may be a single file named Bundle):

[root@zimbra-netshop /]$ su - zimbra
[zimbra@zimbra-netshop ~]$ vi /tmp/commercial_ca.crt

Save the file and exit.

Then, place the SSL Certificate in /tmp/commercial.crt

[zimbra@zimbra-netshop ~]$ vi /tmp/commercial.crt

Save the file and exit.

Step 2 — Verify SSL Certificate and Key

Do a dry-run to check if your Certificate chain (Certificate, Intermediate CA, Root) and your private key are OK. If you receive an error after executing the following command, contact your Zimbra server administrator.

[zimbra@zimbra-netshop ~]$ /opt/zimbra/bin/zmcertmgr verifycrt comm /opt/zimbra/ssl/zimbra/commercial/commercial.key /tmp/commercial.crt /tmp/commercial_ca.crt

Ideal output should be:

** Verifying /tmp/commercial.crt against /opt/zimbra/ssl/zimbra/commercial/commercial.key Certificate (/tmp/commercial.crt) and private key (/opt/zimbra/ssl/zimbra/commercial/commercial.key) match.
Valid Certificate: /tmp/commercial.crt: OK

Step 3 — Deploy Certificate with zmcertmgr command

Deploy your SSL certificate with zmcertmgr command:

[zimbra@zimbra-netshop ~]$ /opt/zimbra/bin/zmcertmgr deploycrt comm /tmp/commercial.crt /tmp/commercial_ca.crt

Ideal output should be:

[ … ]
** Installing proxy certificate and key…done.
** Creating pkcs12 file /opt/zimbra/ssl/zimbra/jetty.pkcs12…done.
** Creating keystore file /opt/zimbra/mailboxd/etc/keystore…done.
** Installing CA to /opt/zimbra/conf/ca…done.

Step 4 — Restart Zimbra Services

Execute the following command as zimbra user:

[root@zimbra-netshop /]$ su zimbra
[zimbra@zimbra-netshop ~]$ zmcontrol restart

You are all set! You can navigate to your Zimbra server’s hostname and confirm you can access the Web interface via https.

Source: https://netshop-isp.com.cy/blog/how-to-install-ssl-certificate-on-zimbra-collaboration-server-via-command-line-cli/

--

--

NetShop ISP
NetShop ISP

Written by NetShop ISP

Web Hosting, Servers, Colocation & Data Center Services (www.netshop-isp.com.cy)

No responses yet