SMTP(Simple Mail Transfer Protocol)资料备忘
时间:2010-03-18 来源:aprilus
[基本资料]
* RFC 2821 - Simple Mail Transfer Protocol4.1 SMTP Commands
4.1.1.1 Extended HELLO (EHLO) or HELLO (HELO)
4.1.1.2 MAIL (MAIL)
4.1.1.3 RECIPIENT (RCPT)
4.1.1.4 DATA (DATA)
4.1.1.5 RESET (RSET)
4.1.1.6 VERIFY (VRFY)
4.1.1.7 EXPAND (EXPN)
4.1.1.8 HELP (HELP)
4.1.1.9 NOOP (NOOP)
4.1.1.10 QUIT (QUIT)
4.2.1 Reply Code Severities and Theory
1yz Positive Preliminary reply
2yz Positive Completion reply
3yz Positive Intermediate reply
4yz Transient Negative Completion reply
5yz Permanent Negative Completion reply
x0z Syntax
x1z Information
x2z Connections
x3z Unspecified
x4z Unspecified
x5z Mail system
4.2.2 Reply Codes by Function Groups
500 Syntax error, command unrecognized
(This may include errors such as command line too long)
501 Syntax error in parameters or arguments
502 Command not implemented (see section 4.2.4)
503 Bad sequence of commands
504 Command parameter not implemented
211 System status, or system help reply
214 Help message
(Information on how to use the receiver or the meaning of a
particular non-standard command; this reply is useful only
to the human user)
220 <domain> Service ready
221 <domain> Service closing transmission channel
421 <domain> Service not available, closing transmission channel
(This may be a reply to any command if the service knows it
must shut down)
250 Requested mail action okay, completed
251 User not local; will forward to <forward-path>
(See section 3.4)
252 Cannot VRFY user, but will accept message and attempt
delivery
(See section 3.5.3)
450 Requested mail action not taken: mailbox unavailable
(e.g., mailbox busy)
550 Requested action not taken: mailbox unavailable
(e.g., mailbox not found, no access, or command rejected
for policy reasons)
451 Requested action aborted: error in processing
551 User not local; please try <forward-path>
(See section 3.4)
452 Requested action not taken: insufficient system storage
552 Requested mail action aborted: exceeded storage allocation
553 Requested action not taken: mailbox name not allowed
(e.g., mailbox syntax incorrect)
354 Start mail input; end with <CRLF>.<CRLF>
554 Transaction failed (Or, in the case of a connection-opening
response, "No SMTP service here")
4.2.3 Reply Codes in Numeric Order
211 System status, or system help reply
214 Help message
(Information on how to use the receiver or the meaning of a
particular non-standard command; this reply is useful only
to the human user)
220 <domain> Service ready
221 <domain> Service closing transmission channel
250 Requested mail action okay, completed
251 User not local; will forward to <forward-path>
(See section 3.4)
252 Cannot VRFY user, but will accept message and attempt
delivery
(See section 3.5.3)
354 Start mail input; end with <CRLF>.<CRLF>
421 <domain> Service not available, closing transmission channel
(This may be a reply to any command if the service knows it
must shut down)
450 Requested mail action not taken: mailbox unavailable
(e.g., mailbox busy)
451 Requested action aborted: local error in processing
452 Requested action not taken: insufficient system storage
500 Syntax error, command unrecognized
(This may include errors such as command line too long)
501 Syntax error in parameters or arguments
502 Command not implemented (see section 4.2.4)
503 Bad sequence of commands
504 Command parameter not implemented
550 Requested action not taken: mailbox unavailable
(e.g., mailbox not found, no access, or command rejected
for policy reasons)
551 User not local; please try <forward-path>
(See section 3.4)
552 Requested mail action aborted: exceeded storage allocation
553 Requested action not taken: mailbox name not allowed
(e.g., mailbox syntax incorrect)
554 Transaction failed (Or, in the case of a connection-opening
response, "No SMTP service here")
* 简单邮件传输协议 - 中文维基 / Simple Mail Transfer Protocol - 英文维基
* SMTP 协议资料 - 中国协议分析网
[扩展资料]
* 使用telnet发送简单“英文”email* 电子邮件头详揭秘
$ telnet smtp.qq.com 25
ehlo test // 报名字(随便写)
auth login
ZXhhbXBsZQ== // example(邮箱用户名)的base64编码
cGFzc3dvcmQ= // password(邮箱密码)的base64编码
mail from: <[email protected]>
rcpt to: <[email protected]>
data // 以下输入邮件内容,要符合MIME规范
from: [email protected]
to: [email protected]
subject: mailtest
mime-version: 1.0
content-type: text/plain
// 这里要空一行再写邮件正文
this is a test mail!
. // 结束符
quit // 断开连接
[关于MIME]
* 多用途互联网邮件扩展 - 中文维基 / Multipurpose Internet Mail Extensions - 英文维基* RFC
RFC 1847
Security Multiparts for MIME: Multipart/Signed and Multipart/Encrypted
RFC 2045
MIME Part One: Format of Internet Message Bodies.
RFC 2046
MIME Part Two: Media Types. N. Freed, Nathaniel Borenstein。November 1996.
RFC 2047
MIME Part Three: Message Header Extensions for Non-ASCII Text. Keith Moore。November 1996.
RFC 4288
MIME Part Four: Media Type Specifications and Registration Procedures.
RFC 4289
MIME Part Four: Registration Procedures. N. Freed, J. Klensin. December 2005.
RFC 2049
MIME Part Five: Conformance Criteria and Examples. N. Freed, N. Borenstein. November 1996.
RFC 2231
MIME Parameter Value and Encoded Word Extensions: Character Sets, Languages, and Continuations. N. Freed, K. Moore. November 1997.
RFC 2387
The MIME Multipart/Related Content-type
* MIME类型 / IANA已注册的MIME媒体类型列表
* 字符集列表
* Debian Wiki上的MIME
* CSDN技术中心 MIME邮件面面观
* 邮件编码专题
- 邮件编码介绍
- 什么是Base64编码?
- MIME邮件格式说明
- MIME邮件格式分析及信息提取
- MIME邮件原文实战
- 常用邮件编码及乱码的解决
相关阅读 更多 +
排行榜 更多 +