Installing an SSL/TLS Certificate for Qmail
To install a custom SSL/TLS certificate for Qmail on a Plesk server:
-
Create a combined
.pem
certificate file.To create a combined
.pem
certificate file, start your favorite text editor and paste the contents of each certificate file and the private key in the file in the following order:- The private key
- The primary certificate
- The intermediate certificate
- The root certificate
Make sure that you include the begin and end tags of the key and each certificate including the dash lines. The resulting text should look like this:
-----BEGIN RSA PRIVATE KEY----- .......... (Your Private Key here) .......... -----END RSA PRIVATE KEY----- -----BEGIN CERTIFICATE----- .......... (Your Primary SSL/TLS certificate here) .......... -----END CERTIFICATE----- -----BEGIN CERTIFICATE----- .......... (Your Intermediate certificate here) .......... -----END CERTIFICATE----- -----BEGIN CERTIFICATE----- .......... (Your Root certificate here) .......... -----END CERTIFICATE-----
-
Save the combined certificate file as
plesk.pem
. -
Log in to a Plesk server through SSH as a root user.
-
Download the combined certificate file
plesk.pem
. -
Make a backup copy of the existing default SSL/TLS certificate for Qmail.
For example for RedHat or Fedora operating systems, the SSL/TLS certificate file that you need to back up is
var/qmail/control/servercert.pem
.Note: For other operating systems, the default certificate file location may be different.
-
Open the default certificate file
/var/qmail/control/servercert.pem
using your favorite text editor, and replace the contents of the file with the contents of the combined certificate fileplesk.pem
. -
Save and close the file.
-
To finish the certificate installation, restart Qmail.