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

I have a problem with setting the DNS in order to use Google Apps on specific domains. I can easily set the DNS for domains that are controlled via some control panel (eg. GoDaddy) but I have problems for domains that are controlled via zone files on the server.

If I configure the zone file like following:

MYDOMAIN.COM.    3600    IN    SOA    some.domaincontrol.com.    name.mail.com (
            2012041904
            28800
            7200
            604800
            3600
            )
; A Records
@    3600    IN    A    000.000.000.000

; CNAME Records
mail    3600    IN    CNAME    ghs.google.com
calendar    3600    IN    CNAME    ghs.google.com
docs    3600    IN    CNAME    ghs.google.com
www    3600    IN    CNAME    @
test    3600    IN    CNAME    @

; MX Records
@    3600    IN    MX    1    ASPMX.L.GOOGLE.COM
@    3600    IN    MX    5    ALT1.ASPMX.L.GOOGLE.COM
@    3600    IN    MX    5    ALT2.ASPMX.L.GOOGLE.COM
@    3600    IN    MX    10    ASPMX2.GOOGLEMAIL.COM
@    3600    IN    MX    10    ASPMX3.GOOGLEMAIL.COM

; TXT Records
@    3600    IN    TXT    "google-site-verification=blah-blah-12345"

; NS Records
@    3600    IN    NS    some.domaincontrol.com
@    3600    IN    NS    another.domaincontrol.com

Then the MX records reported by Google Apps, and some DNS query sites (like Network Tools), are having as suffix the domain itself:

MX    1    ASPMX.L.GOOGLE.COM.MYDOMAIN.COM
MX    5    ALT1.ASPMX.L.GOOGLE.COM.MYDOMAIN.COM
MX    5    ALT2.ASPMX.L.GOOGLE.COM.MYDOMAIN.COM
MX    10    ASPMX2.GOOGLEMAIL.COM.MYDOMAIN.COM
MX    10    ASPMX3.GOOGLEMAIL.COM.MYDOMAIN.COM

Also, the "mail", "docs" and "calendar" subdomains are not being redirected to Google Apps.

I have also tried with the following configuration for the MX records, in hope that this will properly point to external (Google) mail exchange:

; MX Records
3600    MX    1    ASPMX.L.GOOGLE.COM.
3600    MX    5    ALT1.ASPMX.L.GOOGLE.COM.
3600    MX    5    ALT2.ASPMX.L.GOOGLE.COM.
3600    MX    10    ASPMX2.GOOGLEMAIL.COM.
3600    MX    10    ASPMX3.GOOGLEMAIL.COM.

But this resulted with no MX record being retrieved by Google Apps and DNS queries. Some sort of misconfiguration in the DNS zone file is occurring

How can I properly configure domain via zone file to properly point to external MX and CNAME lcoations? Particularly to Google Apps?

PS. I have first posted same question at Stackoverflow, prior to realizing that this is more suitable location. Question URL.

share|improve this question
add comment

1 Answer

up vote 6 down vote accepted

In zone files, all domain names without trailing dot interpreted as relative to the zone. @ is a shortcut for the zone domain and if label is omitted, the last label is used. That is probably why in your last MX example you got no MX records.

; CNAME Records
mail     3600    IN    CNAME ghs.google.com.
calendar 3600    IN    CNAME ghs.google.com.
docs     3600    IN    CNAME ghs.google.com.
www      3600    IN    CNAME @
test     3600    IN    CNAME @
; MX Records
@        3600    IN    MX    1    ASPMX.L.GOOGLE.COM.
@        3600    IN    MX    5    ALT1.ASPMX.L.GOOGLE.COM.
@        3600    IN    MX    5    ALT2.ASPMX.L.GOOGLE.COM.
@        3600    IN    MX    10    ASPMX2.GOOGLEMAIL.COM.
@        3600    IN    MX    10    ASPMX3.GOOGLEMAIL.COM.

; TXT Records
@        3600    IN    TXT   "google-site-verification=blah-blah-12345"

; NS Records
@        3600    IN    NS    some.domaincontrol.com.
@        3600    IN    NS    another.domaincontrol.com.
share|improve this answer
    
it was a missing trailing dot that originally caused problems. I knew it's gonna be something trivial (not to me, of course). now it works like a charm! thanks. –  deyo.vuk Apr 29 '12 at 19:21
add comment

Your Answer

 
discard

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.