Subdomain records for microsoft exchange online

November 18, 2015 1.2k views
DNS Email Configuration Management Ubuntu

My primary email points to gmail and it works great. However I've had to setup an exchange account for another project, and it would seem the best way to do it is with a subdomain to reroute.

Created a subdomain and started adding records for Microsoft:

MX -/- subdomain -/- subdomain-domain-ca.mail.protection.outlook.com -/- Works
CNAME -/- autodiscover.subdomain -/- autodiscover.outlook.com -/- Doesn't work
CNAME -/- msoid.subdomain -/- clientconfig.microsoftonline-p.net -/- Doesn't work
CNAME -/- enterpriseenrollment.subdomain -/- enterpriseenrollment.manage.microsoft.com -/- Doesn't work
CNAME -/- enterpriseregistration.subdomain -/- enterpriseregistration.windows.net -/- Doesn't work
CNAME -/- sip.subdomain -/- sipdir.online.lync.com -/- Doesn't work
CNAME -/- lyncdiscover.subdomain -/- webdir.online.lync.com -/- Doesn't work
TXT -/- v=spf1 include:spf.protection.outlook.com -all -/- Doesn't work
SRV -/- sip.tls -/- sipdir.online.lync.com -/- Works
SRV -/- sipfederationtls.tcp -/- sipfed.online.lync.com -/- Works

CNAME and TXT records work with main domain, not sure what I'm doing wrong with the sub? Is this not possible? Google makes me think so.

1 Answer

@daveb55d3c5c299

One issue that I spotted right off was the fact that you're not defining the actual sub-domain anywhere in your DNS Zone.

An MX entry does not function as a zone entry for a sub-domain in terms of defining it as a usable point of entry. This entry simply tells the mail server where to point, but it doesn't function as the base level for an actual sub-domain. You'd need to add either a CNAME for the sub-domain or an A entry (if using an IP).

If your DNS Zone is identical to what you've setup above, since subdomain doesn't have a base entry from which to work from, calls to x.subdomain would not function since the base subdomain doesn't actually exist in the zone file.

Ideally, you would want to setup the MX CNAME as mail or similar, simply for clarity. That's how I'd set it up if I were doing the same. For example, I'd take the DNS Zone you provided above and modify it to:

MX      mail                                                subdomain-domain-ca.mail.protection.outlook.com
CNAME   subdomain                                           location.wherethesubdomainpoints.ext
CNAME   autodiscover.subdomain                              autodiscover.outlook.com
CNAME   msoid.subdomain                                     clientconfig.microsoftonline-p.net
CNAME   enterpriseenrollment.subdomain                      enterpriseenrollment.manage.microsoft.com
CNAME   enterpriseregistration.subdomain                    enterpriseregistration.windows.net
CNAME   sip.subdomain                                       sipdir.online.lync.com
CNAME   lyncdiscover.subdomain                              webdir.online.lync.com
TXT     v=spf1 include:spf.protection.outlook.com -all
SIP     sip.tls                                             sipdir.online.lync.com
SRV     sipfederationtls.tcp                                sipfed.online.lync.com

The defining change is line #2 where the subdomain is actually defined.

  • Thanks.

    Those are just the records provided by Microsoft.

    I created the subdomain as a new domain, and added them there. The reason I did that was doing what you suggest didn't work either, and googling this board led me to believe it should work by adding the subdomain this way.

Have another answer? Share your knowledge.