A mail exchanger record (MX record) is a type of resource record in the Domain Name System that specifies a mail server responsible for accepting email
messages on behalf of a recipient's domain, and a preference value used
to prioritize mail delivery if multiple mail servers are available.
Edit MX Record in /var/named/zmailtech.com.zone file. for zmailtech.com domain.
[root@master ~]# vim /var/named/zmailtech.com.zone
[root@master ~]# cat /var/named/zmailtech.com.zone
$TTL 1D
@ IN SOA ns1.zmailtech.com. admin.zmailtech.com. (
2017121501 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
IN NS ns1.zmailtech.com.
ns1 IN A 192.168.10.2
master IN A 192.168.10.2
mail IN A 192.168.10.2
;CNAME Record
www IN CNAME master.zmailtech.com.
ftp IN CNAME master.zmailtech.com.
smtp IN CNAME mail.zmailtech.com.
;MX Record
zmailtech.com. IN MX 10 mail.zmailtech.com.
zmailtech.com. IN MX 20 smtp.zmailtech.com.
[root@master ~]#
Check MX Record with dig command.
[root@master ~]# dig mx zmailtech.com
; <<>> DiG 9.9.4-RedHat-9.9.4-50.el7 <<>> mx zmailtech.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 41221
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 1, ADDITIONAL: 3
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;zmailtech.com. IN MX
;; ANSWER SECTION:
zmailtech.com. 86400 IN MX 20 smtp.zmailtech.com.
zmailtech.com. 86400 IN MX 10 mail.zmailtech.com.
;; AUTHORITY SECTION:
zmailtech.com. 86400 IN NS ns1.zmailtech.com.
;; ADDITIONAL SECTION:
mail.zmailtech.com. 86400 IN A 192.168.10.2
ns1.zmailtech.com. 86400 IN A 192.168.10.2
;; Query time: 0 msec
;; SERVER: 192.168.10.2#53(192.168.10.2)
;; WHEN: Thu Dec 14 13:46:49 IST 2017
;; MSG SIZE rcvd: 134
[root@master ~]#
Check zmailtech.com mx record with host command
[root@master ~]# host -t mx zmailtech.com
zmailtech.com mail is handled by 20 smtp.zmailtech.com.
zmailtech.com mail is handled by 10 mail.zmailtech.com.
[root@master ~]#
Edit MX Record in /var/named/zmailtech.com.zone file. for zmailtech.com domain.
[root@master ~]# vim /var/named/zmailtech.com.zone
[root@master ~]# cat /var/named/zmailtech.com.zone
$TTL 1D
@ IN SOA ns1.zmailtech.com. admin.zmailtech.com. (
2017121501 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
IN NS ns1.zmailtech.com.
ns1 IN A 192.168.10.2
master IN A 192.168.10.2
mail IN A 192.168.10.2
;CNAME Record
www IN CNAME master.zmailtech.com.
ftp IN CNAME master.zmailtech.com.
smtp IN CNAME mail.zmailtech.com.
;MX Record
zmailtech.com. IN MX 10 mail.zmailtech.com.
zmailtech.com. IN MX 20 smtp.zmailtech.com.
[root@master ~]#
Check MX Record with dig command.
[root@master ~]# dig mx zmailtech.com
; <<>> DiG 9.9.4-RedHat-9.9.4-50.el7 <<>> mx zmailtech.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 41221
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 1, ADDITIONAL: 3
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;zmailtech.com. IN MX
;; ANSWER SECTION:
zmailtech.com. 86400 IN MX 20 smtp.zmailtech.com.
zmailtech.com. 86400 IN MX 10 mail.zmailtech.com.
;; AUTHORITY SECTION:
zmailtech.com. 86400 IN NS ns1.zmailtech.com.
;; ADDITIONAL SECTION:
mail.zmailtech.com. 86400 IN A 192.168.10.2
ns1.zmailtech.com. 86400 IN A 192.168.10.2
;; Query time: 0 msec
;; SERVER: 192.168.10.2#53(192.168.10.2)
;; WHEN: Thu Dec 14 13:46:49 IST 2017
;; MSG SIZE rcvd: 134
[root@master ~]#
Check zmailtech.com mx record with host command
[root@master ~]# host -t mx zmailtech.com
zmailtech.com mail is handled by 20 smtp.zmailtech.com.
zmailtech.com mail is handled by 10 mail.zmailtech.com.
[root@master ~]#
No comments:
Post a Comment