Convert Apache Certificate for Courier

by Stephen Fluin 2010.01.21

In the perfect small server linux setup, you are going to have a single server serving web pages, file storage, email, and possibly other services. One of the most important things to do to a server like this is to enable others to security access it in an authenticated manner. The only way to accomplish this is to use an SSL certificate. SSL certificates are relatively simple for most things, and you can usually just point each of your configuration files to the certificate provided by your provider. Unfortunately for mail servers, Courier expects an alternative form for the SSL certificate than that provided by many registrars (including Godaddy), meaning that you have to convert it.

How to convert a certificate for Courier

It is relatively simple to make the conversion once you know how. Take the cert downloaded from godaddy (this file is typically a .crt file) and conver the cert to PEM using the following command

sudo openssl x509 -in mortalpowers.crt -out key.pem -outform PEM

From there you need to take the PEM file and prepend the unlocked .key file into a new file ending in .pem. The .key file would have been created by you when you originally made the Certificate Signing Request. This key file contains your private key that allows you to decode the data provided by others using your public key, and forms the basis of the SSL system.

With this new .pem file in a safe place, point your imapd-ssl Courier configuration file to it, and you should be done,

Inspiration and tips for this article found at http://www.tnpi.net/wiki/Use_a_signed_SSL_certificate.


permalink