Guide
Set up SPF, DKIM and DMARC for Fastmail
The MX, SPF, DKIM and DMARC records Fastmail needs for your own domain, with the exact DKIM CNAMEs.
Updated
To send and receive mail as your own domain with Fastmail, your domain’s DNS needs four kinds of record: MX so mail reaches Fastmail, SPF to say Fastmail may send as you, DKIM so Fastmail can sign your mail, and DMARC to tell receivers what to do with mail that fails. Fastmail lists the records it wants under Fastmail Settings → Domains → your domain → DNS records.
The examples use example.com: put your own domain in its place. In the Name column, @ means the domain itself; some DNS hosts want that field left empty instead.
The records at a glance
| Type | Name | Value | Priority |
|---|---|---|---|
| MX | @ | in1-smtp.messagingengine.com | 10 |
| MX | @ | in2-smtp.messagingengine.com | 20 |
| TXT | @ | v=spf1 include:spf.messagingengine.com ~all | |
| CNAME | fm1._domainkey | fm1.example.com.dkim.fmhosted.com | |
| CNAME | fm2._domainkey | fm2.example.com.dkim.fmhosted.com | |
| CNAME | fm3._domainkey | fm3.example.com.dkim.fmhosted.com | |
| TXT | _dmarc | v=DMARC1; p=none; rua=mailto:dmarc-reports@example.com |
1. MX: receive mail at Fastmail
Delete any MX records left from a previous provider (or from your domain registrar), then add these. Mixing old and new MX records sends some of your mail to the old place.
| Type | Name | Value | Priority |
|---|---|---|---|
| MX | @ | in1-smtp.messagingengine.com | 10 |
| MX | @ | in2-smtp.messagingengine.com | 20 |
2. SPF: allow Fastmail to send
Add one TXT record at the domain itself:
v=spf1 include:spf.messagingengine.com ~all A domain can have only one SPF record. If you already have one, add include:spf.messagingengine.com to it instead of creating a second, and add the includes
of any other service that sends as you (a newsletter tool, a help desk). The SPF record generator builds the combined record and counts its
lookups.
3. DKIM: sign your mail
- Add the three CNAME records below at your DNS host. They’re the same pattern for every Fastmail domain.
- In Fastmail, open Settings → Domains and check your domain’s status; it updates once the records are live.
The CNAME records look like this:
| Type | Name | Value |
|---|---|---|
| CNAME | fm1._domainkey | fm1.example.com.dkim.fmhosted.com |
| CNAME | fm2._domainkey | fm2.example.com.dkim.fmhosted.com |
| CNAME | fm3._domainkey | fm3.example.com.dkim.fmhosted.com |
4. DMARC: decide what happens to forged mail
Add one TXT record named _dmarc:
v=DMARC1; p=none; rua=mailto:dmarc-reports@example.com p=none changes nothing about delivery: it asks receivers to send you reports, so
you can see what sends as your domain. Create the report mailbox first, or use an address you
already read. Once the reports show only mail you recognise passing, move to p=quarantine and then p=reject, as described in moving DMARC to p=reject.
5. Check it works
New records usually show up within minutes, but can take up to an hour or two (longer if you replaced records with a long TTL). Run the email domain health check: it recognises Fastmail from your MX records and lists anything still missing, with the exact record to add. To see a record reach resolvers around the world, use the DNS propagation checker.
Things to watch with Fastmail
- If you use Fastmail’s own name servers, Fastmail creates all of these records for you and you can skip this page.
Where to add the records
Step-by-step instructions for the record editor at common DNS hosts:
Not sure who hosts your DNS? It’s usually where you bought the domain, unless you moved its name servers. The WHOIS lookup shows the name servers, and the health check names the host for you.
Related tools
All toolsEmail Domain Health Check
SPF, DKIM, DMARC and MX checked together, with a score and a list of fixes.
SPF Record Generator
Pick the services that send your email and get a ready-to-paste SPF record, lookups counted.
DKIM Record Checker
Find DKIM keys under common selectors, or check your own, with key size and problems.
DMARC Record Generator
Choose a policy and where reports go, and get a DMARC record with a safe path to p=reject.
More guides
- Set up SPF, DKIM and DMARC for Google Workspace The MX, SPF, DKIM and DMARC records Google Workspace needs, and where to turn on DKIM in the Admin console.
- Set up SPF, DKIM and DMARC for Microsoft 365 The MX, SPF, DKIM and DMARC records Microsoft 365 needs, and how to turn on DKIM in the Defender portal.
- Set up SPF, DKIM and DMARC for Zoho Mail The MX, SPF, DKIM and DMARC records Zoho Mail needs, for every Zoho region, and where to add a DKIM key.