Problem: I need to setup zonefiles so that I can setup email users: Both [email protected], and [email protected], where there are two different users and not aliases. Emails from users @mysite.com utilizes a different mail server from the one used by users @email.mysite.com.
I have setup the following zone file:
mysite.com. IN SOA ns1.nsserver.co.in. admin.mysite.com. (
2007010403 ; Serial
1800 ; Refresh [1h=3600] 1800=30m
600 ; Retry [10m]
86400 ; Expire [2weeks] 86400=1day
180 ) ; Negative Cache TTL [1h]
;
mysite.com. IN NS ns1.nsserver.co.in.
mysite.com. IN NS ns2.nsserver.co.in.
mysite.com. IN NS ns3.nsserver.co.in.
mysite.com. IN MX 10 hermes.mailserver.co.in.
mail.mysite.com. IN MX 10 apollo.drmailserver.info.
mail.mysite.com. IN A 172.25.31.173
mysite.com. IN A 198.21.221.223
www.mysite.com. IN A 198.21.221.223
ns1.mysite.com. IN A 199.188.75.23
ns2.mysite.com. IN A 38.114.103.106
ns3.mysite.com. IN A 38.127.98.233
mysite.com. 3501 IN TXT "v=spf1 a:hermes.mailserver.co.in mx:hermes.mailserver.co.in mx:apollo.drmailserver.info ip4:198.23.228.223 ~all"
*.mysite.com. 3600 IN CNAME mysite.com.
Am I doing this properly? Is the A record to the IP of the mailserver required?
I've done a named-checkzone, which has found no errors. When I do a dig for MX records, the second MX record is not displayed. But I'm unsure whether this is because the record are not live yet.
The MX record should point to a valid A record. The MX record should match the right hand side of the email address.
So for [email protected], the MX record would be
Where mail.domain.com is the desired mail server.
mail.domain.com. then should have a valid A record.
I notice in your case, your MX record points to a 3rd party. I don't know if these are real domains or not but:
does not resolve for me and could be the source of your problem.
Once DNS is settled, you have to assure that the target mail server then knows what to do with email destined for [email protected].