Samprix

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

TypeNameValuePriority
MX@in1-smtp.messagingengine.com10
MX@in2-smtp.messagingengine.com20
TXT@v=spf1 include:spf.messagingengine.com ~all
CNAMEfm1._domainkeyfm1.example.com.dkim.fmhosted.com
CNAMEfm2._domainkeyfm2.example.com.dkim.fmhosted.com
CNAMEfm3._domainkeyfm3.example.com.dkim.fmhosted.com
TXT_dmarcv=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.

TypeNameValuePriority
MX@in1-smtp.messagingengine.com10
MX@in2-smtp.messagingengine.com20

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

  1. Add the three CNAME records below at your DNS host. They’re the same pattern for every Fastmail domain.
  2. In Fastmail, open Settings → Domains and check your domain’s status; it updates once the records are live.

The CNAME records look like this:

TypeNameValue
CNAMEfm1._domainkeyfm1.example.com.dkim.fmhosted.com
CNAMEfm2._domainkeyfm2.example.com.dkim.fmhosted.com
CNAMEfm3._domainkeyfm3.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.

All tools