www.mailgun.com
Open in
urlscan Pro
2600:9000:2156:2200:b:b0de:6300:93a1
Public Scan
URL:
https://www.mailgun.com/blog/which-smtp-port-understanding-ports-25-465-587/
Submission Tags: falconsandbox
Submission: On November 24 via api from US — Scanned from DE
Submission Tags: falconsandbox
Submission: On November 24 via api from US — Scanned from DE
Form analysis
0 forms found in the DOMText Content
Auf dieser Website werden Daten wie Cookies gespeichert, um wichtige Funktionen der Website sowie Marketing, Personalisierung und Analyse zu ermöglichen. Sie können Ihre Einstellungen jederzeit ändern oder die Standardeinstellungen übernehmen. Datenspeicherungsrichtlinie Einstellungen verwalten Alle akzeptieren This app works best with JavaScript enabled. Menu * Pricing * Products * Email API Get set up in minutes and reach the inbox with confidence. * Deliverability Services Ensure every email lands where it's supposed to. * InboxReady Industry-leading tools to help you hit the inbox. * Email Verification Verify that an email address from your list actually exists. * Mailjet Email Marketing The email marketing solution for fast-moving teams * Inbox Placement Catch deliverability issues before they impact your business. * Deliverability Services * Deliverability Services Partner with an email expert to improve your deliverability. * Enterprise Services Grow an enterprise email program with deliverability in mind. * Solutions * Deliverability Land your emails in the inbox with deliverability features. * SMTP Get started in seconds with robust email delivery through SMTP. * Email Sending Personalize, schedule, and send all your emails with confidence. * Email Parsing Automatically parse incoming messages - no more manual work. * Email Marketing Engage with customers with the right campaign at the right time. * Transactional Email Trigger emails when a user takes a specific action in your app. * Send Time Optimization Send emails at the best time to engage with your audience. * Email Analytics Optimize your email performance with powerful analytics. * Burst Sending Attempted delivery of up to 15 million emails in a single hour, guaranteed. * Docs & Blog * Blog Read our lastest articles, product updates, and email tips. * Documentation Check out the full documentation and grab code samples. * Quickstart Guide Get up and running fast to start making the most of Mailgun. * Case Studies Learn from stories of other customers like you. * Podcasts A podcast about how we communicate with each other. * Videos See what Mailgun's all about, watch our webinars, and more * Guides Learn the ins and outs of email and sending best practices. * Help Center Get answers to common questions about Mailgun * Contact * Talk To Sales Talk to our Sales Team to see how we can increase your deliverability. * Get Help With Your Account Find answers to your support questions or technical issues. * Schedule A Demo Schedule a demo to see the Mailgun platform in action. Log InGet Started * Featured Stories * Popular Stories * Categories * Best practices * Customer success * Email DIY * For devs * Quick tips * Security * What's new * Subscribe Blog /Which SMTP Port Should I Use? Understanding Ports 25, 465, & 587 * Email DIY WHICH SMTP PORT SHOULD I USE? UNDERSTANDING PORTS 25, 465, & 587 Mailgun Team • 5 min read It's a common question that we receive here at Mailgun about SMTP port numbers. To ensure connectivity to our Simple Mail Transfer Protocol (SMTP) endpoint, Mailgun offers multiple SMTP port options, but which one should you use to send email messages? We’ll take a historical look at each SMTP port and then we'll discuss today's methodology for outgoing mail usage. If you're not a history buff, go to "Which SMTP port should you use?" for the most common SMTP ports. WHAT IS AN SMTP PORT? Before our trip through history, we’ll clarify some basic definitions. SMTP stands for Simple Mail Transfer Protocol—put simply, it’s the process by which emails are sent across the Internet. Computer ports are how individual computers connect to a network and complete electronic processes. An SMTP port is a combination of both: a port designed to send email through a network and to its recipient. Of course, just as there are multiple computer ports, there are many SMTP ports that can be used. Let’s take a look at their development. SMTP PORTS: A HISTORICAL PERSPECTIVE In 1982, the University of Southern California submitted a proposal to the Internet Engineering Task Force (IETF). Request For Comments (RFC) 821 was published, establishing port 25 as the default transmission channel for internet email. 30 years later, we still use port 25 as the primary means of transmitting email between two mail servers. A few RFCs have obsoleted the initial SMTP RFC. However, the basis for SMTP connections remains the same or similar. In December of 1998, R. Gellens and J. Klensin submitted RFC 2476 in support of adding a new specification for internet email communications. The RFC proposed a split of the traditional message submission and message relay concept. The RFC defined that message submission should occur over port 587 to ensure new policy and security requirements don't interfere with the traditional relay traffic over message relay port 25. DELIVERABILITY SERVICES Learn about our Deliverability Services Looking to send a high volume of emails? Our email experts can supercharge your email performance. See how we've helped companies like Lyft, Shopify, Github increase their email delivery rates to an average of 97%. Learn More WHAT ABOUT PORT 465? Interestingly, port 465 was never published as an official SMTP transmission or submission channel by the IETF. Instead, the Internet Assigned Numbers Authority (IANA), who maintains much of the core internet infrastructure, registered port 465 for SMTPS. The purpose was to establish a port for SMTP to operate using Secure Sockets Layer (SSL). SSL is commonly used for encrypting communications over the internet. The port was assigned for about one year when it was revoked in support of securing SMTP communications using Transport Layer Security (TLS). The nail in the coffin was a new protocol command "STARTTLS," introduced in RFC 2487. This command allows SMTP servers to communicate over existing ports by advertising whether the destination server supports TLS encryption. If so, the sending server can upgrade the connection using the "STARTTLS" SMTP command. Mailgun supports TLS connections, which you can verify by connecting and issuing an "ehlo" from a command line interface. The resultant "250 STARTTLS" confirms the endpoint accepts TLS connection requests. 1> telnet smtp.mailgun.org 587 2Trying 50.56.21.178... 3Connected to smtp.mailgun.org. 4Escape character is '^]'. 5220 ak47 ESMTP ready 6> ehlo blog.mailgun.com 7250-ak47 8250-AUTH PLAIN LOGIN 9250-SIZE 52428800 10250-8BITMIME 11250-ENHANCEDSTATUSCODES 12250 STARTTLS You can test using the same command sequence on any SMTP server. Try Gmail or Yahoo, "telnet gmail-smtp-in.l.google.com 25" or "telnet mta7.am0.yahoodns.net 25". WHICH SMTP PORT SHOULD YOU USE? What about today? How are these standard ports different? Have any deprecated over time? PORT 25: 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.) shouldn't use this port. It is traditionally blocked by residential ISPs and Cloud Hosting Providers, to curb the amount of spam that is relayed from compromised computers or servers. Unless you're specifically managing a mail server, you should have no traffic traversing this port on your computer or server. PORT 465: IANA has reassigned a new service to this port, and it should no longer be used for SMTP communications. However, because it was once recognized by IANA as valid, there may be legacy systems that are only capable of using this connection method. Typically, you will use this port only if your application demands it. A quick Google search, and you'll find many consumer Inbox Service Providers' (ISPs) articles that suggest port 465 as the recommended setup. However, we do not recommend it, as it is not RFC compliant. PORT 2525: This port is not endorsed by the IETF nor IANA. Instead, Mailgun provides it as an alternate port, which mirrors port 587, in the event the above ports are blocked. Because 2525 is a non-traditional high port number, it is typically allowed on consumer ISPs and Cloud Hosting providers, like Google Compute Engine. If you’ve tried the above ports, but experience connectivity issues, try port 2525. This port also supports TLS encryption. PORT 587: This is the default mail submission port. When users submit an email to be routed by a proper mail server, this is the one that will provide best results. Port 587, coupled with TLS encryption, ensures that email is submitted securely and following the guidelines set out by the IETF. All Mailgun customers should consider using port 587 as their default SMTP port unless you're explicitly blocked by your upstream network or hosting provider. WAIT, WHAT ABOUT POP AND IMAP? POP (Post Office Protocol, with the latest version being POP3) and IMAP (Internet Message Access Protocol) are two of the very first protocols developed on the consumer Internet that allowed for email clients - like Outlook, Thunderbird and others - to retrieve mail from a mail server. The ports typically used for POP are TCP ports 110 and 995, and for IMAP are TCP ports 143 and 993, for insecure and secure sessions respectively. They were each good at doing different things, like reflecting the state of an email back to the server (whether it was read, flagged, or marked as junk), or for preserving a copy of the message on a local machine for easy offline access. The latest version of POP, POP3, can be used with or without an SMTP. This does not affect which port you can use with Mailgun. Mailgun doesn’t host mailboxes, so these aren’t protocols we support. USING SMTP WITH MAILGUN SMTP has been around for years, and many folks ask us whether they should use SMTP or Mailgun's API endpoint. Deciding whether you should use an email API or SMTP to send your emails might not be an easy choice. We certainly recognize there is some level of vendor lock-in associated with building around an API. However, SMTP is extremely "chatty" and may lead to less performant mail submission to Mailgun. For example, consider the typical TLS mail conversation between my computer and Mailgun's SMTP endpoint: 1> openssl s_client -starttls smtp -crlf -connect smtp.mailgun.org:587 2250 STARTTLS 3> ehlo blog.mailgun.com 4250-ak47 5250-AUTH PLAIN LOGIN 6250-SIZE 52428800 7250-8BITMIME 8250-ENHANCEDSTATUSCODES 9> AUTH PLAIN AHBvc3RtYXN0ZXJAc2FtcGxlcy5tYWlsZ3VuLm9yZwAza2g5dW11am9yYTU= 10235 2.0.0 OK 11> MAIL FROM:<test@samples.mailgun.org> 12250 Sender address accepted 13> RCPT TO:<recipient@samples.mailgun.org> 14250 Recipient address accepted 15> DATA 16354 Continue 17> This is a test of SMTP over port 587. 18> . 19250 Great success 20> QUIT 21221 See you later. Yours truly, Mailgun As you can see, the above communication is quite cumbersome with lots of back and forth between sender and receiver. We open a connection to the SMTP server, issue the EHLO command, authenticate, set the MAIL FROM, set the RCPT TO, DATA command, send the data, period to close, and finally receive confirmation the message was queued. Compare this with an HTTPs payload: 1> openssl s_client -connect api.mailgun.net:443 2> POST /v2/samples.mailgun.org/messages HTTP/1.1 3> Authorization: Basic YXBpOmtleS0zYXg2eG5qcDI5amQ2ZmRzNGdjMzczc2d2anh0ZW9sMA== 4> Content-Type: application/x-www-form-urlencoded 5> Content-Length: 126 6> 7> from=test%40samples.mailgun.org&to=recipient%40samples.mailgun.org&subject=Testing& 8> text=This+is+a+test+of+HTTP+over+port+443! 9HTTP/1.1 200 OK Here, we initiate a connection, pass the HTTP POST payload and receive a 200 OK from the API endpoint. We don't have to issue a sequence of commands and wait for a response from the server after each command. WHAT SHOULD YOU REMEMBER ABOUT SMTP PORTS? In summary, where performance is desired, Mailgun recommends utilizing our API endpoint. The amount of back and forth “chatting” is much less. And with our API SDKs, connecting up is pretty simple. If you’re not interested in connecting via API, our SMTP endpoints are ready for your mail. Just don’t forget – port 587 is where the party is at as far as secure SMTPs are concerned! To learn more, check out our Documentation for more info, or contact us and we can answer any questions you may have about SMTP ports or our email services. DELIVERABILITY SERVICES Learn about our Deliverability Services Looking to send a high volume of emails? Our email experts can supercharge your email performance. See how we've helped companies like Lyft, Shopify, Github increase their email delivery rates to an average of 97%. Learn More Tags: SMTPSendingSMTP PortPOPIMAP Last updated on September 20, 2021 * Related posts * Recent posts * Top posts View all * * For devs How to Improve the Way WordPress Websites Send Email Konstantin Kovshenin • 7 min read * * Email DIY The Difference Between SMTP and API Mary Dolan • 7 min read * * Email DIY The Basics of Email Dark Mode Mary Dolan • 10 min read * * Best Practices COVID-19 Survey: How the Pandemic Has Affected Email Sending Mary Dolan • 11 min read * * Email DIY The Top Email Clients and Email Apps of 2021 Mary Dolan • 12 min read * * Email DIY The Benefits of Email Automation Mary Dolan • 8 min read * * Best Practices How To Avoid Emails Going To Spam Jonathan Torres • 7 min read * * Best Practices Preparing Your Email Infrastructure Correctly Kevin George • 8 min read * * Best Practices When Should You Use An Email API? Mary Dolan • 5 min read * * Best Practices The Best Time to Send Holiday Emails - Investigated Natalie Hays • 4 min read * * For devs How to Improve the Way WordPress Websites Send Email Konstantin Kovshenin • 7 min read * * What's new Email’s Not Dead Season 3 Is Finally Here Thomas Knierien • 3 min read * * Quick tips How to Improve Holiday Supply Chain Communication with Email Kasey Steinbrinck • 9 min read * * Best Practices How To Prepare Your Infrastructure For Black Friday James Tetler • 18 min read * * Best Practices Happy Festivus: Email Deliverability Guide For The Holiday Season Kate Nowrouzi • 6 min read * * Email DIY Dark Mode for Email Survey: What Do Email Senders Think? Kasey Steinbrinck • 10 min read * * Email DIY Email Accessibility Mistakes that Annoy Subscribers & How To Fix Them Beatriz Redondo Tejedor • 13 min read * * Security Vulnerability Management: Working With the Community To Patch Security Threats Jesse Kinser • 7 min read * * What's new Celebramos el Mes de la Herencia Hispana Thomas Knierien • 7 min read * * What's new Sinch to Acquire Mailgun, Creating a Best-Of-Breed Cloud Communications Platform William Conway • 4 min read * * What's new Email’s Not Dead Season 3 Is Finally Here Thomas Knierien • 3 min read * * Quick tips How to Improve Holiday Supply Chain Communication with Email Kasey Steinbrinck • 9 min read * * Best Practices How To Prepare Your Infrastructure For Black Friday James Tetler • 18 min read * * Best Practices Happy Festivus: Email Deliverability Guide For The Holiday Season Kate Nowrouzi • 6 min read * * Email DIY Dark Mode for Email Survey: What Do Email Senders Think? Kasey Steinbrinck • 10 min read * * Security Vulnerability Management: Working With the Community To Patch Security Threats Jesse Kinser • 7 min read * * What's new Sinch to Acquire Mailgun, Creating a Best-Of-Breed Cloud Communications Platform William Conway • 4 min read * * Best Practices The Future of Email: BIMI & AMP Kate Nowrouzi • 9 min read * * Events Meet Our Amazing Pathwire Mavericks! Mary Dolan • 9 min read * * What's new Continuing our commitment: HTTPS innovation and optimization Chris Farmer • 7 min read Always be in the know and grab free email resources! No spam, ever. Only musings and writings from the Mailgun team. By sending this form, I agree that Mailgun may contact me and process my data in accordance with its Privacy Policy. sign up It's easy to get started. And it's free. See what you can accomplish with the world's best email delivery platform. Sign up for Free sales@mailgun.com Company AboutJobsContactReport spamSitemapCovid-19Mailjet Why Mailgun? Email for developersEmail service providerEmail consulting serviceWhite label email service Top Features Email logsEmail analyticsSending EmailSMTP servicesEmail address validationEmail list managementBounce management Customers Case studiesCustomersPartnersProduct status Resources BlogGuidesVideosPodcastsEventsMaverick ProgramDocumentationHelp centerSend us your feedbackEmail Growth Playbook More about email Mass emailEmail reputationIP reputationBlacklist monitoringEmail templatesEmail testing toolsEmail spam checkerEmail GlossaryEmail Marketing ROI Calculator ©2021 Mailgun Technologies, Inc. All Rights Reserved. Cookie PreferencesGDPR ComplianceAcceptable Use PolicyTerms of ServicePrivacy Policy