2. 电子邮件(email)SMTP - 简单邮件传输协议(Simple Mail Transfer Protocol)
RFC 821
POP - 邮局协议(Post Office Protocol)
RFC 1939
其他:
RFC 822 Standard for the Format of ARPA Internet Text Messages
RFCs 1521, 1522 Mime
3. 概念用户代理(User Agent): 最终用户邮件程序
信息传送代理(Message Transfer Agent): 同远程主机通讯,传送或接收邮件(是客户端也是服务器端)
邮件网关(Mail Exchanger):负责一个域邮件的机器
4. SMTP使用SMTP协议在邮件服务器(Message Transfer Agents)之间传送邮件信息。MTAMTAUASMTPFile
SystemMTASMTPUA
6. SMTP 命令HELO - 确认发送者
MAIL FROM: - 开始一个有事务处理,确认邮件发送者。
RCPT TO: - 确认单独的邮件接收者. 可以有多个RCPT TO: 命令.
DATA - 发送者开始发送多行文本, 每一行由 \r\n结束. 用只含有 ‘.’ 的单独一行结束文本。
7. 数据格式只能是ASCII - 二进制数据必须转换成ASCII码。.
8. 例子 saka.dlut.edu.cn# telnet mail.foo.com 25
Trying 192.168.1.4...
Connected to here.foo.com.
Escape character is '^]'.
220 here.foo.com ESMTP Sendmail 8.8.8/8.8.8; Sat, 14 Mar 1998 21:28:41 -0500 (EST)
HELO saka.dlut.edu.cn
250 here.foo.com Hello root@saka.dlut.edu.cn [192.168.1.3], pleased to meet you
MAIL FROM: root@saka.dlut.edu.cn
250 root@saka.dlut.edu.cn... Sender ok
RCPT TO: hollingd@foo.com
250 hollingd... Recipient ok
DATA
354 Enter mail, end with "." on a line by itself
Hi dave - this message is a test of SMTP
.
250 VAA07541 Message accepted for delivery
9. Leading PeriodDATA
354 Enter mail, end with "." on a line by itself
Hi dave - this message is a test of SMTP
..
..foo
..
.
250 VAA0771 Message accepted for delivery
最终信息:Hi dave - this message is a test of SMTP
.
.foo
.
10. 其他命令VRFY - 校验一个用户是否存在.
EXPN - 展开一个别名 (一组邮件地址).
TURN - 交换角色 (sender <-> receiver).
SOML - Send Or Mail
如果接收者在线,在它的终端上显示信息,否则发送邮件。
SAML - Send and Mail
NOOP - send back a positive reply code.
RSET - 终止处理.
16. 可选命令TOP - send header lines from messages.
APOP - alternative authentication
message digest based on opening greeting sent from POP server.
Requires shared secret!
No cleartext password on the network.
Does not authenticate the server!!!!