Workflow Tools Control Yard

Home / Email and M365

SPF and DMARC record builder

Paste an SPF or DMARC record to see what each part does and what needs fixing, or build a new one below. The page reads only the text you give it and does not query DNS.

Explain a record

Build an SPF record

List every system that sends mail using your domain in the From address. One domain has exactly one SPF record.

Mail from any other server

TXT record at the domain itself (host @)

v=spf1 ~all

Build a DMARC record

TXT record at host _dmarc

v=DMARC1; p=none

SPF reference

An SPF record is a TXT record on the domain that starts with v=spf1 and lists who may send mail for it. A receiver reads the parts from left to right and stops at the first match. Each mechanism can carry a qualifier in front: + pass (the default), - fail, ~ soft fail, ? neutral.

PartMatchesDNS lookup
allEvery sender. Goes last, because nothing after it is read.No
ip4:, ip6:One address or a range in CIDR form.No
aThe addresses the domain's A and AAAA records point to. a:other.example uses another name.Yes
mxThe addresses of the domain's mail servers.Yes
include:Whatever the named domain's own SPF record allows.Yes
exists:Any sender, if the named domain resolves. Used with macros.Yes
ptrSenders whose reverse DNS name is in the domain. RFC 7208 says not to use it.Yes
redirect=Hands the decision to another domain's record when nothing else matched.Yes
exp=Names a TXT record whose text explains a failure to the sender.No

A receiver gives up with a permanent error after 10 DNS lookups, counting those inside every included record. A record with two v=spf1 TXT records on the same name is also a permanent error. A single string in a TXT record holds at most 255 characters; a longer record is split into several quoted strings that the receiver joins without adding spaces.

DMARC reference

A DMARC record is a TXT record at _dmarc. followed by the domain. It tells receivers what to do with mail that fails both SPF and DKIM alignment for the From domain, and where to send reports. The standard was revised in May 2026 as RFC 9989, which removed three tags and added three.

TagValuesMeaning
vDMARC1Version. Must come first.
pnone, quarantine, rejectPolicy for the domain.
spSame as pPolicy for subdomains. Defaults to p.
npSame as pPolicy for subdomains that do not exist in DNS. Defaults to sp. Added by RFC 9989.
ruamailto: addressesWhere daily aggregate reports go.
rufmailto: addressesWhere per-message failure reports go.
adkimr, sDKIM alignment: relaxed (default) accepts a subdomain, strict needs the same domain.
aspfr, sSPF alignment, with the same two settings.
fo0, 1, d, sWhen to send a failure report: 0 when both checks fail (default), 1 when either fails, d on a DKIM failure, s on an SPF failure.
ty, nTesting mode. t=y asks receivers not to enforce the policy yet. Added by RFC 9989 in place of pct.
psdy, n, uSays whether the domain is a public suffix. Ordinary domains leave it out. Added by RFC 9989.
pct0 to 100Share of failing mail the policy applied to. Removed by RFC 9989.
rf, riReport format and report interval. Removed by RFC 9989.

Reports can go to an address in another domain only if that domain agrees: it publishes a TXT record containing v=DMARC1 at yourdomain._report._dmarc.theirdomain. Report processing services set this up for their customers.

More Email and M365 tools