Alternative Method
- For Zimbra version older than 8.7, log in as root;
otherwise, log in as a Zimbra user. Use the commands below to
change between root and Zimbra user:
- su – zimbra (root
> zimbra user)
- sudo su (zimbra
user > root)
- Locate and open the zmcertmgr tool: /opt/zimbra/bin/zmcertmgr
- Now, prepare your certificate files and upload them to
a directory of your choice on the server. Your certificate (.crt) and CA
bundle (.ca-bundle) files were sent by the Certificate Authority to your
email during the SSL validation process
Note: If you didn’t generate the CSR code on
Zimbra, you also need to upload the private key file.
- For the purpose of this example, we will upload the
certificate files into the /opt/ directory.
Remember! You have to replace
the /opt/ directory and the certificate name, with your own
location, and details.
- Upload your certificate file: /opt/yourwebsite_com.crt
- Upload your CA bundle file: /opt/yourwebsite_com.ca-bundle
Note: Your CA bundle must contain the root certificate,
as well as all the intermediate certificates.
- Check that your certificate matches the private key via
this command:
/opt/zimbra/bin/zmcertmgr verifycrt comm /opt/zimbra/ssl/zimbra/commercial/commercial.key /opt/yourwebsite_com.crt /opt/yourwebsite_com.ca-bundle - Set up the certificate by using this command:
/opt/zimbra/bin/zmcertmgr deploycrt comm /opt/yourdomain_com.crt /opt/yourdomain_com.ca-bundle
Note: If you didn’t create the CSR on Zimbra, you
must name your private key file commercial.key and upload it
into the following directory: /opt/zimbra/ssl/zimbra/commercial.
- Double-check your certificate information by running
this command: /opt/zimbra/bin/zmcertmgr
viewdeployedcrt
- Run the su-zimbra command to switch from root to
Zimbra user. Use zmcontrol restart to restart
your server. To return to root, run sudo su
- Congratulations! You have successfully installed the
SSL Certificate using Zimbra command-line interface.