How to fix annoying Zimbra certificate error after domain name change

Original: Regenerate the SSL certificate in a Zimbra single server environment.

This fix is for Standalone servers which use self-signed certificates on Zimbra 8.5+ which have following error:

ERROR: zclient.IO_ERROR (invoke sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target, server: localhost) (cause: javax.net.ssl.SSLHandshakeException sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.ce
rtpath.SunCertPathBuilderException: unable to find valid certification path to requested target)

1. Create and deploy selsigned certificate – Run under root account:

[root@mail zimbra]# /opt/zimbra/bin/zmcertmgr createca -new

[root@mail zimbra]# /opt/zimbra/bin/zmcertmgr deployca

 

[root@mail zimbra]# /opt/zimbra/bin/zmcertmgr createcrt -new -days 365

[root@mail zimbra]# /opt/zimbra/bin/zmcertmgr deploycrt self

2. Verify Deployed certificate:

[root@mail zimbra]# /opt/zimbra/bin/zmcertmgr viewdeployedcrt

3. Restart Zimbra – run under zimbra account:

[root@mail zimbra]# su – zimbra

[zimbra@mail ~]$ zmcontrol restart

sun.security.validator.ValidatorException: PKIX path building failed

zimbra ERROR: zclient.IO_ERROR (invoke sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target, server: localhost) (cause: javax.net.ssl.SSLHandshakeException sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

This error is very common after installing a new certificate in Zimbra, that even restarting the services not valid for use of some mostly command-line utilities. To troubleshoot, perform the following commands as root:

/opt/zimbra/bin/zmcertmgr deploycrt self
/opt/zimbra/bin/zmcertmgr deployca

Now run the following command as Zimbra user:

zmupdateauthkeys

Fix vmdk file

Getting file error in Virtual Box or VMWare?

Fix vmdk file:
vmware-vdiskmanager -R <your-file-name>.vmdk

Install NTPD on CentOS 7

Install NTPD
[root@localhost ~]# yum -y install ntp

Check and adjust configuration if needed
[root@localhost ~]# vi /etc/ntp.conf

Start NTPD
[root@localhost ~]# systemctl start ntpd

Enable Start at Boot Time
[root@localhost ~]# systemctl enable ntpd

How to Delete Emails in MS Exchange Shell

Check search criteria:
Get-mailbox | search-mailbox –searchquery “From: address@fromdomain.com” –Logonly –Targetmailbox administrator –Targetfolder Inbox

Delete emails
Get-mailbox | search-mailbox –searchquery “From: address@fromdomain.com” –DeleteContent