DNS
1 前言
一个问题,一篇文章,一出故事。
笔者一个邮件投递服务需要邮件MX记录的配合,于是整理此文。
2 最佳实践
2.1 DNS服务环境
2.2 配置MX记录
2.2.1 创建配置
vim /var/named/cmdschool.org.internal.zone
创建如下记录,
#... mail01 IN A 10.168.0.125 mail02 IN A 10.168.0.126 mail01 IN MX 10 mail01.cmdschool.org. mail02 IN MX 10 mail02.cmdschool.org.
2.2.2 检查配置文件
named-checkconf /etc/named.conf named-checkconf -t /var/named/chroot/ /etc/named.conf
2.2.3 重新启动服务使配置生效
In dnsSer0[1,2]
systemctl restart named-chroot.service
2.2.4 验证配置
In client01
nslookup > server 10.168.0.60 Default server: 10.168.0.60 Address: 10.168.0.60#53 > set type=mx > mail01.cmdschool.org Server: 10.168.0.60 Address: 10.168.0.60#53 mail01.cmdschool.org mail exchanger = 10 mail01.cmdschool.org. > mail02.cmdschool.org Server: 10.168.0.60 Address: 10.168.0.60#53 mail02.cmdschool.org mail exchanger = 10 mail02.cmdschool.org. >
没有评论