Difference between revisions of "Technical-Notes"

(Checking the content of the SSL Certificate)
 
(32 intermediate revisions by one other user not shown)
Line 1: Line 1:
 +
{{BC|Community Sandbox}}
 +
__FORCETOC__
 +
<div class="col-md-12 ibox-content">
 +
=Technical Notes=
 +
{{KB|{{Unsupported}}|{{ZCS 8.6}}|{{ZCS 8.5}}|}}
 
{{WIP}}
 
{{WIP}}
=====Single-Node Commercial Certificate=====
+
 
 +
=Single-Node Commercial Certificate=
 
Some theory about SSL Certificates and words that we will use in this tutorial:
 
Some theory about SSL Certificates and words that we will use in this tutorial:
 
*'''CSR (Certificate Signing Request):''' A CSR or also Certificate Signing request is a encrypted file with information about the company. This file is generated in our server, the Information that contains inside we discussed in a previous article. A Certificate authority uses this CSR for take the information and create the SSL Certificate.
 
*'''CSR (Certificate Signing Request):''' A CSR or also Certificate Signing request is a encrypted file with information about the company. This file is generated in our server, the Information that contains inside we discussed in a previous article. A Certificate authority uses this CSR for take the information and create the SSL Certificate.
Line 6: Line 12:
  
 
We will moving us to the correct folder inside our Server for generate the files that we will need:
 
We will moving us to the correct folder inside our Server for generate the files that we will need:
<pre>cd /opt/zimbra/ssl/zimbra/commercial/</pre>
+
<pre>cd /tmp</pre>
  
======Generating the CSR======
+
==Generating the CSR==
 
Using the tool zmcertmgr, the Zimbra system will create the CSR, and also automatically doing a Backup of the existing Cert, great.
 
Using the tool zmcertmgr, the Zimbra system will create the CSR, and also automatically doing a Backup of the existing Cert, great.
 
<pre>zimbra@help:# /opt/zimbra/bin/zmcertmgr createcsr comm -new -subject "/C=GB/ST=London/L=London/O=Zimbra/OU=Zimbra IT/CN=help.zimbra.com"
 
<pre>zimbra@help:# /opt/zimbra/bin/zmcertmgr createcsr comm -new -subject "/C=GB/ST=London/L=London/O=Zimbra/OU=Zimbra IT/CN=help.zimbra.com"
Line 17: Line 23:
 
** Creating server cert request /opt/zimbra/ssl/zimbra/commercial/commercial.csr...done.
 
** Creating server cert request /opt/zimbra/ssl/zimbra/commercial/commercial.csr...done.
 
** Saving server config key zimbraSSLPrivateKey...done.
 
** Saving server config key zimbraSSLPrivateKey...done.
root@labjorge:/opt/zimbra/ssl/zimbra/commercial# /opt/zimbra/bin/zmcertmgr viewcsr comm commercial.csr
+
root@help:/opt/zimbra/ssl/zimbra/commercial# /opt/zimbra/bin/zmcertmgr viewcsr comm commercial.csr
 
subject=/C=GB/ST=London/L=London/O=Zimbra/OU=Zimbra IT/CN=help.zimbra.com
 
subject=/C=GB/ST=London/L=London/O=Zimbra/OU=Zimbra IT/CN=help.zimbra.com
 
SubjectAltName=  
 
SubjectAltName=  
 
zimbra@help:# </pre>
 
zimbra@help:# </pre>
In this folder we will have this two files:
+
We will need this two files located in this location: '''/opt/zimbra/ssl/zimbra/commercial/''':
 
* commercial.csr: This is the file that we need to provide to the CA Authority
 
* commercial.csr: This is the file that we need to provide to the CA Authority
 
* commercial.key: The Private Key that we need to save, or do a Backup if we want to install the CRT in other Server, or restore it in case of any fail.
 
* commercial.key: The Private Key that we need to save, or do a Backup if we want to install the CRT in other Server, or restore it in case of any fail.
  
======Checking the content of the SSL Certificate======
+
==Checking the content of the CSR - SSL Certificate==
 
Now we can check trough CLI if everything in the SSL is allright with the next command:
 
Now we can check trough CLI if everything in the SSL is allright with the next command:
<pre>zimbra@help:/opt/zimbra/ssl/zimbra/commercial# /opt/zimbra/bin/zmcertmgr viewcsr comm commercial.csr
+
<pre>zimbra@help:/tmp# /opt/zimbra/bin/zmcertmgr viewcsr comm commercial.csr
 
subject=/C=GB/ST=London/L=London/O=Zimbra/OU=Zimbra IT/CN=help.zimbra.com
 
subject=/C=GB/ST=London/L=London/O=Zimbra/OU=Zimbra IT/CN=help.zimbra.com
 
SubjectAltName= </pre>
 
SubjectAltName= </pre>
Line 33: Line 39:
 
Another good method to check if everything is allright is using external websites, the only thing that we need to do is paste our CSR content, we can view it doing a more command:
 
Another good method to check if everything is allright is using external websites, the only thing that we need to do is paste our CSR content, we can view it doing a more command:
  
<pre>zimbra@help:/opt/zimbra/ssl/zimbra/commercial# more commercial.csr</pre>
+
<pre>zimbra@help:/tmp# more /opt/zimbra/ssl/zimbra/commercial/commercial.csr</pre>
  
 
We recommend one of this three:
 
We recommend one of this three:
Line 44: Line 50:
 
[[File:Ssl-check001.PNG]]
 
[[File:Ssl-check001.PNG]]
  
======Buying the Commercial SSL Certificate======
+
==Buying the Commercial SSL Certificate==
 
The next step is buy a valid commercial SSL certificate. Have tons of webpages around the World that you can use. This Companies will ask us about the CSR and our Business Information. And once the verification has a success they will send to us a file with the SSL Certificate (usually is a file with .crt extension)
 
The next step is buy a valid commercial SSL certificate. Have tons of webpages around the World that you can use. This Companies will ask us about the CSR and our Business Information. And once the verification has a success they will send to us a file with the SSL Certificate (usually is a file with .crt extension)
  
======Installing the Commercial SSL Certificate======
+
==Installing the Commercial SSL Certificate==
  
 
When we have everything from our SSL Certificate authority, is time to put it in the correct folder.
 
When we have everything from our SSL Certificate authority, is time to put it in the correct folder.
======Creating the commercial.crt======
+
==Creating the commercial.crt==
 
This file is easy to create, we only need to create that and paste inside the content of the file that the Certificate authority gave it to us:
 
This file is easy to create, we only need to create that and paste inside the content of the file that the Certificate authority gave it to us:
<pre>zimbra@help:/opt/zimbra/ssl/zimbra/commercial# vi commercial.crt</pre>
+
<pre>zimbra@help:/tmp# vi commercial.crt</pre>
  
======Creating the commercial_ca.crt======
+
==Creating the commercial_ca.crt==
 
The file called '''commercial_ca.crt''' needs to be created with the correct information, we need to mix the '''Root Certificate''' and also '''The Intermediate Certificate''', the order matters, so the file need to include '''CA INTERMEDIATE or INTERMEDIATES, CA ROOT''' one in the end of other with only one Backspace:
 
The file called '''commercial_ca.crt''' needs to be created with the correct information, we need to mix the '''Root Certificate''' and also '''The Intermediate Certificate''', the order matters, so the file need to include '''CA INTERMEDIATE or INTERMEDIATES, CA ROOT''' one in the end of other with only one Backspace:
<pre>zimbra@help:/opt/zimbra/ssl/zimbra/commercial# vi commercial_ca.crt</pre>
+
<pre>zimbra@help:/tmp# vi commercial_ca.crt</pre>
  
 
For example, this is how looks the file commercial_ca.crt with date September 2014 with a Geotrust QuickSSL Premium Certificate:
 
For example, this is how looks the file commercial_ca.crt with date September 2014 with a Geotrust QuickSSL Premium Certificate:
Line 124: Line 130:
 
-----END CERTIFICATE-----</pre>
 
-----END CERTIFICATE-----</pre>
  
======Checking if every file is OK======
+
==Checking if every file is OK==
 
Also with all of these steps, we could do something wrong, we could check if everything is alright before deploy the SSL Certificate, for test all files we will execute the next:
 
Also with all of these steps, we could do something wrong, we could check if everything is alright before deploy the SSL Certificate, for test all files we will execute the next:
 
<pre>zimbra@help:/opt/zimbra/bin/zmcertmgr verifycrt comm commercial.key commercial.crt commercial_ca.crt</pre>
 
<pre>zimbra@help:/opt/zimbra/bin/zmcertmgr verifycrt comm commercial.key commercial.crt commercial_ca.crt</pre>
Line 133: Line 139:
 
Valid Certificate: commercial.crt: OK</pre>
 
Valid Certificate: commercial.crt: OK</pre>
  
======Launching the last command======
+
==Launching the last command==
 
If we don't have any issue in the previous step, is time to launch the last two command here:
 
If we don't have any issue in the previous step, is time to launch the last two command here:
<pre>zimbra@help:/opt/zimbra/ssl/zimbra/commercial# /opt/zimbra/bin/zmcertmgr deploycrt comm commercial.crt commercial_ca.crt</pre>
+
<pre>zimbra@help:/tmp# /opt/zimbra/bin/zmcertmgr deploycrt comm commercial.crt commercial_ca.crt</pre>
  
 
The Logfile will be like this:
 
The Logfile will be like this:
Line 154: Line 160:
 
** Installing CA to /opt/zimbra/conf/ca...done.</pre>
 
** Installing CA to /opt/zimbra/conf/ca...done.</pre>
  
======Generating the MultiSAN.csr file======
+
=Single-Node Multi-SAN Commercial Certificate=
 +
Have a Multi-SAN certificate simplify the task of secure the Zimbra Infrastructure with only one Certificate, so we will have only one CSR to renew each year, etc. Also the Multi-SAN SSL Certificates permit us add more ALT names if we need it and modify as well, we only need to generate the CSR with the changes and send it to the CA Authority.
 +
 
 +
==Generating the MultiSAN.csr file==
 
We will create a file that we can update per each domain that we will need to use in the future. Also we can update it for remove, or modify domains inside it.
 
We will create a file that we can update per each domain that we will need to use in the future. Also we can update it for remove, or modify domains inside it.
  
 
We will start moving us to the correct folder inside our Server for generate the files that we will need:
 
We will start moving us to the correct folder inside our Server for generate the files that we will need:
<pre>cd /opt/zimbra/ssl/zimbra/commercial/</pre>
+
<pre>cd /tmp/</pre>
  
 
Then is time to create the CSR file, in this file we need to change the name of our Private Key, our Common Name and also the alternative domains that we want to protect with our SSL.
 
Then is time to create the CSR file, in this file we need to change the name of our Private Key, our Common Name and also the alternative domains that we want to protect with our SSL.
<pre>/opt/zimbra/bin/zmcertmgr createcsr comm -new -subject "/C=GB/ST=London/L=London/O=Zimbra/OU=Zimbra IT/CN=mail.domain.com" -subjectAltNames "mail.domain.com,mail2.domain.com,mail3.domain.com"
+
<pre>/opt/zimbra/bin/zmcertmgr createcsr comm -new -subject "/C=GB/ST=London/L=London/O=Zimbra/OU=Zimbra IT/CN=mail.domain.com" -subjectAltNames "mail.domain.com,mail.domain2.com,mail.domain3.com"
** Generating a server csr for download comm -new -subject /C=GB/ST=London/L=London/O=Zimbra/OU=Zimbra IT/CN=mail.domain.com -subjectAltNames mail.domain.com,mail2.domain.com,mail3.domain.com
+
** Generating a server csr for download comm -new -subject /C=GB/ST=London/L=London/O=Zimbra/OU=Zimbra IT/CN=mail.domain.com -subjectAltNames mail.domain.com,mail.domain2.com,mail.domain3.com
 
** Creating /opt/zimbra/conf/zmssl.cnf...done
 
** Creating /opt/zimbra/conf/zmssl.cnf...done
 
** Backup /opt/zimbra/ssl/zimbra to /opt/zimbra/ssl/zimbra.20141007154948
 
** Backup /opt/zimbra/ssl/zimbra to /opt/zimbra/ssl/zimbra.20141007154948
 
** Creating /opt/zimbra/conf/zmssl.cnf...done
 
** Creating /opt/zimbra/conf/zmssl.cnf...done
** Creating server cert request /opt/zimbra/ssl/zimbra/commercial/commercial.csr...done.
+
** Creating server cert request /tmp/commercial.csr...done.
 
** Saving server config key zimbraSSLPrivateKey...done.
 
** Saving server config key zimbraSSLPrivateKey...done.
 
zimbra@help:/opt/zimbra/ssl/zimbra/commercial#</pre>
 
zimbra@help:/opt/zimbra/ssl/zimbra/commercial#</pre>
  
======Checking the content of the SSL Certificate======
+
==Checking the content of the SSL Certificate==
 
Now we can check trough CLI if everything in the SSL is allright with the next command:
 
Now we can check trough CLI if everything in the SSL is allright with the next command:
<pre>zimbra@help:/opt/zimbra/ssl/zimbra/commercial# /opt/zimbra/bin/zmcertmgr viewcsr comm commercial.csr
+
<pre>zimbra@help:/tmp# /opt/zimbra/bin/zmcertmgr viewcsr comm commercial.csr
 
subject=/C=GB/ST=London/L=London/O=Zimbra/OU=Zimbra IT/CN=mail.domain.com
 
subject=/C=GB/ST=London/L=London/O=Zimbra/OU=Zimbra IT/CN=mail.domain.com
SubjectAltName= mail.domain.com, mail2.domain.com, mail3.domain.com</pre>
+
SubjectAltName= mail.domain.com, mail.domain2.com, mail.domain3.com</pre>
  
 
We will check the CSR that we've generated, just copy the result of this command:
 
We will check the CSR that we've generated, just copy the result of this command:
Line 184: Line 193:
 
[[File:SSL_MultiSAN_Install_Web_001.png]]
 
[[File:SSL_MultiSAN_Install_Web_001.png]]
  
======Buying the Commercial SSL Certificate======
+
==Buying the Commercial SSL Certificate==
 
The next step is buy a valid commercial SSL certificate. Have tons of webpages around the World that you can use. This Companies will ask us about the CSR and our Business Information. And once the verification has a success they will send to us a file with the SSL Certificate (usually is a file with .crt extension)
 
The next step is buy a valid commercial SSL certificate. Have tons of webpages around the World that you can use. This Companies will ask us about the CSR and our Business Information. And once the verification has a success they will send to us a file with the SSL Certificate (usually is a file with .crt extension)
  
======Installing the Commercial SSL Certificate======
+
==Installing the Commercial SSL Certificate==
 
We can use the same instructions explained here:  
 
We can use the same instructions explained here:  
======Creating the commercial_ca.crt======
+
==Creating the commercial_ca.crt==
 
We can use the same instructions explained here:  
 
We can use the same instructions explained here:  
======Checking if every file is OK======
+
==Checking if every file is OK==
 
We can use the same instructions explained here:  
 
We can use the same instructions explained here:  
======Launching the last command======
+
==Launching the last command==
 
We can use the same instructions explained here:  
 
We can use the same instructions explained here:  
======Forcing the Server to use only HTTPS======
+
==Forcing the Server to use only HTTPS==
 
We can use the same instructions explained here:
 
We can use the same instructions explained here:
  
=====Forcing the Server to use only HTTPS=====
+
=Forcing the Server to use only HTTPS=
 
Now that we have a valid SSL, the best option is force to our server that only use SSL for our Web Client Access. For do it we will use zmtlsctl command, let's take a look of all of the options here:
 
Now that we have a valid SSL, the best option is force to our server that only use SSL for our Web Client Access. For do it we will use zmtlsctl command, let's take a look of all of the options here:
 
* '''http''' - http only, the user can access to our Zimbra Web Client trough http://webmail.zimbra.com
 
* '''http''' - http only, the user can access to our Zimbra Web Client trough http://webmail.zimbra.com
Line 205: Line 214:
 
* '''mixed''' – With this option, the user will come in trought http:// and will be redirect to https:// only for the login form, after that will be redirect to http:// again. If the user come directly trough https:// the user will be under https:// all the time.
 
* '''mixed''' – With this option, the user will come in trought http:// and will be redirect to https:// only for the login form, after that will be redirect to http:// again. If the user come directly trough https:// the user will be under https:// all the time.
 
* '''redirect''' - If the user came trough http, it will be automatically redirect to https:// and it will keep on it during all session.
 
* '''redirect''' - If the user came trough http, it will be automatically redirect to https:// and it will keep on it during all session.
 +
 +
=Zimlet LinkedIn Images=
 +
[[Zimlet_LinkedIn_Images|This article has been moved to the next Link]]
 +
 +
=VMware HA script in Zimbra Collaboration=
 +
[[VMware_HA_script_in_Zimbra_Collaboration|This article has been moved to the next Link]]
 +
 +
=Migrate from cPanel/Plesk to Zimbra Collaboration 8.0.x 8.x=
 +
[[Migrate_from_cPanel/Plesk_to_Zimbra_Collaboration_8.0.x_or_8.x|This article has been moved to the next Link]]
 +
 +
{{Article Footer|Zimbra Collaboration 8.0, 7.0|01/1/2015}}

Latest revision as of 18:16, 2 October 2015

Technical Notes

   KB 21230        Last updated on 2015-10-2  




0.00
(0 votes)


Single-Node Commercial Certificate

Some theory about SSL Certificates and words that we will use in this tutorial:

  • CSR (Certificate Signing Request): A CSR or also Certificate Signing request is a encrypted file with information about the company. This file is generated in our server, the Information that contains inside we discussed in a previous article. A Certificate authority uses this CSR for take the information and create the SSL Certificate.
  • Private Key: We told before that CSR is a encrypted file, we used for encrypt it a Private Key, that is unique. The CSR and the SSL certificate will only works if we have the Private key. So the best practice is do a Backup of the Private Key and the CSR just in case we can have any problem. But keep in a secure place.

We will moving us to the correct folder inside our Server for generate the files that we will need:

cd /tmp

Generating the CSR

Using the tool zmcertmgr, the Zimbra system will create the CSR, and also automatically doing a Backup of the existing Cert, great.

zimbra@help:# /opt/zimbra/bin/zmcertmgr createcsr comm -new -subject "/C=GB/ST=London/L=London/O=Zimbra/OU=Zimbra IT/CN=help.zimbra.com"
** Generating a server csr for download comm -new -subject /C=GB/ST=London/L=London/O=Zimbra/OU=Zimbra IT/CN=help.zimbra.com
** Creating /opt/zimbra/conf/zmssl.cnf...done
** Backup /opt/zimbra/ssl/zimbra to /opt/zimbra/ssl/zimbra.20141006233154 
** Creating /opt/zimbra/conf/zmssl.cnf...done
** Creating server cert request /opt/zimbra/ssl/zimbra/commercial/commercial.csr...done.
** Saving server config key zimbraSSLPrivateKey...done.
root@help:/opt/zimbra/ssl/zimbra/commercial# /opt/zimbra/bin/zmcertmgr viewcsr comm commercial.csr
subject=/C=GB/ST=London/L=London/O=Zimbra/OU=Zimbra IT/CN=help.zimbra.com
SubjectAltName= 
zimbra@help:# 

We will need this two files located in this location: /opt/zimbra/ssl/zimbra/commercial/:

  • commercial.csr: This is the file that we need to provide to the CA Authority
  • commercial.key: The Private Key that we need to save, or do a Backup if we want to install the CRT in other Server, or restore it in case of any fail.

Checking the content of the CSR - SSL Certificate

Now we can check trough CLI if everything in the SSL is allright with the next command:

zimbra@help:/tmp# /opt/zimbra/bin/zmcertmgr viewcsr comm commercial.csr
subject=/C=GB/ST=London/L=London/O=Zimbra/OU=Zimbra IT/CN=help.zimbra.com
SubjectAltName= 

Another good method to check if everything is allright is using external websites, the only thing that we need to do is paste our CSR content, we can view it doing a more command:

zimbra@help:/tmp# more /opt/zimbra/ssl/zimbra/commercial/commercial.csr

We recommend one of this three:

  • [1]Comodo DecodeCSR
  • [2] Symantec CSR Check
  • [3] SSLShoper CSR Decoder

Using these web pages is quite easy, we just copy the CSR content and paste into this pages, take a look of this example in Symantec Website:

Ssl-check001.PNG

Buying the Commercial SSL Certificate

The next step is buy a valid commercial SSL certificate. Have tons of webpages around the World that you can use. This Companies will ask us about the CSR and our Business Information. And once the verification has a success they will send to us a file with the SSL Certificate (usually is a file with .crt extension)

Installing the Commercial SSL Certificate

When we have everything from our SSL Certificate authority, is time to put it in the correct folder.

Creating the commercial.crt

This file is easy to create, we only need to create that and paste inside the content of the file that the Certificate authority gave it to us:

zimbra@help:/tmp# vi commercial.crt

Creating the commercial_ca.crt

The file called commercial_ca.crt needs to be created with the correct information, we need to mix the Root Certificate and also The Intermediate Certificate, the order matters, so the file need to include CA INTERMEDIATE or INTERMEDIATES, CA ROOT one in the end of other with only one Backspace:

zimbra@help:/tmp# vi commercial_ca.crt

For example, this is how looks the file commercial_ca.crt with date September 2014 with a Geotrust QuickSSL Premium Certificate:

-----BEGIN CERTIFICATE-----
MIID+jCCAuKgAwIBAgIDAjbSMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNVBAYTAlVT
MRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVzdCBHbG9i
YWwgQ0EwHhcNMTAwMjI2MjEzMjMxWhcNMjAwMjI1MjEzMjMxWjBhMQswCQYDVQQG
EwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEdMBsGA1UECxMURG9tYWluIFZh
bGlkYXRlZCBTU0wxGzAZBgNVBAMTEkdlb1RydXN0IERWIFNTTCBDQTCCASIwDQYJ
KoZIhvcNAQEBBQADggEPADCCAQoCggEBAKa7jnrNpJxiV9RRMEJ7ixqy0ogGrTs8
KRMMMbxp+Z9alNoGuqwkBJ7O1KrESGAA+DSuoZO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2kmOeUJXRmm/kEd5jhW6Y
7qj/WsjTVbJmcVfewCHrPSqnI0kBBIZCe/zuf6IWUrVnZ9NA2zsmWLIodz2uFHdh
1voqZiegDfqnc1zqcPGUIWVEX/r87yloqaKHee9570+sB3c4
-----END CERTIFICATE-----

Checking if every file is OK

Also with all of these steps, we could do something wrong, we could check if everything is alright before deploy the SSL Certificate, for test all files we will execute the next:

zimbra@help:/opt/zimbra/bin/zmcertmgr verifycrt comm commercial.key commercial.crt commercial_ca.crt

If everything is allright, the result of the command will be:

** Verifying commercial.crt against commercial.key
Certificate (commercial.crt) and private key (commercial.key) match.
Valid Certificate: commercial.crt: OK

Launching the last command

If we don't have any issue in the previous step, is time to launch the last two command here:

zimbra@help:/tmp# /opt/zimbra/bin/zmcertmgr deploycrt comm commercial.crt commercial_ca.crt

The Logfile will be like this:

** Verifying commercial.crt against /opt/zimbra/ssl/zimbra/commercial/commercial.key
Certificate (commercial.crt) and private key (/opt/zimbra/ssl/zimbra/commercial/commercial.key) match.
Valid Certificate: commercial.crt: OK
** Copying commercial.crt to /opt/zimbra/ssl/zimbra/commercial/commercial.crt
** Appending ca chain commercial_ca.crt to /opt/zimbra/ssl/zimbra/commercial/commercial.crt
** Importing certificate /opt/zimbra/ssl/zimbra/commercial/commercial_ca.crt to CACERTS as zcs-user-commercial_ca...done.
** NOTE: mailboxd must be restarted in order to use the imported certificate.
** Saving server config key zimbraSSLCertificate...done.
** Saving server config key zimbraSSLPrivateKey...done.
** Installing mta certificate and key...done.
** Installing slapd certificate and key...done.
** 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.

Single-Node Multi-SAN Commercial Certificate

Have a Multi-SAN certificate simplify the task of secure the Zimbra Infrastructure with only one Certificate, so we will have only one CSR to renew each year, etc. Also the Multi-SAN SSL Certificates permit us add more ALT names if we need it and modify as well, we only need to generate the CSR with the changes and send it to the CA Authority.

Generating the MultiSAN.csr file

We will create a file that we can update per each domain that we will need to use in the future. Also we can update it for remove, or modify domains inside it.

We will start moving us to the correct folder inside our Server for generate the files that we will need:

cd /tmp/

Then is time to create the CSR file, in this file we need to change the name of our Private Key, our Common Name and also the alternative domains that we want to protect with our SSL.

/opt/zimbra/bin/zmcertmgr createcsr comm -new -subject "/C=GB/ST=London/L=London/O=Zimbra/OU=Zimbra IT/CN=mail.domain.com" -subjectAltNames "mail.domain.com,mail.domain2.com,mail.domain3.com"
** Generating a server csr for download comm -new -subject /C=GB/ST=London/L=London/O=Zimbra/OU=Zimbra IT/CN=mail.domain.com -subjectAltNames mail.domain.com,mail.domain2.com,mail.domain3.com
** Creating /opt/zimbra/conf/zmssl.cnf...done
** Backup /opt/zimbra/ssl/zimbra to /opt/zimbra/ssl/zimbra.20141007154948
** Creating /opt/zimbra/conf/zmssl.cnf...done
** Creating server cert request /tmp/commercial.csr...done.
** Saving server config key zimbraSSLPrivateKey...done.
zimbra@help:/opt/zimbra/ssl/zimbra/commercial#

Checking the content of the SSL Certificate

Now we can check trough CLI if everything in the SSL is allright with the next command:

zimbra@help:/tmp# /opt/zimbra/bin/zmcertmgr viewcsr comm commercial.csr
subject=/C=GB/ST=London/L=London/O=Zimbra/OU=Zimbra IT/CN=mail.domain.com
SubjectAltName= mail.domain.com, mail.domain2.com, mail.domain3.com

We will check the CSR that we've generated, just copy the result of this command:

more commercial.csr

Inside any of this CSR Decoder's Web:

  • [4]Comodo DecodeCSR
  • [5] Symantec CSR Check
  • [6] SSLShoper CSR Decoder

SSL MultiSAN Install Web 001.png

Buying the Commercial SSL Certificate

The next step is buy a valid commercial SSL certificate. Have tons of webpages around the World that you can use. This Companies will ask us about the CSR and our Business Information. And once the verification has a success they will send to us a file with the SSL Certificate (usually is a file with .crt extension)

Installing the Commercial SSL Certificate

We can use the same instructions explained here:

Creating the commercial_ca.crt

We can use the same instructions explained here:

Checking if every file is OK

We can use the same instructions explained here:

Launching the last command

We can use the same instructions explained here:

Forcing the Server to use only HTTPS

We can use the same instructions explained here:

Forcing the Server to use only HTTPS

Now that we have a valid SSL, the best option is force to our server that only use SSL for our Web Client Access. For do it we will use zmtlsctl command, let's take a look of all of the options here:

  • http - http only, the user can access to our Zimbra Web Client trough http://webmail.zimbra.com
  • https – https only, the user can access to our Zimbra Web Client trough https://webmail.zimbra.com
  • both – The user can access trough both protocols http:// or https:// and it will keep in the same protocol during all session.
  • mixed – With this option, the user will come in trought http:// and will be redirect to https:// only for the login form, after that will be redirect to http:// again. If the user come directly trough https:// the user will be under https:// all the time.
  • redirect - If the user came trough http, it will be automatically redirect to https:// and it will keep on it during all session.

Zimlet LinkedIn Images

This article has been moved to the next Link

VMware HA script in Zimbra Collaboration

This article has been moved to the next Link

Migrate from cPanel/Plesk to Zimbra Collaboration 8.0.x 8.x

This article has been moved to the next Link

Verified Against: Zimbra Collaboration 8.0, 7.0 Date Created: 01/1/2015
Article ID: https://wiki.zimbra.com/index.php?title=Technical-Notes Date Modified: 2015-10-02



Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »


Jump to: navigation, search