Which SMTP Port Should You Use ? (Ports 25, 587, 465, or 2525)

Which SMTP Port Should You Use ? (Ports 25, 587, 465, or 2525). Well, the SMTP communications protocol that describes how email is transmitted over the Internet. In addition, it is used by applications such as Apple Mail and Outlook to send messages to mail servers, which makes it very useful. Moreover, SMTP mail relies on domain names and Internet addresses to know where to send the messages in question. 

In this article we learn what SMTP Port is, how it works. After, we answer the question, which port is the best solution for you and why.

I invite you to read the article Which SMTP Port Should You Use ? (Ports 25, 587, 465, or 2525).

What is SMTP Port?

Firstly, the basic standard is that email servers use today to send emails between each other over the Internet is, of course, SMTP. Also, its interesting that it is used by applications such as Outlook and Apple Mail to send messages to mail servers. Which then forwards it to other mail servers. In a rather simpler way, it is explained that these two unique protocols communicate through something called ports. 

Secondly, imagine children talking to each other through two cans connected by a string. Also, the cans represent devices, while the string represents a port. One device sending messages to the other through a means of communication.

What exactly is the SMTP Port used for?

If you want to start using an SMTP server, you should set up a separate email account. One way to do this is to enter an IP address and the number of a particular port, in order to properly route emails.

Generally, important point is that there are three things that emails must go through before they reach their recipient:

  • Email submission – Send an email to an outgoing mail server. Since this is done via SMTP, you need to decide which port to use.
  • SMTP relay – relays messages between two mail servers. Normally, the default port is used so that the user does not have to configure the port.
  • Receiving EmailEmail arrives at the recipient’s server. This process is handled by Internet Message Access Protocol (IMAP)/Post Office Protocol 3 (POP3).

Why is more than one port used for SMTP?

If you want to send someone an email from one client to another, it consists of several steps. Namely, you have to send the email from your client to the mail server, which means that it is passed from one server to another until it is received by the recipient client. Also for each step there are different ports to get started.

Source Image: postmarkapp.com

When setting up your own mail server, your main task is to receive mail from external sources, systems. Among them are Yahoo, Gmail. Additionally, you must grant standard port 25 permission to send email. Unfortunately, this is the only port mail servers one uses to send and forward mail.

For mailings, however, the story is a little different.

Hence, in this situation, when a mail client needs to send a message for delivery, it usually connects to a different port. In most cases, this is port 587. Even though the protocol between the mail client and the server is the same, they use different ports.

IMAP, POP Protocols

All in all, emails are not received using SMTP. Further, those two protocols IMAP or POP are the protocols used for receiving email and they use different ports. But, if email sending and delivery are both done via SMTP, why is the port different?

One reason, in preventing users from creating spam and sending it over their networks. Basically, it causes many ISPs to start blocking port 25 from sending mail to external systems. Moreover this prevents many malicious messages from being sent on consumer/home connections, as receiving servers usually only receive mail on port 25.

Basically, when a connection with a mail server is established, the server must decide whether the client wants to forward the message for delivery to the mail server. Or, whether the client wants the server to forward the message to another SMTP server. By using different ports, mail server administrators add different restrictions and authentication requirements for each type of interaction.

Which SMTP Port should you use?

Source Image: sparkpost.com

1. Port 25

Firstly, Port 25 has long been the primary and original SMTP port for email, and the oldest. Secondly, a certain group called IANA, is still responsible for maintaining a certain Internet addressing scheme, so port 25 is considered the default. What’s more, it is still used and passed from server to server, then most new SMTP clients should not be configured to use this port.

Henceforth, it is commonly blocked by both home ISPs and business cloud hosting providers. Because it has a bad reputation as the port of choice for spammers sending out massive amounts of spam.

When would you use Port 25?

Basically, default port for internet email relay. However, you specify a port number for sending email to the SMTP server (as long as it is within the range of custom port numbers allowed).

In special cases, you must use port 25 on your SMTP server. One of these cases is receiving an out-of-band/async error. These failures are post mortem. Why? Because this means that the recipient domain accepts the message from the SMTP server but returns the message later. Out of band errors are sent asynchronously to the return path address (MAIL FROM) of the original message. 

That’s why the recipient domain attempts to send these returns to the reverse path MX server and port 25 (because port 25 is the default Internet email relay port). Another example is feedback loop (FBL) reception.

Furthermore, Port 25 is the recommended port number for SMTP communication between mail servers (eg for relaying messages).

2. Port 587

Indeed, port 587 is the recommended port for mail clients to send messages to the mail server.

Meanwhile, it is actually specified in RFC 2476, which says “Port 587 is reserved for sending email messages…”. Therefore, port 587 is also referred to as the message transfer port and port 25 is also referred to as the message relay port.

Nonetheless, every sending server or MSA must implement SMTP authentication. But this process requires SMTP clients to log in and authenticate themselves to the mail server (MSA) they connect to before being granted access. Port 587 is associated with these egress servers, so using port 587 usually means using authentication.

It is this authentication mechanism that prevents the spread of spam and malware. And it is also why port 587 is preferred over port 25 when sending mail (client to server).

3. Port 465

Significantly, port 465  is no longer an accepted standard for SMTP. However, there are some legacy systems that still use port 465 for SMTP, and some online help pages still suggest port 465 as the recommended setting. This port gained redundancy in the late 1990s, but still uses the passive implicit SSL method to establish secure transmission.

IANA originally allocated port 465 for an encrypted version of SMTP called SMTPS. Initially proposed to send email using Secure Sockets Layer (SSL). However, IANA has since reassigned this port for other uses, so it is no longer be used for SMTP.

Importantly,  port 465 is still used by older devices and applications, by default for SMTP. In particular, some older Microsoft applications still don’t support STARTTLS, so port 465 is suspended.

We can clearly state that actually port 465 is not recommended for use for SMTP, if you don’t have to, of course. Many current and modern hosting and data mail service providers block it or do not support it at all.

4. Port 2525

Lastly, Port 2525 is not an official SMTP port and is not certified by IETF or IANA. Many other email providers support using port 2525 instead of port 587 for SMTP if the above ports are blocked. (One notable example of this being necessary is a service hosted on Google Compute Engine.) If you have tried port 587 and have trouble connecting, try port 2525. Like port 587, most implementations listening on port 2525 also support TLS encryption.

It’s also important to note that if you need to set up your mail server and port 587 doesn’t work, port 2525 is an ideal alternative.

Thank you for reading Which SMTP Port Should You Use ? (Ports 25, 587, 465, or 2525). We shall conclude this article. 

Which SMTP Port Should You Use ? (Ports 25, 587, 465, or 2525) Conclusion

Significantly, the above article clears your doubts about the SMTP ports and its importance. This is how SMTP in particular plays a very important role in transporting e-mail on the Internet.

We hope it is more clear to understand that SMTP plays a very important role in the transmission of emails on the web. In the summary, it is noticeable that port 465 is already obsolete and unused so we can confidently discard it. 

However, as for port 587 and 2525, we state that they complement each other. The former is used as the most advanced and secure way of SMTP transmission. As for the second, if port 587 is blocked, we can use this port as an alternative. Finally, we can look at port 25, which is generally blocked by default, although commonly used for SMTP relay only.

So port 587 and 2525 should be the best solutions.

Thanks’ for your time. Do explore our email content by navigating to this section of our blog. 

Avatar for Kamil Wisniowski
Kamil Wisniowski

I love technology. I have been working with Cloud and Security technology for 5 years. I love writing about new IT tools.

5 1 vote
Article Rating
Notify of
Inline Feedbacks
View all comments
Would love your thoughts, please comment.x