Set Up Email Records in FastPath DNS: MX, SPF, DKIM and DMARC

TUTORIAL

The four kinds of DNS record that make email work for a domain: MX to receive, then SPF, DKIM and DMARC so that receiving servers trust what you send.

Email depends on DNS twice: one record publishes the server that receives mail for your domain, and three more let receiving servers check that messages sent in your name are genuine. This tutorial adds all four to your zone on FastPath DNS: MX, SPF, DKIM and DMARC.

Prerequisites

  • A zone for your domain on your FastPath DNS service (Add a DNS Zone to FastPath DNS).
  • A mail server or a mail provider for the domain, with the hostname it receives mail on and the DKIM record it generates for you.

Step 1: Add the MX Record

The MX record names the server that receives mail for the domain. Open the zone (Records on its row), click Add Record, fill in the dialog and click Add Record:

SettingValue
TypeMX
Name@, for addresses at the domain itself.
TTL1 hr
Mail serverThe hostname that receives your mail, for example mail.example.com, or the one your provider gives you.
Priority10. With several MX records, the lowest number is tried first.
Add Record dialog filled in for an MX record at the root of example.com

An MX record must point to a hostname that has its own address record, never to an IP address. If the mail server is yours, click Add Record again and create that record in the same zone:

SettingValue
TypeA
Namemail
TTL1 hr
IPv4 addressThe mail server’s address, for example 203.0.113.20.

Step 2: Publish the SPF Policy

SPF lists the servers allowed to send mail for the domain; receiving servers reject or flag the rest. It is a TXT record at the root. Click Add Record, fill in the dialog and click Add Record:

SettingValue
TypeTXT
Name@
TTL1 hr
Contentv=spf1 mx -all: the domain’s MX hosts may send, nobody else. Type it without quotes; they are added for you.
Add Record dialog filled in for a TXT record carrying an SPF policy

A mail provider gives you its own mechanism to add, usually an include: entry. Keep a single SPF record per name and authorize every sending system in it: two SPF records on the same name invalidate both.

Step 3: Publish the DKIM Key

DKIM lets receiving servers verify the signature your mail system adds to each message. The mail system generates the key and gives you the record to publish. Click Add Record and create it:

SettingValue
TypeTXT
NameThe selector your mail system gives you, followed by ._domainkey, for example mail2026._domainkey.
TTL1 hr
ContentThe key record exactly as generated, starting with v=DKIM1.

Some providers ask for a CNAME record on that name instead of a TXT record. Create the type they specify.

Step 4: Publish the DMARC Policy

DMARC tells receiving servers what to do with mail that fails both checks, and where to send reports. Click Add Record and create the policy record:

SettingValue
TypeTXT
Name_dmarc
TTL1 hr
Contentv=DMARC1; p=quarantine; rua=mailto:dmarc@example.com. Replace the address with a mailbox you monitor: the reports are sent to it. For a domain that already sends mail, type p=none instead of p=quarantine.

p=none changes nothing for delivery, and the reports show which senders fail. Edit the record and move to p=quarantine, then p=reject, once every legitimate sender passes.

Step 5: Check the Records

Confirm that the records table lists the mail records next to those of your website:

Records table of example.com with the MX record, the mail host A record and the SPF and DMARC TXT records

Then query the FastPath DNS name server for each record:

dig @dns1.swiftycdn.net example.com MX +short
dig @dns1.swiftycdn.net mail.example.com A +short
dig @dns1.swiftycdn.net example.com TXT +short
dig @dns1.swiftycdn.net mail2026._domainkey.example.com TXT +short
dig @dns1.swiftycdn.net _dmarc.example.com TXT +short

The answers are the mail server with its priority, the address of the mail host, the SPF policy, the DKIM key and the DMARC policy, as you entered them. Replace mail2026 with your own selector.

What You Have

A domain that states where its mail is delivered and which servers may send it, with a policy for everything else. Mail delivery uses these records once the domain uses the service’s name servers: Point Your Domain to the FastPath DNS Name Servers.

Can’t find what you need? Our engineers are available around the clock, from quick fixes to full infrastructure design.