What's the Right SMTP Port? 587 vs 25 (2024)

Quick Definition: The difference between port 25 and port 587 comes down to security. While port 25 is the standard SMTP port for email transmissions, it's unencrypted and therefore less commonly used due to security concerns. Port 587 is used for secure and encrypted email communication, and employs TLS or SSL to protect sensitive data, requires user authentication, and is often mandated for regulatory compliance. This makes port 587 a more secure option compared to port 25.

In general, securing your email communications is always important, especially if you’re dealing with sensitive data, financial info, or personally protected information. However, it may not be necessary for non-sensitive, personal conversations.

Understanding these differences is essential if you’re taking the Network+ certification exam and learning how encryption relates to port 25 and port 587. In this article, we’ll discuss the function of both these ports in relation to SMTP.

What is SMTP?

If you have ever sent an email, then you have used SMTP. SMTP, or Simple Mail Transfer Protocol, is a set of standards used to send email to and from different computers on a network. Whenever the email is unencrypted, it is sent via port 25. If the data is encrypted, it is sent via port 587.

What is a Port?

A port is a gateway or connector that allows a computer to interact with other devices or services. For example, an HDMI port is a physical connector that allows a user to access their monitor. However, in the context of application-level software, 'ports' refer to virtual ports, which are sectioned off by the computer. Virtual ports are 16-bit integers that ride on the packet and are used to identify which “doorway” a particular protocol should route to.

Simple Mail Transfer Protocol Explained

SMTP was created in 1982 to establish a standardized and reliable electronic mail (e-mail) transmission across networks. The whole point of SMTP is to simulate the flow of regular paper mail. Before SMTP, engineers were coming up with proprietary or ad hoc methods to send emails. Standardizing email transmission fostered the expansive and reliable internet we know today.

Why Does SMTP Use Multiple Ports?

SMTP uses different Ports depending on whether the data will be encrypted or unencrypted. Port 25 is the traditional port SMTP has always been on. A server, such as a Microsoft Exchange server, will have port 25 opened up and ready to send emails.

On the flipside, SMTP will leverage port 587 for encrypted messages. SMTP is not inherently secure but can be using STARTTLS. STARTTLS stands for “Start Transport Layer Security.” It is commonly used in conjunction with SMTP to provide a secure way of sending out emails. If both the client and the server support STARTTLS, they will negotiate encryption parameters and establish a secure communication channel.

STARTTLS will use port 587 to establish a secure TLS connection between the sending machine and the SMTP server. TLS stands for Transport Layer Security, and is used to encrypt transmitted data. If SMTP uses TLS for secure transmissions, what protocol is used to actually transport it? Let’s find out.

What's the Right SMTP Port? 587 vs 25 (1)

Does SMTP Rely on TCP or UDP?

SMTP uses TCP (Transmission Control Protocol) to send emails. It uses TCP because it's very important that every word of an email is sent correctly and in order.

UDP (Unigram Data Protocol) on the other hand, is used for data that can withstand a degree of packet loss – such as streaming a video. With that broad understanding in mind, let’s focus on port 25 in the next section.

What is SMTP Port 25?

Port 25 on SMTP is the standard Port for all email transmissions. If an email is sent between two SMTP servers, it’ll be sent over port 25. Unencrypted communication between a computer sending an email and the server will also be sent over port 25.

What is Port 25 Used For?

Port 25 is generally used to send SMTP emails over the internet. Port 25 connects SMTP servers to different servers so that an email can successfully route to its final destination.

Port 25 is not used quite as often from the host machine to the server because of the rise of spam. To reduce spam, servers often block port 25 in favor of port 587, allowing for better authenticated and more easily identifiable traffic.

What Devices or Technologies Use Port 25?

Any device capable of sending, receiving, or reading email uses port 25. For example, an IoT device could use port 25 to send status updates to a user.

As covered earlier, SMTP servers will use port 25 for server-to-server email routing. Often, automated logging software will use port 25 to send status updates on application or logging analytics.

Lastly, a printer or scanner could use port 25 to email a scanned document or to verify status configurations. SMTP is a varied and versatile protocol that has facilitated communication in a diverse array of settings.

Why is Port 25 Not Secure?

It is important to note that port 25 is not inherently insecure. However, it has traditionally been used as the insecure transmission port for SMTP. Since SMTP is not secure, port 25 is de facto considered insecure. Additionally, SMTP lacks authorization mechanisms. That means virtually anyone can connect to the SMTP server and pretend to be somebody they are not.

What's the Risk of Using Port 25?

Most of the risks regarding port 25 stem from SMTP’s lack of encryption and authentication. Using SMTP on port 25 means that any transmission or log in credential can potentially be intercepted and read by malicious actors. Emails sent over port 25 can be a red flag that should be checked; most data in an organization is sensitive to some degree and shouldn’t be sent unencrypted.

Also, a hacker can exploit vulnerabilities in your SMTP server to funnel spam. This can cause phishing attacks on your organization to skyrocket or increase the spreading of malware via shady links. With all of these risks, it’s a wonder why ort 25 is open at all–let’s explore that idea a little bit.

Should Port 25 Be Closed?

With all this naysaying on port 25, you may feel inclined to say the hell with it and close the port altogether. Closing a port involves stopping all network access to a computer through that specific port, resulting in any data directed to that port being denied.

Typically, this is achieved by adjusting firewall settings to prevent unauthorized access from malicious individuals trying to enter through a non-permitted port. As a best practice, all ports should be kept closed by default and only opened when a specific need exists. While that may be a viable security measure, there are some considerations to consider.

For instance, many IoT devices, printers, and scanners use port 25 as their default outbound SMTP port. If port 25 is closed, reconfigure all your devices to use an alternative port.

Also, recall that there is nothing inherently insecure about port 25. So if you do change Ports, make sure they are secured via STARTTLS or some other means.

Suffice it to say your best bet is to use encrypted channels when transmitting emails. The following section explains this in detail.

What is SMTP Port 587?

Port 587 is used to send emails in a secure and encrypted manner. Port 587 uses TLS or SSL to ensure an email stays confidential and cannot fall victim to eavesdropping. This contrasts with port 25, which sends emails unencrypted.

What is SMTP Port 587 Used For?

Port 587 is used to send emails that contain sensitive data. Any data that may have confidential, personal, or potentially embarrassing information needs to be sent encrypted, thereby sent on port 587. Oftentimes, a networking admin will configure port 587 to use STARTTLS.

The Reason Port 587 Has Increased Security

One of the primary drivers for increased security is the propensity for spam emails. Often, port 25 is used as a way to submit floods of spam, malware, and phishing attacks via a hijacked machine on the network. A lot of that changed once secure SMTP came about.

Using port 587 instead of port 25 requires the user to authenticate with credentials. This greatly decreases a hacker’s attack vector. Also, port 587 is just plain required in multiple agencies due to regulatory compliance, thereby increasing security.

Lastly, port 587 increases security by making emails far less susceptible to packet sniffing. Unencrypted data can be easily extracted and read by malicious actors; this isn’t so with port 587.

What Devices or Technologies Use Port 587?

Port 587 is generally used by the following devices:

  • Cloud Services: All emails that travel to the cloud are secured on port 587.

  • SMTP Relay Servers: A separate server leveraged by organizations to decrease the overall load on their primary server. They will use port 587 to mitigate spam congestion.

  • Smartphone: Smartphones always encrypt emails via port 587 prior to submission.

  • Email Clients: All email clients (Outlook, Thunderbird, Apple Mail, etc.) leverage Port 587 to submit emails. This minimizes hacking attempts and contributes to the preservation of their positive reputation.

These are only four of plenty of other technologies that utilize port 587. The rule of thumb is that port 587 is used by any technology that needs to send encrypted emails.

Is Port 587 Secure?

Yes, by all available measures, port 587 is secure. Bear in mind that this is assuming all encryption parameters are configured correctly. For example, STARTTLS must be configured on the server AND each host machine to maintain proper encryption.

Also, firewall rules should be implemented to ensure emails can only be submitted via port 587. Assuming everything is configured correctly, port 587 is secure.

Should You Be Using Port 587?

Yes, port 587 is the way to go if emails require any discretion whatsoever. If you are in an organization of any kind, it’d be a good idea to configure your servers and nodes for secure SMTP. That said, contacting your email provider and seeing what they recommend is also important.

Additionally, port 587 requires some sort of authorization mechanism – often in the form of OAuth Tokens. Once that is established, you’ll be good to go to leverage port 587. With all that said, let’s recap the primary differences between port 25 and port 587 in the next section.

SMTP Port 25 Vs. Port 587

Regarding SMTP port 25 vs port 587, the main difference is that the former is unsecure, while the latter is secure. Port 25 is the traditional Port for unencrypted SMTP submissions, while port 587 will use an encryption mechanism such as STARTTLS.

Best Use Cases for Port 25 Vs. Port 587

Use this convenient list to determine when you should use port 25 or port 587.

  • Use Port 587 if:

    • Security is a priority

    • Your ISP Blocks port 25

    • You’re on a modern email service like Gmail, Apple Mail, or Outlook.

  • Use Port 25 if:

    • Your network is on a legacy server that does not support STARTTLS.

    • The emails are internal only, then it might be fine to use port 25.

    • You are configuring server-to-server communications. Servers generally send emails using port 25.

Conclusion

Understanding the difference between port 25 and port 587 is critical before taking the Network+ certification exam. To summarize, port 587 is used for encrypted communication, while port 25 is unencrypted. Port 25 is used for server-to-server communication, while port 25 will be used to communicate from a network node to the server.

Port 587 requires authorization from OAuth or passwords, while port 25 does not require any identity access. The lack of authorization makes port 25 susceptible to hacking.

Once you have a good understanding of both ports, it’d be a great idea to understand how VPNs work, as you can bet that subject will also be on the Network+ Exam.

Not a CBT Nuggets subscriber? Sign up for a 7-day free trial.

What's the Right SMTP Port? 587 vs 25 (2024)

FAQs

What's the Right SMTP Port? 587 vs 25? ›

Originally, the Simple Mail Transfer Protocol (SMTP) used port 25. Today, SMTP should instead use port 587 — this is the port for encrypted email transmissions using SMTP Secure (SMTPS). Port 465 is also used sometimes for SMTPS. However, this is an outdated implementation and port 587 should be used if possible.

Is SMTP port 25 still used? ›

SMTP port 25 continues to be used primarily for SMTP relaying. SMTP relaying is the transmission of email from email server to email server. In most cases, modern SMTP email clients (Microsoft Outlook, Mail, Thunderbird, etc.)

Is port 25 vulnerable? ›

The Simple Mail Transfer Protocol uses port 25. It is used for sending and receiving emails and is considered vulnerable because it lacks authentication. This makes it susceptible to spam and email spoofing, and it is also vulnerable to open relay abuse.

Is opening port 25 safe? ›

Web servers are favored by spammers because they are relatively powerful, and because the network connection to most web servers is fast and reliable. By leaving port 25 unmonitored and open, web hosting providers are at risk of enabling spammers within their network to run wild with huge volumes of spam traffic.

What SMTP should I use? ›

It also supports Transport Layer Security (TLS)—the successor to Secure Sockets Layer (SSL)—a security protocol that encrypts emails while they are in transit. All of this considered, it is recommended that you always use port 587 to send emails with SMTP.

Should I use port 25 or 587 for SMTP? ›

Originally, the Simple Mail Transfer Protocol (SMTP) used port 25. Today, SMTP should instead use port 587 — this is the port for encrypted email transmissions using SMTP Secure (SMTPS). Port 465 is also used sometimes for SMTPS. However, this is an outdated implementation and port 587 should be used if possible.

Why is SMTP port 25 blocked? ›

SMTP port 25 is blocked on all Droplets for new accounts to prevent spam and other abuses of our platform. Even if SMTP were available, we strongly recommend against running your own mail server in favor of using a dedicated email deliverability platform.

Is port 587 vulnerable? ›

With support for encryption, authentication and tamper proofing, sending mail over port 587 can prevent spamming and email-related vulnerabilities.

Is port 25 blocked by hosting provider? ›

Many providers block access to send data out on port 25 as a way to prevent spam from being sent from their network, but, as this port is essential for communicating with external mail services, it also prevents mail from sending for legitimate users.

Can you run a mail server without port 25? ›

You need to have port 25 incoming and outgoing allowed but only to and from the mail server that is visible to the Internet.

How to check if port 587 is open or not? ›

Follow this guide if you're a Windows user:
  1. Open the Start menu. Type Windows Security in the search bar and click on it in the results.
  2. Click on Firewall & network protection.
  3. Scroll down and select Allow an app through firewall.
  4. Find your email client or port 587 entry and ensure it's allowed.
Apr 26, 2024

Which port should not be open? ›

Common High-Risk Ports
PortProtocolRecommended Action
139TCP and UDPDisable always.
445TCP and UDPDisable always.
161TCP and UDPDisable always.
389TCP and UDPDisable always.
28 more rows
Apr 6, 2023

Is port 587 TLS or SSL? ›

Port 587 is often used to encrypt SMTP messages using STARTTLS, which allows the email client to establish secure connections by requesting that the mail server upgrade the connection through TLS. Port 465 is used for implicit TLS and can be used to facilitate secure communications for mail services.

What is port 25 SMTP used for? ›

These days, port 25 is mainly used for SMTP Relaying – transmitting messages between different email servers. It's not recommended to use for email submission unless you specifically manage your own mail server.

Is Gmail SMTP port 465 or 587? ›

On the device or in the app, for server address, enter smtp.gmail.com. For Port, enter one of the following numbers: For SSL, enter 465. For TLS, enter 587.

Should port 25 be closed? ›

There's no reason to have port 25 open from your internal network to the e-mail server, that should be blocked. Externally it should be open, but under no circ*mstance should it be an open relay that allows anonymous connection.

Is SMTP still used today? ›

Nevertheless, today many servers still use SMTPS and maintain 465. A default SMTP port 587 is the option to submit an email for routing. TLS encryption ensures the secure submission of the email. Almost all mail servers support 587.

Is SMTP obsolete? ›

The SmtpClient type is obsolete on some platforms and not recommended on others; for more information, see the Remarks section.

How do I know if my SMTP port 25 is open? ›

Type telnet MAILSERVER 25 (replace MAILSERVER with your mail server (SMTP) which may be something like server.domain.com or mail.yourdomain.com). Press Enter. If that port is blocked, you will receive a connection error.

Top Articles
Articles
How men and women spend their money differently
English Bulldog Puppies For Sale Under 1000 In Florida
Katie Pavlich Bikini Photos
Gamevault Agent
Pieology Nutrition Calculator Mobile
Hocus Pocus Showtimes Near Harkins Theatres Yuma Palms 14
Hendersonville (Tennessee) – Travel guide at Wikivoyage
Compare the Samsung Galaxy S24 - 256GB - Cobalt Violet vs Apple iPhone 16 Pro - 128GB - Desert Titanium | AT&T
Vardis Olive Garden (Georgioupolis, Kreta) ✈️ inkl. Flug buchen
Craigslist Dog Kennels For Sale
Things To Do In Atlanta Tomorrow Night
Non Sequitur
Crossword Nexus Solver
How To Cut Eelgrass Grounded
Pac Man Deviantart
Alexander Funeral Home Gallatin Obituaries
Energy Healing Conference Utah
Geometry Review Quiz 5 Answer Key
Hobby Stores Near Me Now
Icivics The Electoral Process Answer Key
Allybearloves
Bible Gateway passage: Revelation 3 - New Living Translation
Yisd Home Access Center
Pearson Correlation Coefficient
Home
Shadbase Get Out Of Jail
Gina Wilson Angle Addition Postulate
Celina Powell Lil Meech Video: A Controversial Encounter Shakes Social Media - Video Reddit Trend
Walmart Pharmacy Near Me Open
Marquette Gas Prices
A Christmas Horse - Alison Senxation
Ou Football Brainiacs
Access a Shared Resource | Computing for Arts + Sciences
Vera Bradley Factory Outlet Sunbury Products
Pixel Combat Unblocked
Movies - EPIC Theatres
Cvs Sport Physicals
Mercedes W204 Belt Diagram
Mia Malkova Bio, Net Worth, Age & More - Magzica
'Conan Exiles' 3.0 Guide: How To Unlock Spells And Sorcery
Teenbeautyfitness
Where Can I Cash A Huntington National Bank Check
Topos De Bolos Engraçados
Sand Castle Parents Guide
Gregory (Five Nights at Freddy's)
Grand Valley State University Library Hours
Hello – Cornerstone Chapel
Stoughton Commuter Rail Schedule
Nfsd Web Portal
Selly Medaline
Latest Posts
Article information

Author: Foster Heidenreich CPA

Last Updated:

Views: 6256

Rating: 4.6 / 5 (76 voted)

Reviews: 83% of readers found this page helpful

Author information

Name: Foster Heidenreich CPA

Birthday: 1995-01-14

Address: 55021 Usha Garden, North Larisa, DE 19209

Phone: +6812240846623

Job: Corporate Healthcare Strategist

Hobby: Singing, Listening to music, Rafting, LARPing, Gardening, Quilting, Rappelling

Introduction: My name is Foster Heidenreich CPA, I am a delightful, quaint, glorious, quaint, faithful, enchanting, fine person who loves writing and wants to share my knowledge and understanding with you.