These commands are for RHEL based distro. With your reaction I can assume you not very conversant with the differences I wish you said this before.
As for the mail server ssl issue here is a solution:
- Run
rm -rf /etc/letsencrypt/live/mail.mydomain.com
to remove all mail certificates - Run
nano /etc/dovecot/dovecot.conf
to remove mail certificate directive
local_name mail.mydomain.com {
ssl_cert = </etc/letsencrypt/live/mail.mydomain.com/fullchain.pem
ssl_key = </etc/letsencrypt/live/mail.mydomain.com/privkey.pem
}
Then run systemctl restart dovecot && systemctl status dovecot