Which SMTP Port Should I Use? Understanding Ports 25, 465, & 587

Comments · 374 Views

In this article you will read about SMTP ports.

We get a lot of questions concerning SMTP port numbers here at Mailgun. Mailgun has various SMTP port choices to assure connection to our Simple Mail Transfer Protocol (SMTP) gateway, but which one should you use to deliver email messages? We'll go over each SMTP port's history, followed by a discussion of today's outgoing mail mechanism. If you're not a history buff, the most frequent SMTP ports may be found in "Which SMTP port should you use?"

What is an SMTP port?

Before we embark on our journey through history, we'll define a few terms.

SMTP Port is an abbreviation for Simple Mail Transfer Protocol, which is the method through which emails are transferred across the Internet. Computer ports are the means through which individual computers connect to a network and carry out electronic tasks. An SMTP port is a hybrid of the two: it is a port designed to transmit email through a network to its intended receiver.

Of course, just as there are several computer ports, there are numerous SMTP ports available for usage. Let's take a peek at how they're progressing.

SMTP ports: A historical perspective

The University of Southern California made a proposal to the Internet Engineering Task Force in 1982. (IETF). RFC 821 was released, defining port 25 as the default transmission route for internet email. We still utilise port 25 as the primary mechanism of delivering email between two mail servers 30 years later. A few RFCs have superseded the original SMTP RFC. The foundation for SMTP connections, on the other hand, stays the same or similar.

R. Gellens and J. Klensin filed RFC 2476 in December 1998 in favour of establishing a new specification for internet email communications. The RFC proposes separating the conventional concepts of message submission and message relay. To assure fresh message submission, the RFC specified that it should take place through port 587.

What about port 465?

Surprisingly, the IETF never designated port 465 as an official SMTP transmission or submission channel. Instead, the Internet Assigned Numbers Authority (IANA), which manages most of the internet's fundamental infrastructure, assigned port 465 to SMTPS. The goal was to provide a Secure Sockets Layer (SSL) port for SMTP to use (SSL). SSL is often used to secure internet conversations.

The port was assigned for roughly a year before being withdrawn in order to facilitate the use of Transport Layer Security to secure SMTP conversations (TLS). The last nail in the coffin was a new protocol command called "STARTTLS," which was added in RFC 2487. This command enables SMTP servers to interact over existing ports by informing the target server whether it supports TLS encryption. If this is the case, the transmitting server.

Port 2525:

The IETF and IANA do not support this port. In the case that the aforementioned ports are restricted, Mailgun supplies it as an alternative port that mimics port 587. Because 2525 is a non-standard high port number, it is often permitted on consumer ISPs and Cloud Hosting services such as Google Compute Engine. If you've tried the aforementioned ports and are still having problems connecting, try port 2525. This port also supports TLS encryption.

Port 587:

This is the standard email submission port. This is the one that will deliver the greatest outcomes when users submit an email to be routed via a proper mail server.

Port 587, in conjunction with TLS encryption, guarantees that email is submitted securely and in accordance with the IETF requirements.

Unless expressly restricted by your upstream network or hosting provider, all Mailgun clients should consider utilising port 587 as their default SMTP port.

Comments