You might have heard of such things as SMTP ports and already know that it has something to do with setting up your email software. But what is it exactly, and how do you determine the proper one? This article will explain what you need to know.
Before we dive into ports, it’s best to know what SMTP is in the first place and how it works.
What Is SMTP?
It is an abbreviation for Simple Mail Transfer Protocol, the standard protocol for transferring emails from one computer to another. Whenever you type an email and hit the send button, you’re transferring the contents from your device to the recipient’s server. SMTP is a set of rules that guide the data on its way.
Below is a summary of how an email is transmitted from the sender to the receiver:
- You type an email and hit the send button.
- Your email client program connects to its assigned mail server.
- The client forwards all the message contents to the server, including the body, attachments, “From” and “To” addresses, and assorted technical headers.
- The server checks if the “From” and “To” addresses share the same domain name. If so, it forwards the contents to the recipient’s mailbox immediately because it’s on the same mail server. If not, it queries the domain name system (DNS) for the MX records of the addressee’s domain to identify the mail server servicing that domain, and sends the message there.
- The receiving server verifies the incoming mail and stores it in the recipient’s mailbox.
In the above scenario, the receiving server is identified by its IP address found in the domain’s MX record. But apart from that address, one more parameter is required for successful communication – the port number. The port number lets the receiving server know which application should process a particular chunk of incoming data. Without it, the server would not distinguish between part of an email in transit and, say, a stream of video data someone else is uploading at the very same time.
It should be noted that when your email client software connects to your SMTP server, it also needs to know the SMTP port number. In most cases, you only enter it once during initial setup (or do not need to provide it at all, as in the case of web-based clients). Read on to learn which port numbers are commonly used for SMTP and what’s the difference between them.
There are four main SMTP ports identified by these numbers: 25, 587, 465, and 2525. These ports have unique properties, which you must know when deciding which one to use. We’ll explain these characteristics below.
This is the oldest port in use, established in the early 1980s, when the need for data encryption was not yet foreseen. It is prone to abuse by spammers and malicious actors, so many email providers don’t support it at all.
This is SMTP’s default port for secure email submission. It lets users send encrypted emails and avoid interception by unauthorized third parties.
This port was established in the late 1990s for secure email submission. However, it was deprecated in favor of 587. Many ESPs still support 465, but you should avoid using it because it’s no longer standard.
This is an alternative to 587. It’s not officially recognized as an SMTP port, but many ESPs support it.
Which Port Should I Use?
The safest way to find out which port to specify when setting up your email client software is to ask your mail server’s administrator. If they are not available, you may still determine the proper port by yourself, through trial and error.
You should first try 587 – it is always the best choice because it offers secure communication mode, and virtually all email service providers support it.
If 587 isn’t available, you can try 2525. However, it’s important to note that port 2525 is not officially designated for SMTP by the IETF (Internet Engineering Task Force) and might only be supported by some email service providers.
465 has long been deprecated, meaning the server may not support it. However, it has seen a resurgence for secure SMTP submissions and is commonly used with SSL/TLS.
Spammers often abuse port 25, but it’s still widely used for email transfer. Port 25 is appropriate for specific contexts, particularly server-to-server communication, rather than for client submission of emails.
In summary, ports 587 and 2525 are commonly used for secure email submission and are generally good choices, while ports 25 and 465 have their more specific uses.