For faster navigation, this Iframe is preloading the Wikiwand page for 简单邮件传输协议.

简单邮件传输协议

此條目已列出參考文獻,但因為沒有文內引註而使來源仍然不明。 (2018年8月28日)请加上合适的文內引註来改善这篇条目
此條目翻譯品質不佳。 (2018年7月25日)翻譯者可能不熟悉中文或原文語言,也可能使用了機器翻譯。請協助翻譯本條目或重新編寫,并注意避免翻译腔的问题。明顯拙劣的翻譯請改掛((d|G13))提交刪除。

簡單郵件傳送協定(英語:Simple Mail Transfer Protocol,縮寫:SMTP)可用在傳送和接收電子郵件的信息,但SMTP通常用作傳送電子郵件信息,而不是接收。

SMTP是一个相对简单的基于文本协议。我們可以透過協定,指定將訊息傳送至一或多个接收者。我們可以很简单地通过telnet程序来测试一个SMTP服务器。SMTP主要使用TCP端口25。要为一个给定的域名决定一个SMTP服务器,需要使用DNSMX记录

在八十年代早期,SMTP开始被广泛地使用。当时,它只是作为UUCP的补充,UUCP更适合于处理在间歇连接的電腦间传送邮件。相對地,SMTP在穩定的网络下,將发送和接收的工作是做得相當好。

Sendmail是最早使用SMTP的邮件传输代理之一。在2001年,至少有50个程序将SMTP实现为一个客户端(消息的发送者)或一个服务器(消息的接收者),包括了Philip Hazel的exim,IBM的Postfix, D. J. Bernstein的Qmail,以及Microsoft Exchange Server

由于这个协议开始時,是基于纯ASCII文本的,它在二进制文件上处理得并不好。例如MIME的标准被开发来编码二进制文件,以使其透過SMTP來傳輸。今天,大多数SMTP服务器都支持8位MIME扩展,它使二进制文件的传输,变得几乎和纯文本一样简单。

SMTP是一个“推送”协议,它不允许从远程服务器上接收消息。若要接收消息到客户端,邮件客户端必须使用POP3IMAP。另一个SMTP服务器可以使用ETRN在SMTP上触发一个发送。

SMTP通信举例

在发送方(客户端)和接收方(服务器)间建立连接之后,会建立一个合法的SMTP会话,如下例。在下面的例子中,所有客户端发送的都以“C:”作为前缀,所有服务器发送的都以“S:”作为前缀。在多数计算机系统上,可以在发送的机器上使用telnet命令来建立连接,比如:

telnet www.example.com 25

它建立一个从发送的机器到主机www.example.com的SMTP连接。

S: 220 smtp.example.com ESMTP Postfix
C: HELO relay.example.com
S: 250 smtp.example.com, I am glad to meet you
C: MAIL FROM:<bob@example.com>
S: 250 Ok
C: RCPT TO:<alice@example.com>
S: 250 Ok
C: RCPT TO:<theboss@example.com>
S: 250 Ok
C: DATA
S: 354 End data with <CR><LF>.<CR><LF>
C: From: "Bob Example" <bob@example.com>
C: To: Alice Example <alice@example.com>
C: Cc: theboss@example.com
C: Date: Tue, 15 Jan 2008 16:02:43 -0500
C: Subject: Test message
C: 
C: Hello Alice.
C: This is a test message with 5 header fields and 4 lines in the message body.
C: Your friend,
C: Bob
C: .
S: 250 Ok: queued as 12345
C: QUIT
S: 221 Bye
{The server closes the connection}

虽然是可选的,但几乎所有的客户端都会使用EHLO问候消息(而不是上面所示的HELO)来询问服务器支持何种SMTP扩展,邮件的文本体(接着DATA)一般是典型的MIME格式。

SMTP安全和垃圾邮件

最初的SMTP的局限之一,在于它没有对发送方进行身份验证的机制。因此,后来定义了SMTP-AUTH英语SMTP-AUTH扩展。

尽管有了身份认证机制,垃圾邮件仍然是一个主要的问题。但由于庞大的SMTP安装数量带来的网络效应,大刀阔斧地修改或完全替代SMTP被认为是不现实的。Internet Mail 2000英语Internet Mail 2000就是一个替代SMTP的建议方案。

因此,出现了一些同SMTP工作的辅助协议。IRTF的反垃圾邮件研究小组正在研究一些建议方案,以提供简单、灵活、轻量级的、可升级的源端认证。最有可能被接受的建议方案是发件人策略框架协议。

提供SSL加密的SMTP協定被稱為SMTPS

参见

相关 RFC

参考文献

{{bottomLinkPreText}} {{bottomLinkText}}
简单邮件传输协议
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Get ready for Wikiwand 2.0 🎉! the new version arrives on September 1st! Don't want to wait?