Reference Entries of Office 365 records for Internal & External DNS

General Office 365 email setup check list:
  1. MS requires that each smart-host configuration or send connector setting must use only the assigned host record (e.g.
    – Verify this record at:
  2. TXT record should be inclusive of certain relaying subnets:
    – Example:  Text: v=spf1 mx a ip4:x.x.x.x/30 ~all
    – This helps with spam filtering, rather than email routing.
  3. Third-party filtering service should be routing to the correct smart-host record as shown in (a). For instance, barracudanetworks should route to the correct smtp server as ‘
  4. Check the connection filtering with access privileges using a Global Admin account at URL
  5. Authenticate to using a Global Admin account > Navigate to Exchange Admin Center (Admin > Exchange) > Mail flow > Connectors > Check the list of connectors set up for your organization. If there are no connectors listed from your organization’s email server to Office 365, create one by clicking on the ‘+’ sign >
    Set From = Public IP address of the Email Relaying Computer, Set To = Office 365 > Next > Next > Save
    # Preempt this email relaying error:

    Error in processing. The server response was: 4.4.62 Mail sent to the wrong Office 365 region. ATTR35. For more
    information please go to
Sample DNS Records:
CNAME: autodiscover 5 minutes (300 seconds)
CNAME: sip 5 minutes
CNAME: lyncdiscover 5 minutes
CNAME: enterpriseregistration 5 minutes
CNAME: enterpriseenrollment 5 minutes
TXT: @ v=spf1 -all 5 minutes
SRV: _sip._tls.@ 100 1 443 5 minutes
SRV: _sipfederationtls._tcp.@ 100 1 5061 5 minutes
MX: <MX-prefix> 5 minutes (Obtain MX-prefix from:
CNAME: imap
CNAME: mail
CNAME: pop
CNAME: smtp
# Quick DNS checkup:
nslookup -type=a
nslookup -type=cname
nslookup -type=a
nslookup -type=cname
nslookup -type=mx
nslookup -type=txt
nslookup -type=srv
nslookup -type=srv

A convenient PowerShell function to perform this lookup:

function checkMailRecord{
	$autodiscover=(Resolve-DnsName "autodiscover.$domainName" -type CNAME -server $dnsServer).NameHost
	$mx=(Resolve-DnsName $domainName -type MX -server $dnsServer|?{$_.Section -eq 'Answer'}).NameExchange
	$text=(Resolve-DnsName $domainName -type TXT -server $dnsServer|?{$_.Strings -like 'v=spf1*'}).Strings
	$sip=(Resolve-DnsName "_sip._tls.$domainName" -Type SRV -server $dnsServer|?{$_.Section -eq 'Answer'}).NameTarget
	$sipFederation=(Resolve-DnsName "_sipfederationtls._tcp.$domainName" -Type SRV -server $dnsServer|?{$_.Section -eq 'Answer'}).NameTarget
    write-host "
    AutoDiscover: $autodiscover
    Mail Exchange (MX): $mx
    Text: $text
    SIP: $sip
    SIP Federation: $sipFederation


# Sample output
PS C:\users\test> checkMailRecord                                                 
    Mail Exchange (MX):
    Text: v=spf1 ip4:x.x.x.x/30 ~all
    SIP Federation:

Leave a Reply

Your email address will not be published. Required fields are marked *