Flaem

SPF and DMARC generator that checks your records as you go

Build both records from fields and copy the finished text into DNS. The tool flags multiple SPF records, more than 10 DNS lookups, a missing all mechanism and a DMARC policy with no report address. It sends no queries, so it only judges what it can see in the text.

01Generator

Your domain and senders

This is an example: the domain example.com and the addresses from documentation ranges (192.0.2.0/24, 2001:db8::/32) are made up. Enter your own and the records update straight away.

The domain in the sender address. SPF goes at this name and DMARC at _dmarc.

SPF: who may send

An address or a network, one per line. No DNS lookups.

An address or a network, one per line. No DNS lookups.

A domain with the provider's SPF, one per line. Each is at least 1 DNS lookup.

Only works without all, when nothing earlier matches. 1 DNS lookup.

Other senders

Result fail: the sender is not authorized to use this domain.

DMARC: what happens to mail that fails

Domain policy (p)

Such mail is suspicious. The receiver may treat it with more care.

Existing subdomains (sp)
Non-existent subdomains (np)

An email address, one per line. Without it, receivers send no aggregate reports.

These reports can contain message content, so pick a mailbox with restricted access.

DKIM domain alignment (adkim)
SPF domain alignment (aspf)
02In the record

What each part of the record means

Your records taken apart. The right-hand column shows what uses up the DNS lookup limit.

SPF

TermWhat it doesDNS lookups
mxWhat it doesLets through the addresses of the servers in the domain's MX records.DNS lookups1
ip4:192.0.2.25What it doesLets through this IPv4 address or network.DNS lookups0
ip6:2001:db8::25What it doesLets through this IPv6 address or network.DNS lookups0
include:_spf.example.comWhat it doesChecks the SPF of the named domain. If that record returns pass, the sender passes.DNS lookups1
-allWhat it doesOther senders get the result fail.DNS lookups0

DMARC

TagWhat it does
v=DMARC1What it doesVersion. It has to come first, in exactly this form.
p=quarantineWhat it doesPolicy for the domain: quarantine.
rua=mailto:dmarc@example.comWhat it doesWhere to send aggregate reports.
03Check

Check the records you already have

Paste the TXT records of one domain, one per line. It can be dig output or part of a zone file. We fetch nothing, so the result only covers the pasted text.

We join quotes and records split into several strings. Other TXT records are skipped.

These records are made up and deliberately wrong, to show the messages.

  • The whole set

    • Error. Found 2 SPF records. A domain can have only one, otherwise the receiver returns permerror. Merge them into one.

      RFC 7208, 3.2, 4.5

  • SPF record 1

    v=spf1 mx include:_spf.example.com

    DNS lookups in this text: 2 of 10

    This is a lower bound: the records named in include and redirect can add lookups of their own, and those cannot be seen without a DNS query.

    • Warning. No all mechanism and no redirect modifier. When nothing matches, the result is neutral, as if the record ended in ?all.

      RFC 7208, 4.7

  • SPF record 2

    v=spf1 a mx include:mail-a.example.com include:mail-b.example.com include:mail-c.example.com include:mail-d.example.com include:mail-e.example.com include:mail-f.example.com include:mail-g.example.com include:mail-h.example.com include:mail-i.example.com -all

    DNS lookups in this text: 11 of 10

    This is a lower bound: the records named in include and redirect can add lookups of their own, and those cannot be seen without a DNS query.

    • Error. The text has 11 DNS lookups against a limit of 10. Beyond that, the receiver returns permerror. Remove entries you do not need or replace them with addresses in ip4 and ip6.

      RFC 7208, 4.6.4

    • Note. The record has 259 characters and a single TXT string holds 255. Split it into parts in a zone file.

      RFC 7208, 3.3

  • DMARC record 1

    v=DMARC1; p=reject
    • Warning. The p=reject policy runs with no report address. Without rua, receivers send no aggregate reports, so you will not see which mail is failing.

      RFC 9989, 4.7, 5.1.3, 8

    • Note. With p=reject, mail needs a DKIM signature, because SPF alone will most likely fail on forwarded mail. Domains whose users post to mailing lists should not publish this policy.

      RFC 9989, 7.4, 8

04How to read the result

The rules behind these checks

RFC 7208 describes SPF and RFC 9989 describes DMARC. It replaced RFC 7489 in May 2026. Every message shows a section number.

DNS lookups in SPFinclude + a + mx + ptr + exists + redirect
Each of these terms counts as 1 and the limit is 10. The all, ip4 and ip6 mechanisms and the exp modifier do not count. The limit also covers the records named by include, which we cannot see, so our number is a lower bound.
Multiple SPF recordsmore than one v=spf1 = permerror
What counts is records starting with exactly v=spf1 at one name. A v=spf10 record does not count, and other TXT records, such as service verifications, do no harm.
Qualifier- fail, ~ softfail, ? neutral, + pass
The sign before a mechanism sets the result on a match. No sign counts as +, which is why all on its own lets everyone through.
End of an SPF recordno all and no redirect = like ?all
Terms after all are never checked, and redirect is ignored when all is present, wherever it stands. We do not count those terms towards the limit.
DMARC policyp for the domain, sp for subdomains, np for non-existent ones
Without sp and np, subdomains take the policy from p. The record sits at _dmarc and has to start with v=DMARC1. When one name has several records, the receiver discards them all.
DMARC reportsrua = aggregate, ruf = individual failures
Without rua, receivers send no aggregate reports, and moving from p=none to a stricter policy relies on those. A mailbox is written as mailto:.

What the tool does not check

  • What sits behind include and redirect, and how many MX records you have
  • Queries with no answer, which the RFC says to limit to two
  • Whether the record is published and what DNS shows
  • The report authorization record in another domain
  • DKIM and its keys
  • %{...} macros: we read them as plain text
05Questions

Questions about SPF and DMARC records

Limits, tags and what happens to the text you enter.

The limit of 10 in RFC 7208 covers the whole check, including the records named by include and redirect. Without a DNS query we do not know what is in them, so we only count the terms in your text. The number shown is a lower bound. Only a tool that queries DNS gives the full figure.

No. Two v=spf1 records at one name return permerror. Merge them into one with two include entries, and keep an eye on the lookup limit.

RFC 7208 calls the -all result an explicit statement that the sender is not authorized to use the domain. The ~all result is a weaker version: probably not authorized, with no strong statement. What a receiver does with either result is up to the receiver.

RFC 9989 removed the pct, rf and ri tags. To test a policy, use t=y now, and the check will tell you if an old record still has any of them. Receivers working to RFC 7489 may not know the new t tag yet.

RFC 9989 describes a different path: p=none with reports first, then p=quarantine, and only then a decision on p=reject. Domains whose users post to mailing lists should not publish p=reject, and with this policy mail needs a DKIM signature.

Yes, but that domain has to agree with a v=DMARC1 TXT record at your-domain._report._dmarc.reports-domain. The tool gives you the name and you add the record at that domain. We compare the text of the names, so another domain of the same company gets flagged too.

No. A record can be correct and mail can still fail: DMARC also needs domain alignment, and RFC 9989 recommends using both SPF and DKIM. The final decision always belongs to the receiver.

No. Everything happens in your browser, with no queries to DNS or to our server. The data is stored in the page address after the # sign, and browsers do not send that part, so it is not in our logs. Anyone who gets the link sees what you entered.

Customer email where these records set themselves up

In Flaem, the DKIM, SPF and DMARC records are added to the zone when email is enabled, and the health screen shows whether they are correct. 14-day trial with every feature.