Installing an SSL Certificate for Qmail

To install a custom SSL certificate for Qmail on a Plesk server:

  1. 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:

    1. The private key
    2. The primary certificate
    3. The intermediate certificate
    4. 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 certificate here)

    ..........

    -----END CERTIFICATE-----

    -----BEGIN CERTIFICATE-----

    ..........

    (Your Intermediate certificate here)

    ..........

    -----END CERTIFICATE-----

    -----BEGIN CERTIFICATE-----

    ..........

    (Your Root certificate here)

    ..........

    -----END CERTIFICATE-----

  2. Save the combined certificate file as plesk.pem.
  3. Log in to a Plesk server through SSH as a root user.
  4. Download the combined certificate file plesk.pem.
  5. Make a backup copy of the existing default SSL certificate for Qmail.

    For example for RedHat or Fedora operating systems, the SSL 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.

  6. 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 file plesk.pem.
  7. Save and close the file.
  8. To finish the certificate installation, restart Qmail.