Required Ports for a Mail Server
For a mail server to work, the ports below need to be open in the firewall. Which ports you open depends on the services you use on your server.
Ports
| Port | Service | Used for |
|---|---|---|
| 25 | SMTP | Sending and receiving email between servers. Must be open to receive email from other servers. |
| 465 | SMTP submission (SSL/TLS) | Sending email from email programs; the connection is encrypted from the start. |
| 587 | SMTP submission (STARTTLS) | Sending email from email programs; the connection is encrypted after it is opened. |
| 993 | IMAP (SSL/TLS) | Reading email; messages stay on the server. |
| 995 | POP3 (SSL/TLS) | Downloading email to your computer. |
| 143 | IMAP | IMAP starting unencrypted; can be encrypted with STARTTLS. |
| 110 | POP3 | POP3 starting unencrypted; can be encrypted with STARTTLS. |
| 80 / 443 | HTTP / HTTPS | Webmail and SSL certificate validation. |
Which should I use?
We recommend using connections that are encrypted from the start in your email programs: 465 for sending, 993 (IMAP) or 995 (POP3) for reading. RFC 8314, the email standard on this topic, recommends these connections too. Port 587 is also secure; when both sides require encryption, there is no security difference between 465 and 587.
If you do not use ports 143 and 110, which accept unencrypted connections, you can close them in the firewall.
On Verinomi servers
Outgoing email on port 25 is open on our servers. However, bulk email and spam are not allowed on any of our services; when a complaint or a blacklist entry comes in, the server's outgoing email is shut off.
The information in this guide is taken from official documentation: RFC 8314, cPanel: firewall ports.