Adding cacert certificate to dovecot

I’ve been playing with certificates for a while so the time was right to install official certificates from Here’s how I did it. It’s mostly based on what I found on the simple apache certificate wiki

First we create a private key and certicate signing request: openssl req -newkey rsa:4096 -subj / -nodes -keyout example_key.pem -out example_csr.pem. It creates the private key example_key.pem and the signing request example_csr.pem.
As instructed in the wiki, we did the next step: Go to CACert, log in, and select “Server certificates -> New”. If a Class 3 certificate is available for you I’d advise you to select a Class 3 certificate. Use Copy/Paste to input your CSR (the content of example_csr.pem in the above example) into the big editor box. Be sure to include the header and footer lines. Use Copy/Paste with your favorite editor to save the certificate to a file (let’s call the file example_cert.pem).
Next steps are only needed for dovecot:

The private key we saved earlier has been saved as the file referenced by ssl_key in the dovecot configuration.
If everything works correctly, you should be able to test your configuration after restarting dovecot by running openssl s_client -connect


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s