How to configure an ssl certificate for dovecot and postfix

OS type and version centos 7 min
Webmin version 2.0
Virtualmin version 7.3
Related packages none

how to configure a real ssl certificate to dovecot and postfix for my email servers
thank you


You can get a real free certificate from Let’s Encrypt. You can use virtualmin to request it and it will renew it automatically.
First in the domain you need the certificate (virtual server) go to Edit Virtual Server and enable Apache SSL website.
Then in the same Virtual Server go to Server Configuration, SSL Certificate, tab Let’s Encrypt, check Also request wildcard certificate? (this will help you avoid some problems). Automatically renew certificate? Yes. Click on Request Certificate.
If the domain is fully propagated which is usually from 1 to 3 days after you changed the DNS in the registrar, it will get the certificate in place.
You may want to redirect http to https automatically after the certificate is installed. Not sure if Apache server needs to be restarted after that.