Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Problem: I need to setup zonefiles so that I can setup email users: Both jim@mysite.com, and jim@email.mysite.com, 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
mysite.com.      IN     A
www.mysite.com.  IN     A
ns1.mysite.com.  IN     A
ns2.mysite.com.  IN     A
ns3.mysite.com.  IN     A
mysite.com.     3501    IN     TXT   "v=spf1 a:hermes.mailserver.co.in mx:hermes.mailserver.co.in mx:apollo.drmailserver.info ip4: ~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.

share|improve this question
You mention @email.mysite.com but your zone file has mail.mysite.com. Is this a typo? –  jeffatrackaid Jun 13 '13 at 19:25

1 Answer 1

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 user@my.domain.com, the MX record would be

my.domain.com IN MX 10 mail.domain.com.

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 user@my.domain.com.

share|improve this answer
I had obsfuscated the actual mail server names before posting here. THe actual ones do resolve. –  Droidzone Jun 14 '13 at 1:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.