Difference between revisions of "Self-Signed-CA-SSL-CRT"

(1.2)
 
(7 intermediate revisions by one other user not shown)
Line 1: Line 1:
== Self signed SSL certificates with CA valid for 10 years in a multi-server setup. ==
+
{{Unsupported}}== Self signed SSL certificates with CA valid for 10 years in a multi-server setup. ==
  
 +
'''While deploying self signed SSL CA/certificates in a multi-server setup, please make sure that your localconfig on all servers allows untrusted certificates (untrusted means self signed)'''
 +
 +
'''You can verify the same using below example commands.'''
 +
 +
[zimbra@v01 ~]$ zmlocalconfig |egrep "ssl_allow_accept_untrusted_certs|ssl_allow_untrusted_certs"
 +
ssl_allow_accept_untrusted_certs = true
 +
ssl_allow_untrusted_certs = true
 +
[zimbra@v01 ~]$
 +
 +
'''If the untrsuted certs are not allowed, then please allow them using below commands.'''
 +
 +
'''Run on all zimbra servers:'''
 +
 +
su - zimbra
 +
zmlocalconfig -e ssl_allow_accept_untrusted_certs=true
 +
zmlocalconfig -e ssl_allow_untrusted_certs=true
 +
 +
'''Take backup of "/opt/zimbra/bin/zmcertmgr" file.'''
 +
 +
cp /opt/zimbra/bin/zmcertmgr /var/tmp/
  
 
'''Edit /opt/zimbra/bin/zmcertmgr file on LDAP master server (as root user) and search for "validation_days", then modify the default value as per your requirement, then save and exit.'''
 
'''Edit /opt/zimbra/bin/zmcertmgr file on LDAP master server (as root user) and search for "validation_days", then modify the default value as per your requirement, then save and exit.'''
  
 
+
  [root@v01 ~]# nano /opt/zimbra/bin/zmcertmgr  
[root@v01 ~]# nano /opt/zimbra/bin/zmcertmgr  
+
  [root@v01 ~]# cat /opt/zimbra/bin/zmcertmgr |grep validation_days  
[root@v01 ~]# cat /opt/zimbra/bin/zmcertmgr |grep validation_days  
+
  validation_days=3660  
validation_days=3660  
 
 
     -days ${validation_days}  
 
     -days ${validation_days}  
 
     validation_days=$1
 
     validation_days=$1
Line 14: Line 33:
 
   #  -days ${validation_days} -CAserial ${zimbra_ca_srl}  
 
   #  -days ${validation_days} -CAserial ${zimbra_ca_srl}  
 
   echo "-  Default <validation_days> is 365. "
 
   echo "-  Default <validation_days> is 365. "
[root@v01 ~]#  
+
  [root@v01 ~]#  
  
  
 
'''Take the backup of old CA/certs and then create new CA valid for 10 years (3660 days)CA with 2048 key size.'''
 
'''Take the backup of old CA/certs and then create new CA valid for 10 years (3660 days)CA with 2048 key size.'''
  
 
+
  [root@v01 ~]# mv /opt/zimbra/ssl/zimbra /opt/zimbra/ssl/zimbra_old
[root@v01 ~]# mv /opt/zimbra/ssl/zimbra /opt/zimbra/ssl/zimbra_old
+
  [root@v01 ~]# /opt/zimbra/bin/zmcertmgr createca -new -keysize 2048 -subject "/C=DE/ST=New-Y  ork/L=New-York/O=zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com"
[root@v01 ~]# /opt/zimbra/bin/zmcertmgr createca -new -keysize 2048 -subject "/C=DE/ST=New-York/L=New-York/O=zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com"
+
** Creating directory /opt/zimbra/ssl/zimbra
** Creating directory /opt/zimbra/ssl/zimbra
+
** Creating directory /opt/zimbra/ssl/zimbra/ca
** Creating directory /opt/zimbra/ssl/zimbra/ca
+
** Creating directory /opt/zimbra/ssl/zimbra/server
** Creating directory /opt/zimbra/ssl/zimbra/server
+
** Creating directory /opt/zimbra/ssl/zimbra/commercial
** Creating directory /opt/zimbra/ssl/zimbra/commercial
+
** Creating /opt/zimbra/ssl/zimbra/ca/zmssl.cnf...done
** Creating /opt/zimbra/ssl/zimbra/ca/zmssl.cnf...done
+
** Creating CA private key /opt/zimbra/ssl/zimbra/ca/ca.key...done.
** Creating CA private key /opt/zimbra/ssl/zimbra/ca/ca.key...done.
+
** Creating CA cert /opt/zimbra/ssl/zimbra/ca/ca.pem...done.
** Creating CA cert /opt/zimbra/ssl/zimbra/ca/ca.pem...done.
+
[root@v01 ~]#  
[root@v01 ~]#  
 
  
  
 
'''Deploy CA locally'''
 
'''Deploy CA locally'''
  
 
+
[root@v01 ~]# /opt/zimbra/bin/zmcertmgr deployca -locally
[root@v01 ~]# /opt/zimbra/bin/zmcertmgr deployca -locally
+
** Importing CA /opt/zimbra/ssl/zimbra/ca/ca.pem into CACERTS...done.
** Importing CA /opt/zimbra/ssl/zimbra/ca/ca.pem into CACERTS...done.
+
** Saving global config key zimbraCertAuthorityCertSelfSigned...done.
** Saving global config key zimbraCertAuthorityCertSelfSigned...done.
+
** Saving global config key zimbraCertAuthorityKeySelfSigned...done.
** Saving global config key zimbraCertAuthorityKeySelfSigned...done.
+
** Copying CA to /opt/zimbra/conf/ca...done.
** Copying CA to /opt/zimbra/conf/ca...done.
+
[root@v01 ~]#  
[root@v01 ~]#  
 
  
  
 
'''Create self signed SSL certificate valid for 10 years (3660 days) with 2048 keysize (we can add more than one subjectAltNames in multi-server setup).'''
 
'''Create self signed SSL certificate valid for 10 years (3660 days) with 2048 keysize (we can add more than one subjectAltNames in multi-server setup).'''
  
 
+
[root@v01 ~]# /opt/zimbra/bin/zmcertmgr createcrt -new -days 3660 -keysize 2048 -subject   "/C=DE/ST=New-York/L=New-York/O=Zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com" -subjectAltNames   "v01.vinay.com,v01store1.vinay.com"
[root@v01 ~]# /opt/zimbra/bin/zmcertmgr createcrt -new -days 3660 -keysize 2048 -subject "/C=DE/ST=New-York/L=New-York/O=Zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com" -subjectAltNames "v01.vinay.com,v01store1.vinay.com"
+
Validation days: 3660
Validation days: 3660
+
** Creating /opt/zimbra/conf/zmssl.cnf...done
** Creating /opt/zimbra/conf/zmssl.cnf...done
+
** Backup /opt/zimbra/ssl/zimbra to /opt/zimbra/ssl/zimbra.20120214030428  
** Backup /opt/zimbra/ssl/zimbra to /opt/zimbra/ssl/zimbra.20120214030428  
+
** Generating a server csr for download self -new -keysize 2048
** Generating a server csr for download self -new -keysize 2048
+
** Backup /opt/zimbra/ssl/zimbra to /opt/zimbra/ssl/zimbra.20120214030428  
** Backup /opt/zimbra/ssl/zimbra to /opt/zimbra/ssl/zimbra.20120214030428  
+
** Retrieving Commercial CA cert from ldap...done.
** Retrieving Commercial CA cert from ldap...done.
+
** Creating server cert request /opt/zimbra/ssl/zimbra/server/server.csr...done.
** Creating server cert request /opt/zimbra/ssl/zimbra/server/server.csr...done.
+
** Saving server config key zimbraSSLPrivateKey...done.
** Saving server config key zimbraSSLPrivateKey...done.
+
** Signing cert request /opt/zimbra/ssl/zimbra/server/server.csr...done.
** Signing cert request /opt/zimbra/ssl/zimbra/server/server.csr...done.
+
[root@v01 ~]#
[root@v01 ~]#
 
  
  
 
'''We can remove the regular empty file created during self signed SSL certificate generation.'''  
 
'''We can remove the regular empty file created during self signed SSL certificate generation.'''  
  
 
+
  [root@v01 ~]# rm /opt/zimbra/ssl/zimbra/commercial/commercial_ca.crt
[root@v01 ~]# rm /opt/zimbra/ssl/zimbra/commercial/commercial_ca.crt
+
  rm: remove regular empty file `/opt/zimbra/ssl/zimbra/commercial/commercial_ca.crt'? y
rm: remove regular empty file `/opt/zimbra/ssl/zimbra/commercial/commercial_ca.crt'? y
+
  [root@v01 ~]#  
[root@v01 ~]#  
 
  
  
 
'''Deploy self signed SSL certificate that we have generated for 3660 days.'''
 
'''Deploy self signed SSL certificate that we have generated for 3660 days.'''
  
 
+
[root@v01 ~]# /opt/zimbra/bin/zmcertmgr deploycrt self
[root@v01 ~]# /opt/zimbra/bin/zmcertmgr deploycrt self
+
** Saving server config key zimbraSSLCertificate...done.
** Saving server config key zimbraSSLCertificate...done.
+
** Saving server config key zimbraSSLPrivateKey...done.
** Saving server config key zimbraSSLPrivateKey...done.
+
** Installing mta certificate and key...done.
** Installing mta certificate and key...done.
+
** Installing slapd certificate and key...done.
** Installing slapd certificate and key...done.
+
** Installing proxy certificate and key...done.
** Installing proxy certificate and key...done.
+
** Creating pkcs12 file /opt/zimbra/ssl/zimbra/jetty.pkcs12...done.
** Creating pkcs12 file /opt/zimbra/ssl/zimbra/jetty.pkcs12...done.
+
** Creating keystore file /opt/zimbra/mailboxd/etc/keystore...done.
** Creating keystore file /opt/zimbra/mailboxd/etc/keystore...done.
+
** Installing CA to /opt/zimbra/conf/ca...done.
** Installing CA to /opt/zimbra/conf/ca...done.
+
[root@v01 ~]#  
[root@v01 ~]#  
 
  
  
 
'''We need to restart the zimbra services (zmcontrol restart)for the new CA/certificate to take effect.'''
 
'''We need to restart the zimbra services (zmcontrol restart)for the new CA/certificate to take effect.'''
  
 
+
[root@v01 ~]# su - zimbra -c "zmcontrol stop ; zmcontrol start"
[root@v01 ~]# su - zimbra -c "zmcontrol stop ; zmcontrol start"
+
Host v01.vinay.com
Host v01.vinay.com
+
Stopping zmconfigd...Done.
Stopping zmconfigd...Done.
+
Stopping stats...Done.
Stopping stats...Done.
+
Stopping mta...Done.
Stopping mta...Done.
+
Stopping spell...Done.
Stopping spell...Done.
+
Stopping snmp...Done.
Stopping snmp...Done.
+
Stopping cbpolicyd...Done.
Stopping cbpolicyd...Done.
+
Stopping archiving...Done.
Stopping archiving...Done.
+
Stopping antivirus...Done.
Stopping antivirus...Done.
+
Stopping antispam...Done.
Stopping antispam...Done.
+
Stopping imapproxy...Done.
Stopping imapproxy...Done.
+
Stopping memcached...Done.
Stopping memcached...Done.
+
Stopping mailbox...Done.
Stopping mailbox...Done.
+
Stopping convertd...Done.
Stopping convertd...Done.
+
Stopping logger...Done.
Stopping logger...Done.
+
Stopping ldap...Done.
Stopping ldap...Done.
+
Host v01.vinay.com
Host v01.vinay.com
+
Starting ldap...Done.
Starting ldap...Done.
+
Starting zmconfigd...Done.
Starting zmconfigd...Done.
+
Starting logger...Done.
Starting logger...Done.
+
Starting convertd...Done.
Starting convertd...Done.
+
Starting mailbox...Done.
Starting mailbox...Done.
+
Starting memcached...Done.
Starting memcached...Done.
+
Starting imapproxy...Done.
Starting imapproxy...Done.
+
Starting antispam...Done.
Starting antispam...Done.
+
Starting antivirus...Done.
Starting antivirus...Done.
+
Starting archiving...Done.
Starting archiving...Done.
+
Starting snmp...Done.
Starting snmp...Done.
+
Starting spell...Done.
Starting spell...Done.
+
Starting mta...Done.
Starting mta...Done.
+
Starting stats...Done.
Starting stats...Done.
+
[root@v01 ~]#  
[root@v01 ~]#  
 
  
  
 
'''Now verify the certificate status.'''
 
'''Now verify the certificate status.'''
  
 
+
[root@v01 ~]# /opt/zimbra/bin/zmcertmgr viewdeployedcrt
[root@v01 ~]# /opt/zimbra/bin/zmcertmgr viewdeployedcrt
+
::service mta::
::service mta::
+
notBefore=Feb 14 11:04:37 2012 GMT
notBefore=Feb 14 11:04:37 2012 GMT
+
notAfter=Feb 21 11:04:37 2022 GMT
notAfter=Feb 21 11:04:37 2022 GMT
+
subject= /C=DE/ST=New-York/O=Zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com
subject= /C=DE/ST=New-York/O=Zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com
+
issuer= /C=DE/ST=New-York/L=New-York/O=zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com
issuer= /C=DE/ST=New-York/L=New-York/O=zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com
+
SubjectAltName= v01.vinay.com, v01store1.vinay.com
SubjectAltName= v01.vinay.com, v01store1.vinay.com
+
::service proxy::
::service proxy::
+
notBefore=Feb 14 11:04:37 2012 GMT
notBefore=Feb 14 11:04:37 2012 GMT
+
notAfter=Feb 21 11:04:37 2022 GMT
notAfter=Feb 21 11:04:37 2022 GMT
+
subject= /C=DE/ST=New-York/O=Zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com
subject= /C=DE/ST=New-York/O=Zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com
+
issuer= /C=DE/ST=New-York/L=New-York/O=zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com
issuer= /C=DE/ST=New-York/L=New-York/O=zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com
+
SubjectAltName= v01.vinay.com, v01store1.vinay.com
SubjectAltName= v01.vinay.com, v01store1.vinay.com
+
::service mailboxd::
::service mailboxd::
+
notBefore=Feb 14 11:04:37 2012 GMT
notBefore=Feb 14 11:04:37 2012 GMT
+
notAfter=Feb 21 11:04:37 2022 GMT
notAfter=Feb 21 11:04:37 2022 GMT
+
subject= /C=DE/ST=New-York/O=Zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com
subject= /C=DE/ST=New-York/O=Zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com
+
issuer= /C=DE/ST=New-York/L=New-York/O=zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com
issuer= /C=DE/ST=New-York/L=New-York/O=zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com
+
SubjectAltName= v01.vinay.com, v01store1.vinay.com
SubjectAltName= v01.vinay.com, v01store1.vinay.com
+
::service ldap::
::service ldap::
+
notBefore=Feb 14 11:04:37 2012 GMT
notBefore=Feb 14 11:04:37 2012 GMT
+
notAfter=Feb 21 11:04:37 2022 GMT
notAfter=Feb 21 11:04:37 2022 GMT
+
subject= /C=DE/ST=New-York/O=Zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com
subject= /C=DE/ST=New-York/O=Zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com
+
issuer= /C=DE/ST=New-York/L=New-York/O=zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com
issuer= /C=DE/ST=New-York/L=New-York/O=zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com
+
SubjectAltName= v01.vinay.com, v01store1.vinay.com
SubjectAltName= v01.vinay.com, v01store1.vinay.com
+
[root@v01 ~]#  
[root@v01 ~]#  
 
  
  
Line 154: Line 166:
 
'''We can verify the CA status using below commands.'''
 
'''We can verify the CA status using below commands.'''
  
 
+
[root@v01 ~]# openssl x509 -text -noout -in /opt/zimbra/ssl/zimbra/ca/ca.pem
[root@v01 ~]# openssl x509 -text -noout -in /opt/zimbra/ssl/zimbra/ca/ca.pem
+
Certificate:
Certificate:
 
 
     Data:
 
     Data:
 
         Version: 1 (0x0)
 
         Version: 1 (0x0)
Line 172: Line 183:
 
                                     Exponent: 65537 (0x10001)
 
                                     Exponent: 65537 (0x10001)
 
     Signature Algorithm: sha1WithRSAEncryption
 
     Signature Algorithm: sha1WithRSAEncryption
[root@v01 ~]#  
+
[root@v01 ~]#  
  
  
Line 178: Line 189:
 
'''Then we need to copy/paste the CA from LDAP master to all other servers and deploy the same.'''
 
'''Then we need to copy/paste the CA from LDAP master to all other servers and deploy the same.'''
  
 +
[root@v01store1 ~]# rm -rf /opt/zimbra/ssl/zimbra/ca/* ;  rm -rf /opt/zimbra/ssl/zimbra/server/*
 +
[root@v01store1 ~]# scp -r root@10.112.233.171://opt/zimbra/ssl/zimbra/ca/*  /opt/zimbra/ssl/zimbra/ca/
 +
root@10.112.233.171's password:
 +
ca.csr                                                                                                                                                                    100% 1082    1.1KB/s  00:00   
 +
ca.key                                                                                                                                                                  100% 1708    1.7KB/s  00:00   
 +
ca.pem                                                                                                                                                                    100% 1265    1.2KB/s  00:00   
 +
ca.srl                                                                                                                                                                  100%  11    0.0KB/s  00:00   
 +
ca.srl.old                                                                                                                                                              100%  11    0.0KB/s  00:00   
 +
index.txt                                                                                                                                                                100%  101    0.1KB/s  00:00   
 +
index.txt.attr                                                                                                                                                          100%  21    0.0KB/s  00:00   
 +
index.txt.old                                                                                                                                                          100%    0    0.0KB/s  00:00   
 +
1329217468.pem                                                                                                                                                          100% 1326    1.3KB/s  00:00   
 +
zmssl.cnf                                                                                                                                                              100% 7702    7.5KB/s  00:00   
 +
[root@v01store1 ~]#
  
[root@v01store1 ~]# rm -rf /opt/zimbra/ssl/zimbra/ca/* ; rm -rf /opt/zimbra/ssl/zimbra/server/*
+
  [root@v01store1 ~]# /opt/zimbra/bin/zmcertmgr deployca
[root@v01store1 ~]# scp -r root@10.112.233.171://opt/zimbra/ssl/zimbra/ca/* /opt/zimbra/ssl/zimbra/ca/
+
** Importing CA /opt/zimbra/ssl/zimbra/ca/ca.pem into CACERTS...done.
root@10.112.233.171's password:
+
** Copying CA to /opt/zimbra/conf/ca...done.
ca.csr                                                                                                                                                                  100% 1082    1.1KB/s  00:00   
+
[root@v01store1 ~]#  
ca.key                                                                                                                                                                  100% 1708    1.7KB/s  00:00   
 
ca.pem                                                                                                                                                                  100% 1265    1.2KB/s  00:00   
 
ca.srl                                                                                                                                                                  100%  11    0.0KB/s  00:00   
 
ca.srl.old                                                                                                                                                              100%  11    0.0KB/s  00:00   
 
index.txt                                                                                                                                                              100%  101    0.1KB/s  00:00   
 
index.txt.attr                                                                                                                                                          100%  21    0.0KB/s  00:00   
 
index.txt.old                                                                                                                                                          100%    0    0.0KB/s  00:00   
 
1329217468.pem                                                                                                                                                          100% 1326    1.3KB/s  00:00   
 
zmssl.cnf                                                                                                                                                              100% 7702    7.5KB/s  00:00   
 
[root@v01store1 ~]#
 
 
 
[root@v01store1 ~]# /opt/zimbra/bin/zmcertmgr deployca
 
** Importing CA /opt/zimbra/ssl/zimbra/ca/ca.pem into CACERTS...done.
 
** Copying CA to /opt/zimbra/conf/ca...done.
 
[root@v01store1 ~]#  
 
  
  
 
'''Create certificate/deploy certificate'''  
 
'''Create certificate/deploy certificate'''  
  
 +
[root@v01store1 ~]# /opt/zimbra/bin/zmcertmgr createcrt -new -days 3660 -keysize 2048 -subject  "/C=DE/ST=New-York/L=New-York/O=Zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com" -subjectAltNames  "v01.vinay.com,v01store1.vinay.com"
 +
Validation days: 3660
 +
** Creating /opt/zimbra/conf/zmssl.cnf...done
 +
** Backup /opt/zimbra/ssl/zimbra to /opt/zimbra/ssl/zimbra.20120214172721
 +
** Generating a server csr for download self -new -keysize 2048
 +
** Backup /opt/zimbra/ssl/zimbra to /opt/zimbra/ssl/zimbra.20120214172721
 +
** Retrieving Commercial CA cert from ldap...done.
 +
** Creating server cert request /opt/zimbra/ssl/zimbra/server/server.csr...done.
 +
** Saving server config key zimbraSSLPrivateKey...done.
 +
** Signing cert request /opt/zimbra/ssl/zimbra/server/server.csr...done.
 +
[root@v01store1 ~]#
  
[root@v01store1 ~]# /opt/zimbra/bin/zmcertmgr createcrt -new -days 3660 -keysize 2048 -subject "/C=DE/ST=New-York/L=New-York/O=Zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com" -subjectAltNames "v01.vinay.com,v01store1.vinay.com"
+
[root@v01store1 ~]# rm /opt/zimbra/ssl/zimbra//commercial/commercial_ca.crt  
Validation days: 3660
+
rm: remove regular empty file `/opt/zimbra/ssl/zimbra//commercial/commercial_ca.crt'? y
** Creating /opt/zimbra/conf/zmssl.cnf...done
+
[root@v01store1 ~]#  
** Backup /opt/zimbra/ssl/zimbra to /opt/zimbra/ssl/zimbra.20120214172721
 
** Generating a server csr for download self -new -keysize 2048
 
** Backup /opt/zimbra/ssl/zimbra to /opt/zimbra/ssl/zimbra.20120214172721
 
** Retrieving Commercial CA cert from ldap...done.
 
** Creating server cert request /opt/zimbra/ssl/zimbra/server/server.csr...done.
 
** Saving server config key zimbraSSLPrivateKey...done.
 
** Signing cert request /opt/zimbra/ssl/zimbra/server/server.csr...done.
 
[root@v01store1 ~]#
 
 
 
[root@v01store1 ~]# rm /opt/zimbra/ssl/zimbra//commercial/commercial_ca.crt  
 
rm: remove regular empty file `/opt/zimbra/ssl/zimbra//commercial/commercial_ca.crt'? y
 
[root@v01store1 ~]#  
 
 
 
  
[root@v01store1 ~]# /opt/zimbra/bin/zmcertmgr deploycrt self
 
** 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.
 
[root@v01store1 ~]#
 
  
 +
[root@v01store1 ~]# /opt/zimbra/bin/zmcertmgr deploycrt self
 +
** 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.
 +
[root@v01store1 ~]#
  
'''restart zimbra services for the new certificate and CA to take effect.'''
 
  
 +
'''Restart zimbra services for the new certificate and CA to take effect.'''
  
[root@v01store1 ~]# su - zimbra -c "zmcontrol stop ; zmcontrol start"
+
[root@v01store1 ~]# su - zimbra -c "zmcontrol stop ; zmcontrol start"
Host v01store1.vinay.com
+
Host v01store1.vinay.com
Stopping zmconfigd...Done.
+
Stopping zmconfigd...Done.
Stopping stats...Done.
+
Stopping stats...Done.
Stopping spell...Done.
+
Stopping spell...Done.
Stopping snmp...Done.
+
Stopping snmp...Done.
Stopping cbpolicyd...Done.
+
Stopping cbpolicyd...Done.
Stopping archiving...Done.
+
Stopping archiving...Done.
Stopping antivirus...Done.
+
Stopping antivirus...Done.
Stopping antispam...Done.
+
Stopping antispam...Done.
Stopping imapproxy...Done.
+
Stopping imapproxy...Done.
Stopping memcached...Done.
+
Stopping memcached...Done.
Stopping mailbox...Done.
+
Stopping mailbox...Done.
Stopping convertd...Done.
+
Stopping convertd...Done.
Stopping logger...Done.
+
Stopping logger...Done.
Host v01store1.vinay.com
+
Host v01store1.vinay.com
Starting zmconfigd...Done.
+
Starting zmconfigd...Done.
Starting logger...Done.
+
Starting logger...Done.
Starting convertd...Done.
+
Starting convertd...Done.
Starting mailbox...Done.
+
Starting mailbox...Done.
Starting snmp...Done.
+
Starting snmp...Done.
Starting spell...Done.
+
Starting spell...Done.
Starting stats...Done.
+
Starting stats...Done.
[root@v01store1 ~]#  
+
[root@v01store1 ~]#  
  
  
 
'''Verify certificate status'''
 
'''Verify certificate status'''
  
 +
[root@v01store1 ~]# /opt/zimbra/bin/zmcertmgr viewdeployedcrt
 +
::service mta::
 +
notBefore=Feb 14 11:57:30 2012 GMT
 +
notAfter=Feb 21 11:57:30 2022 GMT
 +
subject= /C=DE/ST=New-York/O=Zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com
 +
issuer= /C=DE/ST=New-York/L=New-York/O=zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com
 +
SubjectAltName= v01store1.vinay.com, v01.vinay.com
 +
::service proxy::
 +
notBefore=Feb 14 11:57:30 2012 GMT
 +
notAfter=Feb 21 11:57:30 2022 GMT
 +
subject= /C=DE/ST=New-York/O=Zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com
 +
issuer= /C=DE/ST=New-York/L=New-York/O=zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com
 +
SubjectAltName= v01store1.vinay.com, v01.vinay.com
 +
::service mailboxd::
 +
notBefore=Feb 14 11:57:30 2012 GMT
 +
notAfter=Feb 21 11:57:30 2022 GMT
 +
subject= /C=DE/ST=New-York/O=Zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com
 +
issuer= /C=DE/ST=New-York/L=New-York/O=zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com
 +
SubjectAltName= v01store1.vinay.com, v01.vinay.com
 +
::service ldap::
 +
notBefore=Feb 14 11:57:30 2012 GMT
 +
notAfter=Feb 21 11:57:30 2022 GMT
 +
subject= /C=DE/ST=New-York/O=Zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com
 +
issuer= /C=DE/ST=New-York/L=New-York/O=zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com
 +
SubjectAltName= v01store1.vinay.com, v01.vinay.com
 +
[root@v01store1 ~]#
  
[root@v01store1 ~]# /opt/zimbra/bin/zmcertmgr viewdeployedcrt
 
::service mta::
 
notBefore=Feb 14 11:57:30 2012 GMT
 
notAfter=Feb 21 11:57:30 2022 GMT
 
subject= /C=DE/ST=New-York/O=Zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com
 
issuer= /C=DE/ST=New-York/L=New-York/O=zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com
 
SubjectAltName= v01store1.vinay.com, v01.vinay.com
 
::service proxy::
 
notBefore=Feb 14 11:57:30 2012 GMT
 
notAfter=Feb 21 11:57:30 2022 GMT
 
subject= /C=DE/ST=New-York/O=Zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com
 
issuer= /C=DE/ST=New-York/L=New-York/O=zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com
 
SubjectAltName= v01store1.vinay.com, v01.vinay.com
 
::service mailboxd::
 
notBefore=Feb 14 11:57:30 2012 GMT
 
notAfter=Feb 21 11:57:30 2022 GMT
 
subject= /C=DE/ST=New-York/O=Zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com
 
issuer= /C=DE/ST=New-York/L=New-York/O=zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com
 
SubjectAltName= v01store1.vinay.com, v01.vinay.com
 
::service ldap::
 
notBefore=Feb 14 11:57:30 2012 GMT
 
notAfter=Feb 21 11:57:30 2022 GMT
 
subject= /C=DE/ST=New-York/O=Zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com
 
issuer= /C=DE/ST=New-York/L=New-York/O=zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com
 
SubjectAltName= v01store1.vinay.com, v01.vinay.com
 
[root@v01store1 ~]#
 
 
 
'''verify the CA copied from LDAP master which is deployed on store.'''
 
  
 +
'''Verify the CA copied from LDAP master which is deployed on store.'''
  
[root@v01store1 ~]# openssl x509 -text -noout -in /opt/zimbra/ssl/zimbra/ca/ca.pem
+
[root@v01store1 ~]# openssl x509 -text -noout -in /opt/zimbra/ssl/zimbra/ca/ca.pem
Certificate:
+
Certificate:
 
     Data:
 
     Data:
 
         Version: 1 (0x0)
 
         Version: 1 (0x0)
Line 313: Line 319:
 
     Signature Algorithm: sha1WithRSAEncryption
 
     Signature Algorithm: sha1WithRSAEncryption
 
       [root@v01store1 ~]#
 
       [root@v01store1 ~]#
 +
 +
 +
'''Make sure that your self signed SSL CA & relevant SSL certitifate are matching the same time stamp.'''
 +
 +
'''You can verify the same using below commands.'''
 +
 +
'''Run on your LDAP Server as root user.'''
 +
 +
openssl x509 -text -noout -in /opt/zimbra/ssl/zimbra/ca/ca.pem |grep -A 2 Validity
 +
openssl x509 -text -noout -in /opt/zimbra/conf/slapd.crt |grep -A 2 Validity
 +
 +
'''Run on Proxy Server if any in your setup as root user.'''
 +
 +
openssl x509 -text -noout -in /opt/zimbra/ssl/zimbra/ca/ca.pem |grep -A 2 Validity
 +
openssl x509 -text -noout -in /opt/zimbra/conf/nginx.crt |grep -A 2 Validity
 +
 +
'''Run on Mail Store Server as root user.'''
 +
 +
openssl x509 -text -noout -in /opt/zimbra/ssl/zimbra/ca/ca.pem |grep -A 2 Validity
 +
openssl x509 -text -noout -in /opt/zimbra/mailboxd/etc/mailboxd.pem |grep -A 2 Validity
 +
 +
'''Run on MTA Server as root user.'''
 +
 +
openssl x509 -text -noout -in /opt/zimbra/ssl/zimbra/ca/ca.pem |grep -A 2 Validity
 +
openssl x509 -text -noout -in /opt/zimbra/conf/smtpd.crt |grep -A 2 Validity

Latest revision as of 14:56, 30 March 2015

Self signed SSL certificates with CA valid for 10 years in a multi-server setup.

While deploying self signed SSL CA/certificates in a multi-server setup, please make sure that your localconfig on all servers allows untrusted certificates (untrusted means self signed)

You can verify the same using below example commands.

[zimbra@v01 ~]$ zmlocalconfig |egrep "ssl_allow_accept_untrusted_certs|ssl_allow_untrusted_certs"
ssl_allow_accept_untrusted_certs = true
ssl_allow_untrusted_certs = true
[zimbra@v01 ~]$ 

If the untrsuted certs are not allowed, then please allow them using below commands.

Run on all zimbra servers:

su - zimbra
zmlocalconfig -e ssl_allow_accept_untrusted_certs=true
zmlocalconfig -e ssl_allow_untrusted_certs=true

Take backup of "/opt/zimbra/bin/zmcertmgr" file.

cp /opt/zimbra/bin/zmcertmgr /var/tmp/

Edit /opt/zimbra/bin/zmcertmgr file on LDAP master server (as root user) and search for "validation_days", then modify the default value as per your requirement, then save and exit.

 [root@v01 ~]# nano /opt/zimbra/bin/zmcertmgr 
 [root@v01 ~]# cat /opt/zimbra/bin/zmcertmgr |grep validation_days 
 validation_days=3660 
   -days ${validation_days} 
   validation_days=$1
   echo "Validation days: $validation_days"
   -days ${validation_days} 
 #  -days ${validation_days} -CAserial ${zimbra_ca_srl} 
 echo "-  Default <validation_days> is 365. "
 [root@v01 ~]# 


Take the backup of old CA/certs and then create new CA valid for 10 years (3660 days)CA with 2048 key size.

 [root@v01 ~]# mv /opt/zimbra/ssl/zimbra /opt/zimbra/ssl/zimbra_old
 [root@v01 ~]# /opt/zimbra/bin/zmcertmgr createca -new -keysize 2048 -subject "/C=DE/ST=New-Y   ork/L=New-York/O=zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com"
** Creating directory /opt/zimbra/ssl/zimbra
** Creating directory /opt/zimbra/ssl/zimbra/ca
** Creating directory /opt/zimbra/ssl/zimbra/server
** Creating directory /opt/zimbra/ssl/zimbra/commercial
** Creating /opt/zimbra/ssl/zimbra/ca/zmssl.cnf...done
** Creating CA private key /opt/zimbra/ssl/zimbra/ca/ca.key...done.
** Creating CA cert /opt/zimbra/ssl/zimbra/ca/ca.pem...done.
[root@v01 ~]# 


Deploy CA locally

[root@v01 ~]# /opt/zimbra/bin/zmcertmgr deployca -locally
** Importing CA /opt/zimbra/ssl/zimbra/ca/ca.pem into CACERTS...done.
** Saving global config key zimbraCertAuthorityCertSelfSigned...done.
** Saving global config key zimbraCertAuthorityKeySelfSigned...done.
** Copying CA to /opt/zimbra/conf/ca...done.
[root@v01 ~]# 


Create self signed SSL certificate valid for 10 years (3660 days) with 2048 keysize (we can add more than one subjectAltNames in multi-server setup).

[root@v01 ~]# /opt/zimbra/bin/zmcertmgr createcrt -new -days 3660 -keysize 2048 -subject    "/C=DE/ST=New-York/L=New-York/O=Zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com" -subjectAltNames   "v01.vinay.com,v01store1.vinay.com"
Validation days: 3660
** Creating /opt/zimbra/conf/zmssl.cnf...done
** Backup /opt/zimbra/ssl/zimbra to /opt/zimbra/ssl/zimbra.20120214030428 
** Generating a server csr for download self -new -keysize 2048
** Backup /opt/zimbra/ssl/zimbra to /opt/zimbra/ssl/zimbra.20120214030428 
** Retrieving Commercial CA cert from ldap...done.
** Creating server cert request /opt/zimbra/ssl/zimbra/server/server.csr...done.
** Saving server config key zimbraSSLPrivateKey...done.
** Signing cert request /opt/zimbra/ssl/zimbra/server/server.csr...done.
[root@v01 ~]#


We can remove the regular empty file created during self signed SSL certificate generation.

 [root@v01 ~]# rm /opt/zimbra/ssl/zimbra/commercial/commercial_ca.crt
 rm: remove regular empty file `/opt/zimbra/ssl/zimbra/commercial/commercial_ca.crt'? y
 [root@v01 ~]# 


Deploy self signed SSL certificate that we have generated for 3660 days.

[root@v01 ~]# /opt/zimbra/bin/zmcertmgr deploycrt self
** 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.
[root@v01 ~]# 


We need to restart the zimbra services (zmcontrol restart)for the new CA/certificate to take effect.

[root@v01 ~]# su - zimbra -c "zmcontrol stop ; zmcontrol start"
Host v01.vinay.com
Stopping zmconfigd...Done.
Stopping stats...Done.
Stopping mta...Done.
Stopping spell...Done.
Stopping snmp...Done.
Stopping cbpolicyd...Done.
Stopping archiving...Done.
Stopping antivirus...Done.
Stopping antispam...Done.
Stopping imapproxy...Done.
Stopping memcached...Done.
Stopping mailbox...Done.
Stopping convertd...Done.
Stopping logger...Done.
Stopping ldap...Done.
Host v01.vinay.com
Starting ldap...Done.
Starting zmconfigd...Done.
Starting logger...Done.
Starting convertd...Done.
Starting mailbox...Done.
Starting memcached...Done.
Starting imapproxy...Done.
Starting antispam...Done.
Starting antivirus...Done.
Starting archiving...Done.
Starting snmp...Done.
Starting spell...Done.
Starting mta...Done.
Starting stats...Done.
[root@v01 ~]# 


Now verify the certificate status.

[root@v01 ~]# /opt/zimbra/bin/zmcertmgr viewdeployedcrt
::service mta::
notBefore=Feb 14 11:04:37 2012 GMT
notAfter=Feb 21 11:04:37 2022 GMT
subject= /C=DE/ST=New-York/O=Zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com
issuer= /C=DE/ST=New-York/L=New-York/O=zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com
SubjectAltName= v01.vinay.com, v01store1.vinay.com
::service proxy::
notBefore=Feb 14 11:04:37 2012 GMT
notAfter=Feb 21 11:04:37 2022 GMT
subject= /C=DE/ST=New-York/O=Zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com
issuer= /C=DE/ST=New-York/L=New-York/O=zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com
SubjectAltName= v01.vinay.com, v01store1.vinay.com
::service mailboxd::
notBefore=Feb 14 11:04:37 2012 GMT
notAfter=Feb 21 11:04:37 2022 GMT
subject= /C=DE/ST=New-York/O=Zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com
issuer= /C=DE/ST=New-York/L=New-York/O=zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com
SubjectAltName= v01.vinay.com, v01store1.vinay.com
::service ldap::
notBefore=Feb 14 11:04:37 2012 GMT
notAfter=Feb 21 11:04:37 2022 GMT
subject= /C=DE/ST=New-York/O=Zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com
issuer= /C=DE/ST=New-York/L=New-York/O=zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com
SubjectAltName= v01.vinay.com, v01store1.vinay.com
[root@v01 ~]# 


We can verify the CA status using below commands.

[root@v01 ~]# openssl x509 -text -noout -in /opt/zimbra/ssl/zimbra/ca/ca.pem
Certificate:
   Data:
       Version: 1 (0x0)
       Serial Number:
       Signature Algorithm: sha1WithRSAEncryption
       Issuer: C=DE, ST=New-York, L=New-York, O=zimbra, OU=ZimbraGlobalSupport, CN=*.vinay.com
       Validity
           Not Before: Feb 14 11:03:00 2012 GMT
           Not After : Feb 21 11:03:00 2022 GMT
       Subject: C=DE, ST=New-York, L=New-York, O=zimbra, OU=ZimbraGlobalSupport, CN=*.vinay.com
       Subject Public Key Info:
           Public Key Algorithm: rsaEncryption
           RSA Public Key: (2048 bit)
               Modulus (2048 bit):
                                   Exponent: 65537 (0x10001)
   Signature Algorithm: sha1WithRSAEncryption
[root@v01 ~]# 


Then we need to copy/paste the CA from LDAP master to all other servers and deploy the same.

[root@v01store1 ~]# rm -rf /opt/zimbra/ssl/zimbra/ca/* ;  rm -rf /opt/zimbra/ssl/zimbra/server/*
[root@v01store1 ~]# scp -r root@10.112.233.171://opt/zimbra/ssl/zimbra/ca/*   /opt/zimbra/ssl/zimbra/ca/
root@10.112.233.171's password: 
ca.csr                                                                                                                                                                    100% 1082     1.1KB/s   00:00    
ca.key                                                                                                                                                                   100% 1708     1.7KB/s   00:00    
ca.pem                                                                                                                                                                    100% 1265     1.2KB/s   00:00    
ca.srl                                                                                                                                                                  100%   11     0.0KB/s   00:00    
ca.srl.old                                                                                                                                                               100%   11     0.0KB/s   00:00    
index.txt                                                                                                                                                                100%  101     0.1KB/s   00:00    
index.txt.attr                                                                                                                                                           100%   21     0.0KB/s   00:00    
index.txt.old                                                                                                                                                           100%    0     0.0KB/s   00:00    
1329217468.pem                                                                                                                                                          100% 1326     1.3KB/s   00:00    
zmssl.cnf                                                                                                                                                               100% 7702     7.5KB/s   00:00    
[root@v01store1 ~]# 
[root@v01store1 ~]# /opt/zimbra/bin/zmcertmgr deployca
** Importing CA /opt/zimbra/ssl/zimbra/ca/ca.pem into CACERTS...done.
** Copying CA to /opt/zimbra/conf/ca...done.
[root@v01store1 ~]# 


Create certificate/deploy certificate

[root@v01store1 ~]# /opt/zimbra/bin/zmcertmgr createcrt -new -days 3660 -keysize 2048 -subject   "/C=DE/ST=New-York/L=New-York/O=Zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com" -subjectAltNames  "v01.vinay.com,v01store1.vinay.com"
Validation days: 3660
** Creating /opt/zimbra/conf/zmssl.cnf...done
** Backup /opt/zimbra/ssl/zimbra to /opt/zimbra/ssl/zimbra.20120214172721 
** Generating a server csr for download self -new -keysize 2048
** Backup /opt/zimbra/ssl/zimbra to /opt/zimbra/ssl/zimbra.20120214172721 
** Retrieving Commercial CA cert from ldap...done.
** Creating server cert request /opt/zimbra/ssl/zimbra/server/server.csr...done.
** Saving server config key zimbraSSLPrivateKey...done.
** Signing cert request /opt/zimbra/ssl/zimbra/server/server.csr...done.
[root@v01store1 ~]# 
[root@v01store1 ~]# rm /opt/zimbra/ssl/zimbra//commercial/commercial_ca.crt 
rm: remove regular empty file `/opt/zimbra/ssl/zimbra//commercial/commercial_ca.crt'? y
[root@v01store1 ~]# 


[root@v01store1 ~]# /opt/zimbra/bin/zmcertmgr deploycrt self
** 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.
[root@v01store1 ~]# 


Restart zimbra services for the new certificate and CA to take effect.

[root@v01store1 ~]# su - zimbra -c "zmcontrol stop ; zmcontrol start"
Host v01store1.vinay.com
Stopping zmconfigd...Done.
Stopping stats...Done.
Stopping spell...Done.
Stopping snmp...Done.
Stopping cbpolicyd...Done.
Stopping archiving...Done.
Stopping antivirus...Done.
Stopping antispam...Done.
Stopping imapproxy...Done.
Stopping memcached...Done.
Stopping mailbox...Done.
Stopping convertd...Done.
Stopping logger...Done.
Host v01store1.vinay.com
Starting zmconfigd...Done.
Starting logger...Done.
Starting convertd...Done.
Starting mailbox...Done.
Starting snmp...Done.
Starting spell...Done.
Starting stats...Done.
[root@v01store1 ~]# 


Verify certificate status

[root@v01store1 ~]# /opt/zimbra/bin/zmcertmgr viewdeployedcrt
::service mta::
notBefore=Feb 14 11:57:30 2012 GMT
notAfter=Feb 21 11:57:30 2022 GMT
subject= /C=DE/ST=New-York/O=Zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com
issuer= /C=DE/ST=New-York/L=New-York/O=zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com
SubjectAltName= v01store1.vinay.com, v01.vinay.com
::service proxy::
notBefore=Feb 14 11:57:30 2012 GMT
notAfter=Feb 21 11:57:30 2022 GMT
subject= /C=DE/ST=New-York/O=Zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com
issuer= /C=DE/ST=New-York/L=New-York/O=zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com
SubjectAltName= v01store1.vinay.com, v01.vinay.com
::service mailboxd::
notBefore=Feb 14 11:57:30 2012 GMT
notAfter=Feb 21 11:57:30 2022 GMT
subject= /C=DE/ST=New-York/O=Zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com
issuer= /C=DE/ST=New-York/L=New-York/O=zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com
SubjectAltName= v01store1.vinay.com, v01.vinay.com
::service ldap::
notBefore=Feb 14 11:57:30 2012 GMT
notAfter=Feb 21 11:57:30 2022 GMT
subject= /C=DE/ST=New-York/O=Zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com
issuer= /C=DE/ST=New-York/L=New-York/O=zimbra/OU=ZimbraGlobalSupport/CN=*.vinay.com
SubjectAltName= v01store1.vinay.com, v01.vinay.com
[root@v01store1 ~]# 


Verify the CA copied from LDAP master which is deployed on store.

[root@v01store1 ~]# openssl x509 -text -noout -in /opt/zimbra/ssl/zimbra/ca/ca.pem
Certificate:
   Data:
       Version: 1 (0x0)
       Serial Number:
       Signature Algorithm: sha1WithRSAEncryption
       Issuer: C=DE, ST=New-York, L=New-York, O=zimbra, OU=ZimbraGlobalSupport, CN=*.vinay.com
       Validity
           Not Before: Feb 14 11:03:00 2012 GMT
           Not After : Feb 21 11:03:00 2022 GMT
       Subject: C=DE, ST=New-York, L=New-York, O=zimbra, OU=ZimbraGlobalSupport, CN=*.vinay.com
       Subject Public Key Info:
           Public Key Algorithm: rsaEncryption
           RSA Public Key: (2048 bit)
               Modulus (2048 bit):
                                   Exponent: 65537 (0x10001)
   Signature Algorithm: sha1WithRSAEncryption
      [root@v01store1 ~]#


Make sure that your self signed SSL CA & relevant SSL certitifate are matching the same time stamp.

You can verify the same using below commands.

Run on your LDAP Server as root user.

openssl x509 -text -noout -in /opt/zimbra/ssl/zimbra/ca/ca.pem |grep -A 2 Validity
openssl x509 -text -noout -in /opt/zimbra/conf/slapd.crt |grep -A 2 Validity

Run on Proxy Server if any in your setup as root user.

openssl x509 -text -noout -in /opt/zimbra/ssl/zimbra/ca/ca.pem |grep -A 2 Validity
openssl x509 -text -noout -in /opt/zimbra/conf/nginx.crt |grep -A 2 Validity

Run on Mail Store Server as root user.

openssl x509 -text -noout -in /opt/zimbra/ssl/zimbra/ca/ca.pem |grep -A 2 Validity
openssl x509 -text -noout -in /opt/zimbra/mailboxd/etc/mailboxd.pem |grep -A 2 Validity

Run on MTA Server as root user.

openssl x509 -text -noout -in /opt/zimbra/ssl/zimbra/ca/ca.pem |grep -A 2 Validity
openssl x509 -text -noout -in /opt/zimbra/conf/smtpd.crt |grep -A 2 Validity
Jump to: navigation, search