Due to the increasing fight against unsolicited (SPAM) emails, many internet service providers (ISPs) have started blocking port 25 for email sending. For enhanced information security and to bypass this issue, you can configure your email to use an encrypted connection (SSL). This tutorial explains how to enable encrypted email sending (port 465) and receiving (ports 993 and 995) in the DirectAdmin control panel using a self-signed certificate.
If you prefer to use your own certificate, skip the first step and place your certificate key and private key in the "exim.cert" and "exim.key" files.
This guide is based on the "DirectAdmin 1.5 with CentOS 6" template for self-managed virtual private servers.
0. Preliminary Requirements:
- A server with the "DirectAdmin 1.5 with CentOS 6" template installed.
1. Generate a Self-Signed Certificate:
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/exim.key -out /etc/exim.cert
2. Restart "Exim" and "Dovecot" Services:
/sbin/service dovecot restart
/sbin/service exim restart
After completing these steps, you can use an encrypted connection for checking your email via port 993 (IMAP) or port 995 (POP3) and for sending email via port 465 (SMTP).