SMTP or Simple Mail Transfer Protocol is used to transmit emails between clients, receivers, and email servers. SMTP service generally provided via different ports for network communication and transmission. IMAP and POP3 are other protocols used for email transmission but they are mainly used by email clients where SMTP is used for email servers. In order to use email service to sent few or bulk emails, we should configure the email servers SMTP port properly.

SMTP或简单邮件传输协议用于在客户端,收件人和电子邮件服务器之间传输电子邮件。 SMTP服务通常通过不同的端口提供,用于网络通信和传输。 IMAP和POP3是用于电子邮件传输的其他协议,但是它们主要供电子邮件客户端使用,其中SMTP用于电子邮件服务器。 为了使用电子邮件服务发送少量或批量电子邮件,我们应正确配置电子邮件服务器的SMTP端口。

什么是SMTP(简单邮件传输协议)? (What Is SMTP(Simple Mail Transfer Protocol)?)

SMTP or Simple Mail Transfer Protocol is a mail transfer protocol which is mainly used to transfer email between servers in a simple text based mechanism. E-mail servers and some email clients uses the SMTP for e-mail transfer and communication.

SMTPSimple Mail Transfer Protocol是一种邮件传输协议,主要用于以基于简单文本的机制在服务器之间传输电子邮件。 电子邮件服务器和某些电子邮件客户端使用SMTP进行电子邮件传输和通信。

%title插图%num
SMTP Architecture Defined In RFC 788
RFC 788中定义的SMTP体系结构

Before SMTP there are protocol like SNDMSG, Mail Box Protocol with the RFC 196 etc. SMTP is official standardized with the RFC 788 in November 1981. As the first SMTP standard this RFC used the port number 25.

在SMTP之前,有诸如SNDMSG,带有RFC 196的邮箱协议等协议。SMTP在1981年11月由RFC 788正式标准化。作为*个SMTP标准,该RFC使用端口号25。

SMTP端口 (SMTP Ports)

As an old and popular protocol SMTP provides different port numbers for diffrent reasons and use cases. There is two main action in SMTP.

SMTP作为一种古老而流行的协议,出于不同的原因和用例,提供了不同的端口号。 SMTP中有两个主要操作。

Submission is the act of submitting an email message and data to an outgoing email server. The email client connects to this outgoing email server and submits the email message and data.

Submission是将电子邮件和数据提交到外发电子邮件服务器的行为。 电子邮件客户端连接到该传出电子邮件服务器,并提交电子邮件和数据。

Relay is the act of receiving and email message and data from a email server and transmit to the another email server. Generally the latest email server will be the receipent email server.

Relay是从电子邮件服务器接收电子邮件消息和数据并传输到另一个电子邮件服务器的行为。 通常,*新的电子邮件服务器将是接收电子邮件服务器。

In order to complete these actions following different ports are used by SMTP. Below we will explain these different port in detail.

为了完成这些操作,SMTP使用了以下不同的端口。 下面我们将详细解释这些不同的端口。

  • 2525
  • 587587
  • 465465
  • 25252525
LEARN MORE  What Is HTTP (Hypertext Transfer Protocol)?
了解更多什么是HTTP(超文本传输​​协议)?

SMTP端口25 (SMTP Port 25)

Port 25 is the first official port of the SMTP. Port 25 is dedicated for the SMTP in 1982. SMTP Port 25 uses the TCP as a transmission protocol. Also, Port 25 is the most known and popular port for SMTP. As an old, popular, and well-known port Port 25 is abused widely and some ISP, Network, and Cloud providers automatically or by default blocks the TCP 25 SMTP port in order to prevent abuses and security attacks.

端口25是SMTP的*个正式端口。 1982年,端口25专用于SMTP。SMTP端口25使用TCP作为传输协议。 另外,端口25是SMTP*著名和*受欢迎的端口。 端口25作为一个古老,流行且知名的端口,被广泛滥用,并且某些ISP,网络和云提供程序自动或默认情况下阻止TCP 25 SMTP端口,以防止滥用和安全攻击。

SMTP端口587 (SMTP Port 587)

SMTP Port 587 is the default port for email submission and used by a lot of parties. If you don’t know the default port of the remote email server the best choice to start check for submission is used the SMTP port 587. Port 587 is provided as a TCP port. Also, port 597 provides a secure email submission by using TLS encryption.

SMTP端口587是电子邮件提交的默认端口,并被许多各方使用。 如果您不知道远程电子邮件服务器的默认端口,则使用SMTP端口587作为开始检查提交的*佳选择。端口587作为TCP端口提供。 同样,端口597通过使用TLS加密提供了安全的电子邮件提交。

SMTP端口465 (SMTP Port 465)

SMTP port was the first secure and encrypted email submission port which is using SMTP over SSL methodology. After some time with the emerge of the Port 587 SMTP port 465 is deprecated officially and provided for use of other protocols. But today many ISP and cloud hosting providers support and provide port 465 for SMTP submission.

SMTP端口是*个使用SMTP over SSL方法的安全加密电子邮件提交端口。 在端口587出现一段时间后,SMTP端口465正式被弃用,并提供使用其他协议。 但是今天,许多ISP和云托管提供商都支持并提供465端口用于SMTP提交。

SMTP端口2525 (SMTP Port 2525)

SMTP port 2525 is a tricky port that is created by typing 25 twice as port 25 is the first port number of the SMTP. Port 2525 is not assigned officially for the SMTP usage because it is not recognized by authorities IETF or IANA. But the similarity of the numbers made port 2525 popular and most of the ISPs, cloud service providers and email servers support and allow access of port 2525 SMTP service. Especially Port 2525 will be a good alternative can if port 587 is blocked.

SMTP端口2525是一个棘手的端口,通过键入25两次来创建,因为端口25是SMTP的*个端口号。 未正式为SMTP使用分配端口2525,因为IETF或IANA当局无法识别该端口。 但是数字的相似性使2525端口变得流行,并且大多数ISP,云服务提供商和电子邮件服务器都支持并允许访问2525端口SMTP服务。 如果端口587被阻塞,则特别是2525端口将是一个很好的选择。

LEARN MORE  What Is SSL Certificate CN (Common Name) and Usage?
了解更多什么是SSL证书CN(通用名称)和用法?

检查SMTP端口是否被阻止或可访问 (Check If SMTP Port Is Blocked or Accessible)

As there are 4 popular SMTP ports deciding which of them are accessable for SMTP may be required in some cases. There are different ways to check SMTP ports like using a tool for simple port check or using a web service or application.

由于存在4种流行的SMTP端口,因此在某些情况下可能需要确定其中哪些可以访问SMTP。 有多种检查SMTP端口的方法,例如使用用于简单端口检查的工具或使用Web服务或应用程序。

We can use telnet in order to check the remote SMTP ports like 25, 587, 465, 2525 or another port. telnet is a simple command line tool which is used for remote shell connection and management but also used for port check for different protocols. In this example we will check the Gmail SMTP ports where the SMTP service is provided with the smtp.google.com domain name.

我们可以使用telnet来检查远程SMTP端口,例如25、587、465、2525或其他端口。 telnet是一个简单的命令行工具,用于远程shell连接和管理,还用于检查不同协议的端口。 在此示例中,我们将检查通过smtp.google.com域名提供SMTP服务的Gmail SMTP端口。

  1. $ telnet smtp.gmail.com 25
  2. $ telnet smtp.gmail.com 587
  3. $ telnet smtp.gmail.com 465
  4. $ telnet smtp.gmail.com 2525
%title插图%num
Check If SMTP Port Is Blocked or Accessible
检查SMTP端口是否被阻止或可访问

From the example and screen shot we can see that when the remote SMTP port is available or open we will get a message like Connected to smtp.gmail.com and get some banner or welcome message which provides information about the SMTP server and service like 220 smtp.gmail.com ESMTP f131sm5873330wme.40 - gsmtp .If the SMTP port or service is not avaiable we will get a message like Unable to connect to remote host: Network is unreachable . For this example Gmail provides SMTP ports 25,587, 465 via smpt.gmail.com.

从示例和屏幕快照中,我们可以看到,当远程SMTP端口可用或打开时,我们将收到诸如Connected to smtp.gmail.com类的消息Connected to smtp.gmail.com并获得一些标语或欢迎消息,其中包含有关SMTP服务器和服务的信息,如220 smtp.gmail.com ESMTP f131sm5873330wme.40 - gsmtp 。如果SMTP端口或服务不可用,我们将收到诸如Unable to connect to remote host: Network is unreachable的消息Unable to connect to remote host: Network is unreachable 。 在此示例中,Gmail通过smpt.gmail.com提供了SMTP端口25,587,465。

SMTP端口通信示例 (SMTP Port Communication Example)

SMTP is mainly a text-based protocol where management is done via text or ASCII command. When connected an SMTP port commands like EHLO, STARTTLS, SIZE, etc can be used.

SMTP主要是基于文本的协议,其中通过文本或ASCII命令进行管理。 连接SMTP端口后,可以使用EHLO,STARTTLS,SIZE等命令。

EHLO command is the reverse form of the helo and used to get command information about the SMTP server.

EHLO命令是helo的相反形式,用于获取有关SMTP服务器的命令信息。

SIZE command is used to set the email message or data size we want to send.

SIZE命令用于设置我们要发送的电子邮件或数据大小。

LEARN MORE  Things To Do With Computer When Bored
了解更多关于无聊的事情

STARTTLS command is used to start TLS encrypted secure communication. 250 – STARTTLS means the SMTP port can accept TLS connections.

STARTTLS命令用于启动TLS加密的安全通信。 250 – STARTTLS表示SMTP端口可以接受TLS连接。

  1. $ telnet smtp.pepipost.com 587
  2. Trying 138.197.56.58
  3. Connected to smtp.pepipost.com.
  4. Escape character is ‘^]’.
  5. 220 ESMTP SMTPNY-LB1 Ready
  6. 500 5.5.2 Error: bad syntax
  7. ehlo pepipost.com
  8. 250-smtpny-lb1.pepipost.com
  9. 250-PIPELINING
  10. 250-SIZE 50000000
  11. 250-VRFY
  12. 250-ETRN
  13. 250-STARTTLS
  14. 250-AUTH PLAIN LOGIN
  15. 250-AUTH=PLAIN LOGIN
  16. 250-ENHANCEDSTATUSCODES
  17. 250-8BITMIME
  18. 250 DSN
  19. STARTTLS
  20. 220 2.0.0 Ready to start TLS
%title插图%num
SMTP Port Communication Example
SMTP端口通信示例

SMTP端口安全性和SSL / TLS连接(SMTP Port Security and SSL/TLS Connection)

SMTP uses the SSL/TLS certificates in order to secure and encrypt SMTP connection. openssl command provides the s_client command in order to test and connect remote SMTP service with an SSL/TLS connection. We will also provide the remove SMTP server domain name and port number like below by using the -connect option. SSL/TLS encrypted SMTP connection is named as SMTPS.

SMTP使用SSL / TLS证书来保护和加密SMTP连接。 openssl命令提供s_client命令,以测试远程SMTP服务并将其与SSL / TLS连接连接。 我们还将通过使用-connect选项提供删除的SMTP服务器域名和端口号,如下所示。 SSL / TLS加密的SMTP连接称为SMTPS。

$ openssl s_client -starttls smtp -crlf -connect smtp.mailgun.org:587
%title插图%num
%title插图%num

受欢迎的邮件服务提供商SMTP端口号 (Popular Mail Service Providers SMTP Port Numbers)

Today email and SMTP are core and important part of the IT. There are a lot of different email service and server providers which provides SMTP service via SMTP ports. Below you can find popular SMTP service providers SMTP port numbers.

如今,电子邮件和SMTP已成为IT的核心和重要组成部分。 有许多不同的电子邮件服务和服务器提供商,它们通过SMTP端口提供SMTP服务。 在下面,您可以找到流行的SMTP服务提供商的SMTP端口号。

SMTP Provider SMTP Server Address SMTP Ports
Google or Gmail smtp.gmail.com 465, 587
Outlook smtp.live.com 587
Office 365 smtp.office365.com 587
Yahoo Mail smtp.mail.yahoo.com 465
Yahoo Mail Plus plus.smtp.mail.yahoo.com 465
Yahoo UK smtp.mail.yahoo.co.uk 465
Yahoo Germany/Deutschland smtp.mail.yahoo.com 465
Yahoo Austraila/New Zelland smtp.mail.yahoo.com.au 465
O2 smtp.o2.ie 25
O2 UK smtp.o2.co.uk 25
AOL.com smtp.aol.com 587
AT&T smtp.att.yahoo.com 465
Hotmail smtp.live.com 465
zoho Mail smtp.zoho.com 465
Mail.com smtp.mail.com 587
SMTP提供者 SMTP服务器地址 SMTP端口
Google或Gmail smtp.gmail.com 465、587
外表 smtp.live.com 587
Office 365 smtp.office365.com 587
雅虎邮箱 smtp.mail.yahoo.com 465
Yahoo Mail Plus plus.smtp.mail.yahoo.com 465
雅虎英国 smtp.mail.yahoo.co.uk 465
雅虎德国/德国 smtp.mail.yahoo.com 465
Yahoo Austraila /新西兰 smtp.mail.yahoo.com.au 465
氧气2 smtp.o2.ie 25
O2英国 smtp.o2.co.uk 25
AOL.com smtp.aol.com 587
美国电话电报公司 smtp.att.yahoo.com 465
邮件 smtp.live.com 465
zoho Mail smtp.zoho.com 465
Mail.com smtp.mail.com 587

翻译自: https://www.poftut.com/what-is-smtp-port-number-25-587-465-2525/