Self Host Wizard Docs

Mail DNS records reference

The DNS records a domain on a Self Host Wizard box publishes for mail, as internal/maildns produces them for thx dns: A, MX, SPF, DKIM, DMARC and client autoconfiguration.

thx dns <domain> prints these records for one of your domains. Below they are shown for the documentation domain example.com, the documentation address 203.0.113.10 and the cloud region sa-saopaulo-1; your box prints its own.

The records

TypeNameValuePriorityNeededWhy
Amail.example.com203.0.113.10—requiredthe mail server; DNS only (never proxied by a CDN)
MXexample.commail.example.com10requiredwhere the internet delivers mail for example.com
TXTexample.comv=spf1 include:rp.oracleemaildelivery.com ~all—requiredlets the cloud provider's email service send as example.com; one SPF record per name: merge if one exists
CNAME<selector>._domainkey.example.com<CNAME value shown in your cloud console: Email Delivery > Email Domains > example.com > DKIM>—requiredthe email service signs outgoing mail; copy both name and value from your cloud console
TXT_dmarc.example.comv=DMARC1; p=none—requiredstart at p=none; tighten once real mail shows SPF and DKIM pass
CNAMEautoconfig.example.commail.example.com—optionalThunderbird and others find the server settings
CNAMEautodiscover.example.commail.example.com—optionalOutlook and others find the server settings
SRV_submissions._tcp.example.com1 465 mail.example.com0optionalsending, implicit TLS (RFC 6186, 8314)
SRV_submission._tcp.example.com1 587 mail.example.com0optionalsending, STARTTLS
SRV_imaps._tcp.example.com1 993 mail.example.com0optionalreading mail, implicit TLS

As zone-file lines

The same records as thx dns prints them (TTL 3600). The placeholder line is commented out so a zone file with it still loads.

mail.example.com. 3600 IN A 203.0.113.10
example.com. 3600 IN MX 10 mail.example.com.
example.com. 3600 IN TXT "v=spf1 include:rp.oracleemaildelivery.com ~all"
; <selector>._domainkey.example.com. 3600 IN CNAME <CNAME value shown in your cloud console: Email Delivery > Email Domains > example.com > DKIM>.
_dmarc.example.com. 3600 IN TXT "v=DMARC1; p=none"
autoconfig.example.com. 3600 IN CNAME mail.example.com.
autodiscover.example.com. 3600 IN CNAME mail.example.com.
_submissions._tcp.example.com. 3600 IN SRV 0 1 465 mail.example.com.
_submission._tcp.example.com. 3600 IN SRV 0 1 587 mail.example.com.
_imaps._tcp.example.com. 3600 IN SRV 0 1 993 mail.example.com.

SPF include and relay host by region

The SPF include follows the area of the cloud region that relays your mail; a region outside the areas below gets all three includes. The relay host is that region's SMTP endpoint of the email service (port 587, STARTTLS).

RegionSPF includeRelay host
us-ashburn-1include:rp.oracleemaildelivery.comsmtp.email.us-ashburn-1.oci.oraclecloud.com
sa-saopaulo-1include:rp.oracleemaildelivery.comsmtp.email.sa-saopaulo-1.oci.oraclecloud.com
eu-frankfurt-1include:eu.rp.oracleemaildelivery.comsmtp.email.eu-frankfurt-1.oci.oraclecloud.com
uk-london-1include:eu.rp.oracleemaildelivery.comsmtp.email.uk-london-1.oci.oraclecloud.com
ap-tokyo-1include:ap.rp.oracleemaildelivery.comsmtp.email.ap-tokyo-1.oci.oraclecloud.com
me-jeddah-1include:rp.oracleemaildelivery.com include:ap.rp.oracleemaildelivery.com include:eu.rp.oracleemaildelivery.comsmtp.email.me-jeddah-1.oci.oraclecloud.com

Facts on this page come from these files in the selfhostwizard repository:

  • internal/maildns/maildns.go
  • cmd/thx/main.go

This page is generated from the code at build time, so it changes when the code does.