How to encrypt Dovecot POP3 IMAP traffic using a public/private key pair

Home > Search > How-to
  by

Add the following to the /etc/dovecot/conf.d/10-ssl.conf file:

  • ssl = yes is straighforward. This tells Dovecot to encrypt traffic.
  • ssl_cert = </etc/pki/tls/certs/mail.example.com.crt
  • ssl_key = </etc/pki/tls/private/mail.example.com.key
ssl = yes
ssl_cert = </etc/pki/tls/certs/mail.example.com.crt
ssl_key = </etc/pki/tls/private/mail.example.com.key

 

Restart Dovecot, and ensure Dovecot is active and running.

[root@server1 ~]# systemctl restart dovecot
[root@server1 ~]# systemctl status dovecot

 

On the Dovecot email server itself, use OpenSSL to test POP3s. The "s" means secured. There should be many lines of text referencing various security parameters, such as SSL, TLS, and certificate. The output should begin with "CONNECTED(0000003)" and end with "Verify return code: 18 (self signed certificate)" and "+OK Dovecot ready."

[root@server1 ~]# openssl s_client -connect mail.example.com:pop3s
CONNECTED(00000003)    
. . .
Verify return code: 18 (self signed certificate)
---
+OK Dovecot ready.

[root@server1 ~]# openssl s_client -connect mail.example.com:imaps
CONNECTED(00000003) 
. . .
Verify return code: 18 (self signed certificate)
---
* OK Dovecot ready.

 

On the Dovecot email server itself, use OpenSSL to test IMAPs. The "s" means secured. There should be many lines of text referencing various security parameters, such as SSL, TLS, and certificate. The output should begin with "CONNECTED(0000003)" and end with "Verify return code: 18 (self signed certificate)" and "+OK Dovecot ready."

[root@server1 ~]# openssl s_client -connect mail.example.com:imaps
CONNECTED(00000003) 
. . .
Verify return code: 18 (self signed certificate)
---
* OK Dovecot ready.

 

 

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter in the box below so that we can be sure you are a human.




Comments