邮件发送的基本过程

这里总结下邮件发送的基本过程,

[b]1.一台邮件服务器,可能作为邮件的出发点,也可以作为邮件的目的地,甚至可以作为邮件的中间转运站。[/b]
[img]http://publish.it168.com/2005/0926/images/450654.gif[/img]

由图可以看到,1可能是你用来发送邮件的软件,程序(MUA),2则为信件到达的第一台邮件服务器,可以认为2这台邮件是邮件服务器链里的出发地。自然3就是中转节点,4为目的节点。

中间服务器可有可无

[b]2.邮件在网络上的流动过程[/b]
举例:使用83378122@163.com给dxt02880466@qq.com发送邮件
[b](1)[/b]163发送程序检查目标邮箱的域名qq.com
[b](2)[/b]如果目的邮箱为本地域名,则调用本地MDA发送邮件(localmessage)。可惜不是。
进入转发流程RELAY
[b](3)[/b]通过dns查询qq.com的MX记录,

[img]http://dl.iteye.com/upload/attachment/453489/73a77043-130c-33eb-9973-f5327d6e9769.jpg[/img]
并按照优先顺序选择优先级最高的mx服务器,这里是mx3.qq.com
[b](4)[/b]通过DNS查询mx3.qq.com的A记录
[b](5)[/b]尝试连接MX3.QQ.COM
[b](6)[/b]如果连接失败,则选择第二优先级MX mx2.qq.com,重试步骤4,仍然不行尝试mx3
[b](7)[/b]如果所有MX都连接失败,则返回不发连接异常(有的系统会有重试或者软弹回)
[b](8)[/b]如果连接成功,则使用SMTP发送邮件给这个邮件网关。
[b](9)[/b]当然如果接受域没有mx记录,则尝试查询其A记录并发送邮件到A记录。如果MX记录和A记录都连不上,则视为不可发送返回给发件人。
[b](10)[/b]最后qq邮箱在接收到递送过来的邮件后会执行第二步。


[b]3.《lINUX E-MAIL》中关于DNS记录在email中应用的说明[/b]

How does an SMTP server discover to which host a message for a certain domain should be delivered? The recipient domain is, not surprisingly, used as the key in one or more DNS lookups. The first lookup that is made is for the mail-specific MX record—the mail exchanger record type. The MX entry allows the DNS operator to specify the hostname or hostnames of servers that can receive mail for a certain domain. For example, MX records can be used to specify that messages to someone at example.com should be sent to mail.example.com. If the recipient domain does not have an MX record, an attempt is made to find an A record for the recipient domain. If the A record lookup succeeds, the mail will be delivered to the host. If both the MX and A lookups do not return any results, the message is deemed undeliverable and is returned to the sender.

[b]4.图解一下传输过程。[/b]
好吧 我承认这个本来就很简单,但是画个图又不会怀孕。。 - -||、


[img]http://dl.iteye.com/upload/attachment/453604/da10ba91-f4fc-3cc0-b514-04a0d21248f7.jpg[/img]
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值