1 / 16

电子邮件系统基本协议介绍

电子邮件系统基本协议介绍. 北京春笛信息技术有限公司. 电子邮件( 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. 概念. 用户代理( User Agent): 最终用户邮件程序

dwight
Download Presentation

电子邮件系统基本协议介绍

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 电子邮件系统基本协议介绍 北京春笛信息技术有限公司

  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)之间传送邮件信息。 MTA MTA MTA SMTP SMTP File System UA UA

  5. SMTP 协议 • SMTP发送者是客户 • SMTP接收者是服务器 • 交互过程: • 客户向服务器发送命令,服务器对命令进行响应(回复状态信息)。 • 命令有先后顺序! • 状态信息包括ascii编码的数字和文本。

  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 Period DATA 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 - 终止处理.

  11. 邮件信头格式 • 邮件信息包含多个信头,一些信头由UA创建,一些由MTA自动添加。 • 每个MTA(至少)添加一个 “Received:” 头. • MTAs需要使用头中的一些信息,一部分头在传送过程中被忽略。

  12. POP • 用户使用POP协议从邮件服务器传送由见到UA. Mail Server POP UA File System

  13. POP (version 3) • 和SMTP的顺序对话类似,一个命令对应一个应答。 • 用户接收邮件使用。 • 需要身份验证 • 命令和应答都是ASCII码. • 应答以 “+OK” 或 “-ERR”开始. • 应答可以包括多行.

  14. POP-3命令 • USER - 指定用户名 • PASS - 指定密码 • STAT - 取得信箱状态 • 信箱里邮件数量. • LIST - 取得信件列表和大小. • 一封信一行. • RETR - 取邮件

  15. 更多的POP-3命令 • DELE - 标记一个邮件从信箱里删除 • NOOP - send back positive reply • RSET - 复位,取消所有删除标记 • QUIT - 删除标记信息,关闭(TCP)连接.

  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!!!!

More Related