Adding an SSL Cerificate to Dovecot

Dovecot, a Linux email server that supports both IMAP and POP3, can easily be made more secure with the addition of an SSL certificate. That said, you can use either a private SSL that was provided by any vendor or by using a Self Signed SSL. This article assumes that you already have your SSL and are ready to apply it to the Dovecot email server.

  1. To install the SSL, you must first log into your Linux server via SSH / Shell. If you are not sure on how to do this, please follow our article on using SSH for both Windows and Mac .

  2. Windows - http://www.hosting.com/support/linux/general/sshwindows
    Mac - http://www.hosting.com/support/linux/general/sshmac

  3. You will need to move you obtained SSL certificate to the server using either FTP or SSH, so that Dovecot will see them. The exact location will differ depending on your Operating System and where it places your SSL's. If you are not sure, you can create the directories "/etc/ssl/certs" for the crt file and "/etc/ssl/private" for the key and move your cerificate here.

  4. Dovecot will need to be configured to use the SSL. To do this you will need to edit the "dovecot.conf" file. Doing a locate command on the file will locate it for you. Once found, open it will any linux editor and change the configuration to look like the following;

  5. protocols = imaps pop3s
    ssl_disable = no
    ssl_cert_file = /etc/ssl/certs/your_crt_file.crt
    ssl_key_file = /etc/ssl/private/your_key_file.key

  6. Make sure you save the file after editing it.

  7. Lastly make sure your email clients are configured to accept SSL for IMAP and POP3 on ports 993 and 995.