Control Web Panel

WebPanel => E-Mail => Topic started by: kandalf on June 13, 2023, 08:25:48 AM

Title: Problem when a certificate Renew
Post by: kandalf on June 13, 2023, 08:25:48 AM
I have multiple servers with CWP with multiple domains of clients, from times to times my clients have errors caused by the certificate, I think is when the certificate renew the mail server continue to use the old one.

Most of the times to fix this I rebuild the mailserver but this is should somehow be handle automatically it's really annoying to have this issue.
Any tips to fix this?
Title: Re: Problem when a certificate Renew
Post by: cyberspace on June 17, 2023, 08:58:57 PM
The mail certificates and keys are located in the folders:

Code: [Select]
CERTS - /etc/pki/tls/certs
KEYS - /etc/pki/tls/private/

If you believe the mail server just doesn't want to use the updated certs then try to restart the mail server whem one or more certs/keys are updated.

To do this just run:
Code: [Select]
find /etc/pki/tls/private/ -name "*.key" -mtime -1 -exec service postfix restart \;
find /etc/pki/tls/private/ -name "*.key" -mtime -1 -exec service dovecot restart \;

using cron once a day.