Finding the default SMTP port is not easy. When you are setting up the Simple Mail Transfer Protocol, the only question that comes to mind is, “what port should work best for an SMTP connection?”. Since there are various ports available for SMTP, finding one among them is difficult. But if you learn a little about each port in the connection, then it will be simple for you to find the default one. This article will teach you about ports and when to use them. So, let’s dive further into this article and find out which port to use among 25, 465, 587, or 2525 SMTP.
What do you know about SMTP Ports?
You will require a port option to ensure connectivity to a Simple Mail Transfer Protocol (SMTP) endpoint. These ports are valid when you are trying to send an email from the server. For example, if you are sending an email from Outlook, which is an email client that uses SMTP connections to upload your outgoing emails to the server.
Sometimes email clients use IMAP or POP3 protocols to upload the emails to their servers, but that is another context. Right now, we are talking about the SMTP port that will help the email client upload the email to the server so that the message is delivered to the correct recipient.
Often, users need to send emails from a different platform, such as WordPress. Suppose you are unable to send emails from your WordPress website even when Outlook or another client is integrated into the platform. In that case, you can make use of an SMTP service such as Google Workspace that will help you send email from your WordPress to an outside recipient that is not connected to your WordPress website. But when you are sending an email from your client or WordPress website, you will need to find out which port to use.
Email servers use SMTP, or Simple Mail Transfer Protocol, when delivering emails from one system to another. Apple Mail, Outlook, etc., use this protocol to upload their users’ emails to the server before sending them away to the destination. The protocol relies on the domain name and internet addresses to know where to send the email message. The protocol uses domain names such as www.rotate.com and internet addresses like 126.96.36.199 to ensure that the message is being delivered to the right recipient.
These network addresses include ports that the protocol uses specifically to send a message. For example, HTTP uses port number 80, but when you are sending an email through SMTP, the port number depends on multiple factors. An SMTP port is a combination of a port that is created to send an email message through the network and to the recipient. We will learn about what port to use while sending an email, but before that, let’s learn a little about its history.
What is the History of SMTP Ports?
In 1982, the default transmission channel for sending emails was port 25, which the University of Southern California released by requesting the service from the Internet Engineering Task Force (IETF). After three decades, port 25 was still the default port number for transmitting email messages between two servers.
However, 30 years later, some other Requests For Comments (RFC) was passed to the IETF, but the SMTP connection ports were still similar or the same. In 1998, another request was made by R. Gellens and J. Klensin that said they wanted to add new specifications to the email communications. After the request, the IETF decided to divide the traditional message submission and message relay concepts. They have defined that message submission will follow port 587 to ensure that the new security requirements and policies do not interfere with the traditional relay concept that uses port 25.
So, that’s the history of internet email ports, but why do they matter?
Why do you need SMTP Ports?
If you want to send an email message through an SMTP server, such as Gmail SMTP Server, you will require the IP address and port number of the server. But there are different SMTP ports and not all of them are suitable for all situations. For instance, port 25 transfers messages from one place to another within a mail server, but sometimes this port is blocked by ISPs and cloud providers like Google Cloud.
That’s why when you attempt to connect an SMTP server to port 25, it will encounter problems because many services do not allow this port. That’s why various ports were invented.
Various Ports for Multiple Uses
Different SMTP ports have different use cases, and in SMTP transmission, there are two main purposes:
- Submission: Submission refers to submitting a message to an outgoing server. Such as, when you are sending an email through Apple Mail, that message needs to be uploaded to an outgoing mail server first.
- Relay: Relay is the process of relaying the email message between two different servers. When an email is uploaded to the outgoing mail server, the server will relay the email to the recipient’s mail server.
To implement these two purposes, SMTP uses different ports. Let’s discuss them now.
How Many Ports are there in SMTP?
There are four SMTP ports including:
We have talked a little about port 25 in the middle of this article, but let’s find more about it now.
What does Port 25 signify?
Port 25 is the oldest SMTP port, having been established in 1982. It is a common SMTP port that is mostly found in SMTP relays. However, when configuring an SMTP connection to your WordPress site or email client, try to avoid this port because many services do not support it and will immediately block it when a connection is detected. What motivates them to do so? Because this port is associated with spam emails sent from a vulnerable or compromised system, it may be useful in SMTP submission.
What does Port 587 signify?
Port number 587 is the default port for SMTP submission, but you can also use other ports for SMTP submission. However, you should only start the submission with port 587 and change it to another port only when there is a problem, like an email server blocking the port for any reason. In that case, check out what other port you can use. But port 587 supports TLS, which means you can submit emails and secure the transmission whenever you want.
What does Port 465 signify?
Port 465 was initially created for SMTPS and not SSL, but the function didn’t perform well, and for that reason, the port was reassigned to a different function. Still, many cloud hosting providers support 465 for SMTP submission.
What does Port 2525 signify?
Port 2525 is not official or something that IETF recognizes. Still, it is an alternative port for 587 for submission. People use this port because most hosting providers do not reject or block 2525’s connection. If you can’t connect to port 587, then port 2525 is a great alternative.
Which Port should you use?
You have already learned which ports serve which purposes, but in this section, we will talk about how to choose the right port. If you are setting up your website or email client to deliver emails through SMTP submissions, you should use port 587, which is the default SMTP port for submissions. Port 587 supports TLS submissions for a secure connection. But if port 587 is blocked, then you can use 2525 as an alternative. Even though 2525 is not an official SMTP port, many cloud providers often use and support it.
SMTP does not support port 465 anymore, and as its alternative, ports 587 and 2525 do a great job. But if these two do not work, then go with port 465. However, try not to use port 25 when setting up an email client or WordPress site because many cloud providers do not support it.
What are POP and IMAP?
POP refers to Post Office Protocol, and its latest release is POP3. IMAP refers to the Internet Message Access Protocol. Both POP and IMAP are the oldest protocols created on the internet for email services such as Outlook, Thunderbird, etc., that help in retrieving emails from the server. In POP, the default ports are TCP ports that include 110 and 995. In IMAP, the default ports are 143 and 993. Both of them are TCP ports that process insecure as well as secure sessions. These ports can reflect the state of the email back to the server, no matter if it was marked as spam, read, or flagged. But the ports can also preserve a copy of the email on the local system so that it can be accessed easily offline. But POP3 can be applied without SMTP.
Now that you know about the default SMTP ports, you can easily implement them on your server. One of the main options to consider in an SMTP server is a hosted email relay, and the other is an on-premises SMTP server. SparkPost allows you to host an email relay, create an on-premise SMTP server, and go with the PowerMTA service provider. To learn more about basic and advanced SMTP server configuration, you can check out our other related articles. Also, feel free to ask us anything you need help with.