How to setup mx record for subdomain?

Questions of the day ?

How to setup a MX domain for subdomeniu.domeniu.ro ?

We just now edit zone file /var/named/master/db.domeniuro

;
; db.domeniu.ro
;
$TTL 300

@ 1d IN SOA ns.biotree.tk. lucian.biotree.ro. (
2016090701 ;Serial
10800 ;Refresh after 3 hours
3600 ;Retry after 1 hour
1209600 ;Expire after 1 week
86400 ) ;Minimum TTL of 1 day

;———————–___ Name Servers ____—————————-

1d IN NS ns.biotree.tk.
1d IN NS ns2.biotree.tk.
1d IN MX 5 mail.domeniu.ro.
1d IN MX 10 smtp2.domeniu.ro.
1d IN TXT “v=spf1 a mx ptr -all”

;———————–___ Aliases___________—————————-

mail IN A 75.226.34.29
mail2 IN A 81.76.59.37

subdomeniu  IN  A  74.54.89.56

;———- MX Subdomeni —————-
subdomeniu IN MX 5 mail.domeniu.ro.
subdomeniu IN MX 20 smtp2.domeniu.ro.

 

How we test if we setup right MX ?

[root@mail7 ~]# host -t mx subdomeniu.domeniu.ro
subdomeniu.domeniu.ro mail is handled by 20 smtp2.domeniu.ro.
subdomeniu.domeniu.ro mail is handled by 5 mail.domeniu.ro.