DNS中MX记录的理解(转)

DNS中MX记录的理解(转)[@more@]DNS使用MX记录来实现邮件路由,它规定了域名的邮件服务器要么处理,要么向前转发有关该域名的邮件.处理邮件是指将其传送给其地址所关联的个人,向前转发邮件是指通过SMTP协议将其传送给其最终目的地.为了防止邮递路由,MX记录除了邮件交换器的域名外还有一个特殊参数:优先级值.优先级值是个从0 到65535的无符号整数,它给出邮件交换器的优先级别.
优先级值自身并不重要,关键在于它同其它邮件交换器的优先级值的相对大小,优先级值相对越小,优先级越高.邮件总是首先试图传递给优先级值相对最小的邮件交换器.失败后才试图传递给优先级值稍大的邮件交换器.邮件总是试遍了同一优先级的邮件交换器,失败后才试图传递给优先级稍低的邮件交换器.

注意你列为邮件交换器的主机必须拥有地址记录.

下面列出几个我用nslookup程序查询的记录:
lee@work:~$ nslookup
> set type=mx
> hnby.com.cn
Server: 10.10.16.60
Address: 10.10.16.60#53

Non-authoritative answer:
*** Can't find hnby.com.cn: No answer //没有邮件交换

Authoritative answers can be found from:
hnby.com.cn
origin = dns.hnby.com.cn
mail addr = root.hnby.com.cn
serial = 2002120101
refresh = 900
retry = 600
expire = 86400
minimum = 3600
> set type=mx
> henan.gov.cn
Server: 10.10.16.60
Address: 10.10.16.60#53

Non-authoritative answer:
*** Can't find henan.gov.cn: No answer

Authoritative answers can be found from:
henan.gov.cn
origin = ns.hazzptt.net.cn
mail addr = root.ns.hazzptt.net.cn
serial = 99968011
refresh = 28899
retry = 7200
expire = 604800
minimum = 86400
> set type=mx
> yahoo.com.cn
Server: 10.10.16.60
Address: 10.10.16.60#53

Non-authoritative answer:
yahoo.com.cn mail exchanger = 10 mta-v1.mail.vip.cnb.yahoo.com. //雅虎中国的邮件交换服务

Authoritative answers can be found from:
yahoo.com.cn nameserver = ns8.yahoo.com.
yahoo.com.cn nameserver = ns9.yahoo.com.
yahoo.com.cn nameserver = ns1.yahoo.com.
yahoo.com.cn nameserver = ns3.yahoo.com.
yahoo.com.cn nameserver = ns6.yahoo.com.
ns1.yahoo.com internet address = 66.218.71.63
ns3.yahoo.com internet address = 217.12.4.104
ns6.yahoo.com internet address = 202.43.223.170
> set type=mx
> yahoo.com
Server: 10.10.16.60
Address: 10.10.16.60#53

Non-authoritative answer:
yahoo.com mail exchanger = 1 mx3.mail.yahoo.com.
yahoo.com mail exchanger = 1 mx1.mail.yahoo.com.
yahoo.com mail exchanger = 1 mx2.mail.yahoo.com.

Authoritative answers can be found from:
yahoo.com nameserver = ns1.yahoo.com.
yahoo.com nameserver = ns2.yahoo.com.
yahoo.com nameserver = ns3.yahoo.com.
yahoo.com nameserver = ns4.yahoo.com.
yahoo.com nameserver = ns5.yahoo.com.
mx3.mail.yahoo.com internet address = 4.79.181.12
mx3.mail.yahoo.com internet address = 67.28.113.10
mx3.mail.yahoo.com internet address = 4.79.181.168
mx3.mail.yahoo.com internet address = 4.79.181.134
mx3.mail.yahoo.com internet address = 67.28.113.74
mx1.mail.yahoo.com internet address = 67.28.113.71
mx1.mail.yahoo.com internet address = 67.28.113.73
mx1.mail.yahoo.com internet address = 67.28.113.19
mx1.mail.yahoo.com internet address = 4.79.181.14
mx1.mail.yahoo.com internet address = 4.79.181.15
mx1.mail.yahoo.com internet address = 4.79.181.168
mx2.mail.yahoo.com internet address = 4.79.181.135
mx2.mail.yahoo.com internet address = 4.79.181.136
mx2.mail.yahoo.com internet address = 4.79.181.168
mx2.mail.yahoo.com internet address = 67.28.113.70
mx2.mail.yahoo.com internet address = 67.28.113.72
ns1.yahoo.com internet address = 66.218.71.63
ns2.yahoo.com internet address = 66.163.169.170
ns3.yahoo.com internet address = 217.12.4.104
ns4.yahoo.com internet address = 68.142.196.63
> set type=mx
> dahew.com.cn
Server: 10.10.16.60
Address: 10.10.16.60#53

*** Can't find dahew.com.cn: No answer
> set type=mx
> dahew.com
Server: 10.10.16.60
Address: 10.10.16.60#53

Non-authoritative answer:
dahew.com mail exchanger = 10 mail1.dahew.com.

Authoritative answers can be found from:
dahew.com nameserver = ns1.dns-diy.com.
dahew.com nameserver = ns2.dns-diy.com.
mail1.dahew.com internet address = 219.156.123.177
ns1.dns-diy.com internet address = 210.51.187.81
ns1.dns-diy.com internet address = 218.16.225.50
ns1.dns-diy.com internet address = 60.191.252.66
ns2.dns-diy.com internet address = 218.107.207.123
ns2.dns-diy.com internet address = 218.85.134.143
ns2.dns-diy.com internet address = 64.84.29.59


当我们在bind中配置的时候,作如下语句:
$TTL 3h

@ SOA my.test.com. root.test.com. (
; ^^^^
;
        2000020501;序列号
3h; 3小时后刷新
1h; 1小时后彼一时试
1w; 1周后期满
1h) 否定缓存TTL为1小时


他们有区别吧,@ 在SOA类型记录的名字字段中指的是当前的源,是test.com

NS IN ns.test.com.
; 名字服务器
MX IN 10 mx.myhome.com.
; 邮件服务器
ns.myhome.com. IN A 192.168.1.1
mx.myhome.com. IN A 192.168.1.1

事情总是在看到过之后才能真正的了解。科学的理性精神,但是实际的操作是需要实证主义的!

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10617731/viewspace-959064/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/10617731/viewspace-959064/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值