<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: DMARCguard</title>
    <description>The latest articles on DEV Community by DMARCguard (dmarcguard).</description>
    <link>https://dev.to/dmarcguard</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Forganization%2Fprofile_image%2F15969%2F390f8509-8005-414f-a064-3e98f652b238.png</url>
      <title>DEV Community: DMARCguard</title>
      <link>https://dev.to/dmarcguard</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dmarcguard"/>
    <language>en</language>
    <item>
      <title>How to Set Up SPF, DKIM and DMARC for a Custom Domain on Kagi Mail</title>
      <dc:creator>Meysam</dc:creator>
      <pubDate>Wed, 02 Dec 2026 15:52:24 +0000</pubDate>
      <link>https://dev.to/dmarcguard/how-to-set-up-spf-dkim-and-dmarc-for-a-custom-domain-on-kagi-mail-30lm</link>
      <guid>https://dev.to/dmarcguard/how-to-set-up-spf-dkim-and-dmarc-for-a-custom-domain-on-kagi-mail-30lm</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Short answer&lt;/p&gt;

&lt;p&gt;A Kagi Mail custom domain needs five kinds of DNS record: an ownership TXT&lt;br&gt;
record that starts with &lt;code&gt;kagimail-verification=&lt;/code&gt;, plus MX, SPF,&lt;br&gt;
DKIM and DMARC records. For the domain we added, Settings &amp;gt; Domains listed an&lt;br&gt;
MX record for &lt;code&gt;mail.kagimail.com&lt;/code&gt;, the SPF value&lt;br&gt;
&lt;code&gt;v=spf1 include:kagimail.com ~all&lt;/code&gt;, two DKIM keys as TXT records, and the DMARC value&lt;br&gt;
&lt;code&gt;v=DMARC1; p=reject&lt;/code&gt;, which has no report address. If no DMARC policy&lt;br&gt;
covers your domain yet, start at &lt;code&gt;p=none&lt;/code&gt; with a report address&lt;br&gt;
instead. For&lt;br&gt;
domains whose users may post to mailing lists, RFC 9989 advises at least a month&lt;br&gt;
there and as long at quarantine before reject. Check the result with the&lt;br&gt;
&lt;a href="https://dmarcguard.io/tools/dmarc-checker/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=kagi-mail-custom-domain-dns" rel="noopener noreferrer"&gt;DMARC checker&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Setting up a Kagi Mail custom domain means publishing a handful of DNS records.&lt;br&gt;
Kagi announced the &lt;a href="https://blog.kagi.com/kagi-mail-public-beta" rel="noopener noreferrer"&gt;public beta&lt;/a&gt; of Kagi&lt;br&gt;
Mail on November 23, 2026. Its&lt;br&gt;
&lt;a href="https://help.kagi.com/kagi/mail/#custom-domains" rel="noopener noreferrer"&gt;help page&lt;/a&gt; says a custom domain needs&lt;br&gt;
an MX record plus &lt;a href="https://dmarcguard.io/learn/spf/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=kagi-mail-custom-domain-dns" rel="noopener noreferrer"&gt;SPF&lt;/a&gt;&lt;br&gt;
(&lt;a href="https://www.rfc-editor.org/rfc/rfc7208" rel="noopener noreferrer"&gt;RFC 7208&lt;/a&gt;), &lt;a href="https://dmarcguard.io/learn/dkim/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=kagi-mail-custom-domain-dns" rel="noopener noreferrer"&gt;DKIM&lt;/a&gt;&lt;br&gt;
(&lt;a href="https://www.rfc-editor.org/rfc/rfc6376" rel="noopener noreferrer"&gt;RFC 6376&lt;/a&gt;) and &lt;a href="https://dmarcguard.io/learn/dmarc/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=kagi-mail-custom-domain-dns" rel="noopener noreferrer"&gt;DMARC&lt;/a&gt;&lt;br&gt;
(&lt;a href="https://www.rfc-editor.org/rfc/rfc9989.html" rel="noopener noreferrer"&gt;RFC 9989&lt;/a&gt;) records. It names&lt;br&gt;
the kinds of record and points to Settings &amp;gt; Domains for the values.&lt;/p&gt;

&lt;p&gt;We added a domain, published the records and sent mail from it. This guide&lt;br&gt;
prints the values Kagi listed, what four mailbox providers recorded for that&lt;br&gt;
mail, and how the values compare with kagimail.com and kagi.com. It is for&lt;br&gt;
anyone moving a personal or company domain to Kagi Mail who wants mail to keep&lt;br&gt;
authenticating on the way. You will leave&lt;br&gt;
with the records,&lt;br&gt;
&lt;a href="https://dmarcguard.io/blog/kagi-mail-custom-domain-dns/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=kagi-mail-custom-domain-dns#how-do-you-move-a-domain-from-google-workspace-to-kagi-mail" rel="noopener noreferrer"&gt;an order to publish them in&lt;/a&gt;,&lt;br&gt;
and a DMARC policy you chose on purpose.&lt;/p&gt;
&lt;h2&gt;
  
  
  Which DNS records does a Kagi Mail custom domain need?
&lt;/h2&gt;

&lt;p&gt;Kagi Mail asks for five kinds of record: one to prove you own the domain, then&lt;br&gt;
the four its help page says it checks, which are MX, SPF, DKIM and DMARC. The ownership&lt;br&gt;
record comes first. In Settings &amp;gt; Domains you click &lt;strong&gt;Add domain&lt;/strong&gt;, enter the&lt;br&gt;
domain, and publish a TXT record whose value starts with&lt;br&gt;
&lt;code&gt;kagimail-verification=&lt;/code&gt;. After you click &lt;strong&gt;I’ve added the&lt;br&gt;
record&lt;/strong&gt;, Kagi lists the rest.&lt;/p&gt;

&lt;p&gt;On November 24, 2026 we added &lt;code&gt;kagi.dmarcguard.dev&lt;/code&gt; in a trial&lt;br&gt;
account. This is what the screen listed. We set up a second domain in the same&lt;br&gt;
account as well. Three results below come from that one: a forwarded message,&lt;br&gt;
a &lt;code&gt;Received&lt;/code&gt; header and Yahoo Mail’s filing of its messages. The text says so&lt;br&gt;
where they do.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The records Kagi Mail listed for the domain we added&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Record&lt;/th&gt;
&lt;th&gt;Host on the screen&lt;/th&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Ownership&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kagi&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;TXT&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;kagimail-verification=&lt;/code&gt; followed by a token&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MX&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kagi&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;MX&lt;/td&gt;
&lt;td&gt;&lt;code&gt;10 mail.kagimail.com.&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SPF&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kagi&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;TXT&lt;/td&gt;
&lt;td&gt;&lt;code&gt;v=spf1 include:kagimail.com ~all&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DKIM&lt;/td&gt;
&lt;td&gt;&lt;code&gt;v1-ed25519-20261124._domainkey.kagi&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;TXT&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;v=DKIM1; k=ed25519; h=sha256; p=&lt;/code&gt; and the key&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DKIM&lt;/td&gt;
&lt;td&gt;&lt;code&gt;v1-rsa-20261124._domainkey.kagi&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;TXT&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;v=DKIM1; k=rsa; h=sha256; p=&lt;/code&gt; and the key&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DMARC&lt;/td&gt;
&lt;td&gt;&lt;code&gt;_dmarc.kagi&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;TXT&lt;/td&gt;
&lt;td&gt;&lt;code&gt;v=DMARC1; p=reject&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;We added a subdomain of &lt;code&gt;dmarcguard.dev&lt;/code&gt;, so every host ends in&lt;br&gt;
&lt;code&gt;kagi&lt;/code&gt;. For a domain at its apex (the bare domain, with no&lt;br&gt;
subdomain), expect the same names without that ending: the root (often written&lt;br&gt;
&lt;code&gt;@&lt;/code&gt;), the two &lt;code&gt;_domainkey&lt;/code&gt; names, and &lt;code&gt;_dmarc&lt;/code&gt;. The screen shows the exact&lt;br&gt;
hosts for your domain.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The same set, written for an apex domain&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;; The set Kagi Mail listed for our subdomain, written for an apex domain
; (host names inferred). The token, the selector dates and the keys are your
; own: copy them from Settings &amp;gt; Domains.
@                               TXT  "kagimail-verification=&amp;lt;your token&amp;gt;"
@                               MX   10 mail.kagimail.com.
@                               TXT  "v=spf1 include:kagimail.com ~all"
v1-ed25519-YYYYMMDD._domainkey  TXT  "v=DKIM1; k=ed25519; h=sha256; p=&amp;lt;your Ed25519 key&amp;gt;"
v1-rsa-YYYYMMDD._domainkey      TXT  "v=DKIM1; k=rsa; h=sha256; p=&amp;lt;your RSA key&amp;gt;"
; The DMARC value exactly as the screen lists it: no rua, no other tag.
_dmarc                          TXT  "v=DMARC1; p=reject"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Kagi puts setup at “about 5 to 10&lt;br&gt;
minutes”, plus the time DNS changes take to apply, which it says is usually a&lt;br&gt;
few minutes and can be up to 24 hours. For any record that is&lt;br&gt;
missing or wrong, the screen shows the value it expects beside the value it&lt;br&gt;
found, and it flags extra records for removal.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3glllelydh6lucec5uy6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3glllelydh6lucec5uy6.png" alt="Kagi Mail's Domains screen listing the MX, SPF and two DKIM records for a custom domain, each with its found value shown as missing." width="800" height="660"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Kagi Mail's Domains screen for our domain, before the four records in view were published. The two DKIM keys are covered.&lt;/p&gt;
&lt;h2&gt;
  
  
  What MX record does Kagi Mail use?
&lt;/h2&gt;

&lt;p&gt;Kagi Mail uses one MX host, &lt;code&gt;mail.kagimail.com&lt;/code&gt;, and listed it for&lt;br&gt;
our domain at priority 10. The screen listed one MX record.&lt;br&gt;
kagi.com publishes the same host at the same priority, and kagimail.com&lt;br&gt;
points at it too, at priority 1.&lt;/p&gt;

&lt;p&gt;Take the previous provider’s MX records out in the same change. Two sets of MX&lt;br&gt;
records split incoming mail between two providers according to their&lt;br&gt;
priorities.&lt;/p&gt;

&lt;p&gt;The MX record is the last of Kagi’s records to change, not the first. Until it changes,&lt;br&gt;
incoming mail keeps arriving where it always has.&lt;br&gt;
&lt;a href="https://dmarcguard.io/blog/kagi-mail-custom-domain-dns/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=kagi-mail-custom-domain-dns#how-do-you-move-a-domain-from-google-workspace-to-kagi-mail" rel="noopener noreferrer"&gt;The migration order&lt;/a&gt;&lt;br&gt;
explains why. Once it is published, an &lt;a href="https://dmarcguard.io/tools/mx-lookup/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=kagi-mail-custom-domain-dns" rel="noopener noreferrer"&gt;MX lookup&lt;/a&gt; shows&lt;br&gt;
what the world sees.&lt;/p&gt;
&lt;h2&gt;
  
  
  What SPF record should you publish for Kagi Mail?
&lt;/h2&gt;

&lt;p&gt;Kagi listed &lt;code&gt;v=spf1 include:kagimail.com ~all&lt;/code&gt; for our domain: one include, which costs&lt;br&gt;
1 of the 10 DNS lookups SPF allows, and a soft fail (&lt;code&gt;~all&lt;/code&gt;),&lt;br&gt;
which says any other sender is probably not authorized.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;SPF (TXT at the domain)&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;v=spf1 include:kagimail.com ~all
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;include&lt;/code&gt; is the lookup, and what it points at is kagimail.com’s own record,&lt;br&gt;
&lt;code&gt;v=spf1 ip4:34.134.57.174 ip4:198.133.160.17 -all&lt;/code&gt;: two &lt;code&gt;ip4&lt;/code&gt; terms (fixed addresses) and &lt;code&gt;-all&lt;/code&gt;, none of&lt;br&gt;
which queries DNS&lt;br&gt;
(&lt;a href="https://www.rfc-editor.org/rfc/rfc7208#section-4.6.4" rel="noopener noreferrer"&gt;RFC 7208 §4.6.4&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;-all&lt;/code&gt; inside the included record does not make your record a hard fail.&lt;br&gt;
An include only answers “does this sender match?”&lt;br&gt;
(&lt;a href="https://www.rfc-editor.org/rfc/rfc7208#section-5.2" rel="noopener noreferrer"&gt;RFC 7208 §5.2&lt;/a&gt;); what&lt;br&gt;
happens to everyone else is decided by your own record’s &lt;code&gt;~all&lt;/code&gt;. The&lt;br&gt;
difference between the two endings is covered in&lt;br&gt;
&lt;a href="https://dmarcguard.io/blog/spf-softfail-vs-hardfail/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=kagi-mail-custom-domain-dns" rel="noopener noreferrer"&gt;SPF softfail vs. hardfail&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;A domain name may carry only one SPF record. Two of them make a check of that&lt;br&gt;
name return a permanent error&lt;br&gt;
(&lt;a href="https://www.rfc-editor.org/rfc/rfc7208#section-4.5" rel="noopener noreferrer"&gt;RFC 7208 §4.5&lt;/a&gt;). So if&lt;br&gt;
another service still sends mail for the domain, its include goes into the&lt;br&gt;
same record as Kagi’s. A domain that is leaving Google Workspace would publish&lt;br&gt;
this while both are in use:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;SPF while Google Workspace still sends&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;v=spf1 include:kagimail.com include:_spf.google.com ~all
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is 2 lookups, because Google’s include costs&lt;br&gt;
1 on its own. Our&lt;br&gt;
&lt;a href="https://dmarcguard.io/blog/google-workspace-spf-record/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=kagi-mail-custom-domain-dns" rel="noopener noreferrer"&gt;Google Workspace SPF guide&lt;/a&gt; walks through&lt;br&gt;
the merge, and the &lt;a href="https://dmarcguard.io/tools/spf-checker/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=kagi-mail-custom-domain-dns" rel="noopener noreferrer"&gt;SPF checker&lt;/a&gt; counts the lookups in&lt;br&gt;
whatever you end up with.&lt;/p&gt;

&lt;p&gt;We did not test whether Recheck DNS accepts a merged record like this one, or&lt;br&gt;
whether anything else waits on that row. Because the screen compares the value&lt;br&gt;
it expects with the one it finds, it may show a mismatch.&lt;/p&gt;
&lt;h2&gt;
  
  
  Which DKIM selectors does Kagi Mail use?
&lt;/h2&gt;

&lt;p&gt;For our domain Kagi listed two DKIM keys, both published as TXT records: an&lt;br&gt;
Ed25519 key (&lt;a href="https://www.rfc-editor.org/rfc/rfc8463" rel="noopener noreferrer"&gt;RFC 8463&lt;/a&gt;, a newer&lt;br&gt;
algorithm whose keys are much shorter than RSA keys for similar security) at&lt;br&gt;
the selector &lt;code&gt;v1-ed25519-20261124&lt;/code&gt; and an RSA key at&lt;br&gt;
&lt;code&gt;v1-rsa-20261124&lt;/code&gt;. The digits match the day we added the&lt;br&gt;
domain, so the shape is &lt;code&gt;v1-ed25519-YYYYMMDD&lt;/code&gt; and &lt;code&gt;v1-rsa-YYYYMMDD&lt;/code&gt;. kagi.com&lt;br&gt;
publishes keys at the same pattern, &lt;code&gt;v1-rsa-20260831&lt;/code&gt; and&lt;br&gt;
&lt;code&gt;v1-ed25519-20260831&lt;/code&gt;. Expect a pair shaped like this for your&lt;br&gt;
domain, and copy the exact names from the screen.&lt;/p&gt;

&lt;p&gt;Publish both keys, because Kagi signs with both. Each message from the domain&lt;br&gt;
whose source we read carried two DKIM signatures, one per selector, each with&lt;br&gt;
the domain itself after &lt;code&gt;d=&lt;/code&gt;. Every DKIM verifier has to implement RSA with SHA-256&lt;br&gt;
(&lt;a href="https://www.rfc-editor.org/rfc/rfc6376#section-3.3" rel="noopener noreferrer"&gt;RFC 6376 §3.3&lt;/a&gt;), and&lt;br&gt;
&lt;a href="https://www.rfc-editor.org/rfc/rfc8463#section-5" rel="noopener noreferrer"&gt;RFC 8463 §5&lt;/a&gt; says verifiers&lt;br&gt;
must implement Ed25519 as well. In our test, three of four receivers did not&lt;br&gt;
record a pass for it:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How four receivers recorded the two DKIM signatures on mail from our domain on November 28, 2026&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Receiver&lt;/th&gt;
&lt;th&gt;Ed25519 signature&lt;/th&gt;
&lt;th&gt;RSA signature&lt;/th&gt;
&lt;th&gt;DMARC&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Gmail&lt;/td&gt;
&lt;td&gt;&lt;code&gt;dkim=neutral (no key)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;pass&lt;/td&gt;
&lt;td&gt;pass&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Outlook.com&lt;/td&gt;
&lt;td&gt;&lt;code&gt;dkim=ignore (unsupported signature algorithm)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;pass&lt;/td&gt;
&lt;td&gt;pass&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Proton Mail&lt;/td&gt;
&lt;td&gt;&lt;code&gt;dkim=permerror (0-bit key)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;pass&lt;/td&gt;
&lt;td&gt;pass&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Yahoo Mail&lt;/td&gt;
&lt;td&gt;&lt;code&gt;dkim=pass&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;pass&lt;/td&gt;
&lt;td&gt;pass&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The RSA signature passed at all four, and so did DMARC, which needs only one&lt;br&gt;
passing signature whose domain aligns with the From domain&lt;br&gt;
(&lt;a href="https://www.rfc-editor.org/rfc/rfc9989.html#section-4.4.1" rel="noopener noreferrer"&gt;RFC 9989 §4.4.1&lt;/a&gt;).&lt;br&gt;
So a line that is not a pass for the Ed25519 selector, beside a pass for the&lt;br&gt;
RSA one, is what a working setup looked like in our test.&lt;/p&gt;

&lt;p&gt;The same shows up in aggregate reports. Google’s report on that day’s mail from&lt;br&gt;
our domain covers 6 messages: it lists the&lt;br&gt;
Ed25519 selector as &lt;code&gt;fail&lt;/code&gt; and the RSA selector as &lt;code&gt;pass&lt;/code&gt;, and every message&lt;br&gt;
passed DMARC. Yahoo’s report, on 2 messages, lists&lt;br&gt;
both selectors as &lt;code&gt;pass&lt;/code&gt;. For this setup, a &lt;code&gt;fail&lt;/code&gt; beside that selector was not&lt;br&gt;
a sign that anything was broken.&lt;/p&gt;

&lt;p&gt;kagi.com’s RSA key is 2,048 bits, the&lt;br&gt;
length &lt;a href="https://www.rfc-editor.org/rfc/rfc8301#section-3.2" rel="noopener noreferrer"&gt;RFC 8301 §3.2&lt;/a&gt;&lt;br&gt;
recommends. A key that long does not fit in a single DNS string, which holds&lt;br&gt;
at most 255 characters. It is stored as several strings that a verifier joins&lt;br&gt;
back together with nothing in between&lt;br&gt;
(&lt;a href="https://www.rfc-editor.org/rfc/rfc6376#section-3.6.2.2" rel="noopener noreferrer"&gt;RFC 6376 §3.6.2.2&lt;/a&gt;).&lt;br&gt;
Many DNS panels split the value for you; if yours does not, split it yourself.&lt;br&gt;
If a key fails to validate, look for a space or a line break pasted into the&lt;br&gt;
middle of it.&lt;/p&gt;

&lt;p&gt;Because these are TXT records, the public keys live in your zone. If Kagi ever&lt;br&gt;
changes a key, you publish the new record yourself. Some hosts take the other&lt;br&gt;
route: &lt;a href="https://www.fastmail.help/hc/en-us/articles/360060591153-Manual-DNS-configuration" rel="noopener noreferrer"&gt;Fastmail&lt;/a&gt; and&lt;br&gt;
&lt;a href="https://proton.me/support/anti-spoofing-custom-domain" rel="noopener noreferrer"&gt;Proton&lt;/a&gt; each ask for&lt;br&gt;
3 CNAME records that point at keys on&lt;br&gt;
their side, and Proton says it generates a new key every&lt;br&gt;
6 months.&lt;/p&gt;

&lt;p&gt;One practical note: a date-stamped selector is not on the lists of common&lt;br&gt;
names a checker tries, so such a checker will not find it. Type the selector&lt;br&gt;
into the &lt;a href="https://dmarcguard.io/tools/dkim-checker/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=kagi-mail-custom-domain-dns" rel="noopener noreferrer"&gt;DKIM checker&lt;/a&gt; to test a key. Our&lt;br&gt;
&lt;a href="https://dmarcguard.io/blog/dkim-setup-guide/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=kagi-mail-custom-domain-dns" rel="noopener noreferrer"&gt;DKIM setup guide&lt;/a&gt; covers selectors and key records&lt;br&gt;
in general.&lt;/p&gt;
&lt;h2&gt;
  
  
  Which DMARC policy should you start with on Kagi Mail?
&lt;/h2&gt;

&lt;p&gt;The DMARC value Kagi listed for our domain is &lt;code&gt;v=DMARC1; p=reject&lt;/code&gt;,&lt;br&gt;
with no other tag, and we suggest starting somewhere else: &lt;code&gt;p=none&lt;/code&gt;&lt;br&gt;
with a report address, unless a DMARC policy already covers the domain. This is&lt;br&gt;
the one place where we suggest something different from the value on the&lt;br&gt;
screen.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;p=reject&lt;/code&gt; asks receivers to refuse mail that claims to come from your domain&lt;br&gt;
and fails DMARC. Some domains end up there. It is a demanding place to begin.&lt;br&gt;
As listed, the value also asks for no reports: it has no &lt;code&gt;rua&lt;/code&gt; tag, so&lt;br&gt;
receivers have no address to send them to.&lt;/p&gt;

&lt;p&gt;DMARC’s own standard says so. RFC 9989 singles out domains “that host users&lt;br&gt;
who might post messages to mailing lists” and says they should not publish&lt;br&gt;
&lt;code&gt;p=reject&lt;/code&gt;. A domain that wants to get there should first publish &lt;code&gt;p=none&lt;/code&gt; for&lt;br&gt;
at least a month, then &lt;code&gt;p=quarantine&lt;/code&gt; for an equally long period, and compare&lt;br&gt;
the aggregate reports&lt;br&gt;
(&lt;a href="https://www.rfc-editor.org/rfc/rfc9989.html#section-7.4" rel="noopener noreferrer"&gt;RFC 9989 §7.4&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;A personal domain, or a company domain whose staff write to mailing lists, is&lt;br&gt;
that kind of domain.&lt;/p&gt;

&lt;p&gt;The reason is what a mailing list does to a message. It&lt;br&gt;
sends your message on from its own servers, so SPF often no longer matches&lt;br&gt;
your domain. If it also adds a footer or a tag in the subject, your DKIM&lt;br&gt;
signature stops verifying. The message then fails DMARC through no fault of&lt;br&gt;
yours, and under &lt;code&gt;p=reject&lt;/code&gt; a receiver may refuse it.&lt;br&gt;
&lt;a href="https://dmarcguard.io/blog/dmarc-forwarding-arc-fix/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=kagi-mail-custom-domain-dns" rel="noopener noreferrer"&gt;Why forwarded mail fails DMARC&lt;/a&gt; has the full&lt;br&gt;
mechanics.&lt;/p&gt;

&lt;p&gt;We saw the SPF half of this ourselves. A message from the second domain, sent&lt;br&gt;
to an address that forwards through Cloudflare Email Routing, arrived at Gmail&lt;br&gt;
with its envelope sender rewritten to the forwarding domain, so SPF no longer&lt;br&gt;
matched ours. It passed DMARC because the RSA signature still verified.&lt;/p&gt;

&lt;p&gt;So for a domain that has never had a DMARC record, publish a monitoring policy&lt;br&gt;
and read what comes back:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;DMARC starter (TXT at _dmarc)&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;v=DMARC1; p=none; rua=mailto:dmarc-reports@example.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Aggregate reports are XML files, usually sent daily by the receivers that&lt;br&gt;
support them. Point &lt;code&gt;rua&lt;/code&gt;, the tag that sets where those reports go, at&lt;br&gt;
something that parses them: a DMARC monitoring service (DMARCguard’s free plan&lt;br&gt;
is one) or our open-source report parser, Parse DMARC.&lt;br&gt;
&lt;a href="https://dmarcguard.io/blog/dmarc-rua-collection/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=kagi-mail-custom-domain-dns" rel="noopener noreferrer"&gt;Where rua reports go&lt;/a&gt; explains the address&lt;br&gt;
itself.&lt;/p&gt;

&lt;p&gt;Then follow the schedule above: quarantine for as long again, compare the&lt;br&gt;
reports, and only then decide whether &lt;code&gt;p=reject&lt;/code&gt; suits your domain. Skip the &lt;code&gt;pct&lt;/code&gt;&lt;br&gt;
ramp older guides suggest: RFC 9989 lists that tag as historic&lt;br&gt;
(&lt;a href="https://www.rfc-editor.org/rfc/rfc9989.html#section-9.3" rel="noopener noreferrer"&gt;RFC 9989 §9.3&lt;/a&gt;).&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Key finding 57.9% of domains that publish DMARC sit at p=none: 967,563 of 1,670,975 Source: DMARCguard State of Email Authentication 2026 scan, 5,499,028 Tranco domains, 2026-02-27&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Kagi’s screen may mark that row with a cross. To see what the screen does, we&lt;br&gt;
published a &lt;code&gt;p=none&lt;/code&gt; record with report addresses and alignment tags on our&lt;br&gt;
test subdomain. The row showed a cross, and still did after Recheck DNS. When we changed that record to &lt;code&gt;p=reject&lt;/code&gt; and&lt;br&gt;
added &lt;code&gt;sp=reject&lt;/code&gt;, leaving the other tags as they were, the row showed a&lt;br&gt;
check. So the row accepted tags beyond the bare value it lists. Two records do&lt;br&gt;
not establish what rule it applies. We did not try the shorter starter record&lt;br&gt;
above, or a subdomain with no DMARC record of its own.&lt;/p&gt;

&lt;p&gt;The other four records were not yet published while &lt;code&gt;p=none&lt;/code&gt; was up. We&lt;br&gt;
cannot say whether a domain reaches the Valid status, or can send, with a&lt;br&gt;
cross on that row. Receivers read what is in DNS.&lt;/p&gt;

&lt;p&gt;If you decide to publish &lt;code&gt;p=reject&lt;/code&gt; from the start anyway, add a &lt;code&gt;rua&lt;/code&gt; address&lt;br&gt;
to it. Without one, the domain enforces and you receive no reports.&lt;/p&gt;

&lt;p&gt;Two cases need different handling:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The domain already has a DMARC policy.&lt;/strong&gt; Leave it alone during the move.
If it is already at &lt;code&gt;p=reject&lt;/code&gt;, have Kagi’s DKIM records live before you
send through Kagi. RFC 9989 requires a &lt;code&gt;p=reject&lt;/code&gt; domain to sign with DKIM
and not to rely on SPF alone
(&lt;a href="https://www.rfc-editor.org/rfc/rfc9989.html#section-7.4" rel="noopener noreferrer"&gt;RFC 9989 §7.4&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The domain is a subdomain.&lt;/strong&gt; With no &lt;code&gt;_dmarc&lt;/code&gt; record of its own, an
existing subdomain takes the &lt;code&gt;sp&lt;/code&gt; tag of the DMARC record above it, or that
record’s &lt;code&gt;p&lt;/code&gt; tag if there is no &lt;code&gt;sp&lt;/code&gt;. Ours did:
&lt;code&gt;dmarcguard.dev&lt;/code&gt; publishes &lt;code&gt;sp=reject&lt;/code&gt;, so the test domain
was at reject before we added anything.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If the parent already enforces, your subdomain is already covered. Leave it&lt;br&gt;
  without a &lt;code&gt;_dmarc&lt;/code&gt; record instead of publishing the &lt;code&gt;p=none&lt;/code&gt; starter, which&lt;br&gt;
  would override the inherited policy.&lt;br&gt;
  &lt;a href="https://dmarcguard.io/blog/dmarc-subdomain-policy/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=kagi-mail-custom-domain-dns" rel="noopener noreferrer"&gt;DMARC subdomain policy&lt;/a&gt; covers &lt;code&gt;sp&lt;/code&gt; and &lt;code&gt;np&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;None of this is a comment on kagimail.com’s own record, which is &lt;code&gt;p=reject&lt;/code&gt;.&lt;br&gt;
A mailbox provider decides the policy for its own domain. Your domain is your&lt;br&gt;
decision, and &lt;a href="https://dmarcguard.io/blog/how-to-create-dmarc-record/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=kagi-mail-custom-domain-dns" rel="noopener noreferrer"&gt;how to create a DMARC record&lt;/a&gt;&lt;br&gt;
goes through each tag.&lt;/p&gt;
&lt;h2&gt;
  
  
  Why do Kagi Mail’s records look like Stalwart’s defaults?
&lt;/h2&gt;

&lt;p&gt;Because Kagi Mail runs on the&lt;br&gt;
&lt;a href="https://help.kagi.com/kagi/mail/faq.html" rel="noopener noreferrer"&gt;Stalwart&lt;/a&gt; mail server, and&lt;br&gt;
Stalwart computes a set of DNS records for every domain it&lt;br&gt;
hosts. The &lt;code&gt;Received&lt;/code&gt; header on mail we sent to an address on the second&lt;br&gt;
domain names it too: "Stalwart SMTP". We read the&lt;br&gt;
&lt;a href="https://github.com/stalwartlabs/stalwart" rel="noopener noreferrer"&gt;source code&lt;/a&gt; to see what it&lt;br&gt;
generates and compared that with DNS. Stalwart’s default DMARC&lt;br&gt;
record is &lt;code&gt;v=DMARC1; p=reject; rua=mailto:postmaster@&amp;lt;domain&amp;gt;&lt;/code&gt;; in the releases we read before&lt;br&gt;
v0.16.0 it was &lt;code&gt;v=DMARC1; p=reject; rua=mailto:postmaster@&amp;lt;domain&amp;gt;; ruf=mailto:postmaster@&amp;lt;domain&amp;gt;&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What Stalwart generates, what Kagi's own domains publish in DNS on November 28, 2026, and what Kagi listed for our domain&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Record&lt;/th&gt;
&lt;th&gt;Stalwart generates&lt;/th&gt;
&lt;th&gt;kagimail.com&lt;/th&gt;
&lt;th&gt;kagi.com&lt;/th&gt;
&lt;th&gt;Listed for our domain&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;DKIM selector&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;v{version}-{algorithm}-{date-%Y%m%d}&lt;/code&gt;; v0.11.8 to v0.15.5, YYYYMM + r or e&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;202503r&lt;/code&gt;, &lt;code&gt;202503e&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;v1-rsa-20260831&lt;/code&gt;, &lt;code&gt;v1-ed25519-20260831&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;v1-ed25519-20261124&lt;/code&gt;, &lt;code&gt;v1-rsa-20261124&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DMARC&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;v=DMARC1; p=reject; rua=mailto:postmaster@&amp;lt;domain&amp;gt;&lt;/code&gt;; v0.11.8 to v0.15.5, &lt;code&gt;v=DMARC1; p=reject; rua=mailto:postmaster@&amp;lt;domain&amp;gt;; ruf=mailto:postmaster@&amp;lt;domain&amp;gt;&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;&lt;code&gt;v=DMARC1; p=reject; rua=mailto:postmaster@kagimail.com; ruf=mailto:postmaster@kagimail.com&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;v=DMARC1; p=reject;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;v=DMARC1; p=reject&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SPF&lt;/td&gt;
&lt;td&gt;&lt;code&gt;v=spf1 mx -all&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;v=spf1 ip4:34.134.57.174 ip4:198.133.160.17 -all&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;v=spf1 ip4:35.212.75.77/32 ip4:198.133.160.17/32 include:_spf.google.com -all&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;v=spf1 include:kagimail.com ~all&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;TLS-RPT&lt;/td&gt;
&lt;td&gt;&lt;code&gt;v=TLSRPTv1; rua=mailto:postmaster@&amp;lt;domain&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;v=TLSRPTv1; rua=mailto:postmaster@kagimail.com&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;none&lt;/td&gt;
&lt;td&gt;not among the four on Kagi’s help page&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MTA-STS&lt;/td&gt;
&lt;td&gt;a policy that starts in testing mode&lt;/td&gt;
&lt;td&gt;a policy in testing mode&lt;/td&gt;
&lt;td&gt;none&lt;/td&gt;
&lt;td&gt;not among the four on Kagi’s help page&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Three things match. kagimail.com’s DMARC record is, character for character,&lt;br&gt;
the string Stalwart generated in the releases we read before v0.16.0.&lt;br&gt;
Its TLS-RPT record matches Stalwart’s, and its MTA-STS policy mode is&lt;br&gt;
Stalwart’s default. The date-stamped selectors on kagi.com and on our domain&lt;br&gt;
follow Stalwart’s current selector template, while kagimail.com’s two selectors&lt;br&gt;
follow the older one.&lt;/p&gt;

&lt;p&gt;These are comparisons of strings. They say nothing about which Stalwart&lt;br&gt;
version Kagi runs.&lt;/p&gt;

&lt;p&gt;SPF is the record that does not match, and it matters if you ever follow a&lt;br&gt;
generic Stalwart guide. Stalwart’s default, &lt;code&gt;v=spf1 mx -all&lt;/code&gt;,&lt;br&gt;
authorizes whatever the domain’s MX record points at. For a Kagi domain that&lt;br&gt;
is the address behind &lt;code&gt;mail.kagimail.com&lt;/code&gt;, which is neither of the&lt;br&gt;
two addresses in kagimail.com’s SPF record. Mail from the two addresses Kagi’s&lt;br&gt;
own record authorizes would fail SPF under &lt;code&gt;-all&lt;/code&gt;. Every message of ours&lt;br&gt;
whose headers we read had left from one of those two,&lt;br&gt;
&lt;code&gt;198.133.160.17&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Kagi lists an include of its own instead. Use Kagi’s value.&lt;/p&gt;

&lt;p&gt;The takeaway is about DMARC. &lt;code&gt;p=reject&lt;/code&gt; is the policy in this mail server’s&lt;br&gt;
default record, and that default carries a report address. The value Kagi&lt;br&gt;
listed for our domain has the same policy and no report address. Both are&lt;br&gt;
good reasons to choose your policy, and where your reports go, deliberately.&lt;br&gt;
Stalwart also&lt;br&gt;
appears in our &lt;a href="https://dmarcguard.io/blog/dkim2-draft-tracker/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=kagi-mail-custom-domain-dns" rel="noopener noreferrer"&gt;DKIM2 draft tracker&lt;/a&gt;, among the&lt;br&gt;
software the DKIM2 project’s deployments page lists.&lt;/p&gt;
&lt;h2&gt;
  
  
  What about MTA-STS, TLS-RPT and BIMI on Kagi Mail?
&lt;/h2&gt;

&lt;p&gt;None of the three is among the four records Kagi’s help page lists for a&lt;br&gt;
custom domain. Here is what applies to each.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;MTA-STS&lt;/strong&gt; (&lt;a href="https://www.rfc-editor.org/rfc/rfc8461" rel="noopener noreferrer"&gt;RFC 8461&lt;/a&gt;) tells sending&lt;br&gt;
servers to require an encrypted connection to your MX host. kagimail.com&lt;br&gt;
publishes a policy in testing mode, in which senders report failures&lt;br&gt;
and still deliver&lt;br&gt;
(&lt;a href="https://www.rfc-editor.org/rfc/rfc8461#section-5" rel="noopener noreferrer"&gt;RFC 8461 §5&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;It needs two things on your domain: a &lt;code&gt;_mta-sts&lt;/code&gt; TXT record and a policy file&lt;br&gt;
served over HTTPS at &lt;code&gt;mta-sts.yourdomain&lt;/code&gt;. Kagi’s help page and FAQ do not say&lt;br&gt;
whether Kagi serves that file for custom domains. Do not publish the TXT&lt;br&gt;
record unless something serves the policy.&lt;/p&gt;

&lt;p&gt;A domain whose MTA-STS policy for its old provider is in enforce mode needs&lt;br&gt;
that policy changed before the MX record moves. A sender that holds a policy&lt;br&gt;
in enforce mode does not deliver to an MX host the policy does not list&lt;br&gt;
(&lt;a href="https://www.rfc-editor.org/rfc/rfc8461#section-5" rel="noopener noreferrer"&gt;RFC 8461 §5&lt;/a&gt;). Updating a&lt;br&gt;
policy has its own order and its own waiting time&lt;br&gt;
(&lt;a href="https://www.rfc-editor.org/rfc/rfc8461#section-8.1" rel="noopener noreferrer"&gt;RFC 8461 §8.1&lt;/a&gt;): follow&lt;br&gt;
that section, and move the MX record only afterwards.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://support.tb.pro/hc/en-us/articles/55127043901971-Understanding-MTA-STS-for-Custom-Domains" rel="noopener noreferrer"&gt;Thundermail&lt;/a&gt;, another service built&lt;br&gt;
on Stalwart, tells its custom-domain users that&lt;br&gt;
automated support “isn’t currently planned” and recommends leaving the record&lt;br&gt;
out. See &lt;a href="https://dmarcguard.io/blog/mta-sts-example/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=kagi-mail-custom-domain-dns" rel="noopener noreferrer"&gt;an MTA-STS policy, line by line&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;TLS-RPT&lt;/strong&gt; (&lt;a href="https://www.rfc-editor.org/rfc/rfc8460" rel="noopener noreferrer"&gt;RFC 8460&lt;/a&gt;) only asks&lt;br&gt;
senders for reports on their TLS sessions to you, failures included. A&lt;br&gt;
&lt;code&gt;_smtp._tls&lt;/code&gt; record changes nothing about delivery, so you can add one on its&lt;br&gt;
own. &lt;a href="https://dmarcguard.io/blog/tls-rpt-report/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=kagi-mail-custom-domain-dns" rel="noopener noreferrer"&gt;Reading a TLS-RPT report&lt;/a&gt; shows what arrives.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;BIMI&lt;/strong&gt; puts your logo beside your messages in mailboxes that support it, and&lt;br&gt;
it requires DMARC at quarantine or reject first. It is a later step.&lt;br&gt;
&lt;a href="https://dmarcguard.io/blog/bimi-dmarc-requirements/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=kagi-mail-custom-domain-dns" rel="noopener noreferrer"&gt;What BIMI needs from DMARC&lt;/a&gt; has the list. Kagi&lt;br&gt;
Mail is on the displaying side of BIMI as well: its&lt;/p&gt;

&lt;p&gt;&lt;a href="https://help.kagi.com/kagi/mail/#sender-brand-logos" rel="noopener noreferrer"&gt;Sender brand logos&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;feature, part of Kagi Mail Labs, shows a sender’s verified logo in place of&lt;br&gt;
the letter avatar.&lt;/p&gt;
&lt;h2&gt;
  
  
  How do you move a domain from Google Workspace to Kagi Mail?
&lt;/h2&gt;

&lt;p&gt;Publish first the records that do not change how current mail is checked: the&lt;br&gt;
DKIM keys, and an SPF record that keeps every current sender and stays within&lt;br&gt;
10 DNS lookups. Change the MX record last.&lt;br&gt;
Google Workspace is the worked case here. We ran no move ourselves, so the&lt;br&gt;
order is our reasoning from how each record works, not a tested result. Kagi&lt;br&gt;
lists all four records together after the ownership step.&lt;/p&gt;

&lt;p&gt;An order for the move&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Start your Kagi Mail trial or Kagi Ultimate plan: Kagi says that until
the trial starts you can only send to Kagi support and yourself. Then add
the domain in Settings &amp;gt; Domains and publish the ownership TXT record.&lt;/li&gt;
&lt;li&gt;Publish the DKIM TXT records. They are public keys, so they can go in
before anything else changes.&lt;/li&gt;
&lt;li&gt;Add &lt;code&gt;include:kagimail.com&lt;/code&gt; to your existing SPF record. Keep your current
provider’s include (for Google Workspace, &lt;code&gt;include:_spf.google.com&lt;/code&gt;) while
anything still sends through it, and check that the merged record stays
within SPF’s 10 DNS lookups. A domain with no SPF record yet, and with
nothing else sending for it (the old provider counts), publishes Kagi’s
value as it is.&lt;/li&gt;
&lt;li&gt;Leave your DMARC record as it is. If the domain has no DMARC record and no
parent domain’s policy covers it, publish the &lt;code&gt;p=none&lt;/code&gt; starter record.&lt;/li&gt;
&lt;li&gt;Change the MX record to &lt;code&gt;10 mail.kagimail.com.&lt;/code&gt; and remove the previous
provider’s MX records. If the domain already publishes an MTA-STS policy,
read &lt;a href="https://dmarcguard.io/blog/kagi-mail-custom-domain-dns/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=kagi-mail-custom-domain-dns#what-about-mta-sts-tls-rpt-and-bimi-on-kagi-mail" rel="noopener noreferrer"&gt;the MTA-STS note&lt;/a&gt;
before this step.&lt;/li&gt;
&lt;li&gt;Send a test message and check it, as described in the next section. Do not
send real mail through Kagi until the test shows &lt;code&gt;dkim=pass&lt;/code&gt; for your
domain.&lt;/li&gt;
&lt;li&gt;When nothing sends through the old provider any more, remove its include
from SPF. A Google Workspace &lt;code&gt;google._domainkey&lt;/code&gt; record can stay until
then: DKIM records for two providers do not conflict.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A &lt;code&gt;p=none&lt;/code&gt; record we published showed a cross on the DMARC row in Recheck DNS&lt;br&gt;
(see the&lt;br&gt;
&lt;a href="https://dmarcguard.io/blog/kagi-mail-custom-domain-dns/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=kagi-mail-custom-domain-dns#which-dmarc-policy-should-you-start-with-on-kagi-mail" rel="noopener noreferrer"&gt;DMARC section&lt;/a&gt;). A&lt;br&gt;
merged SPF record from step 3 may show one too: we did not test it (see the&lt;br&gt;
&lt;a href="https://dmarcguard.io/blog/kagi-mail-custom-domain-dns/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=kagi-mail-custom-domain-dns#what-spf-record-should-you-publish-for-kagi-mail" rel="noopener noreferrer"&gt;SPF section&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;Kagi’s import helps with the mailbox itself. Connect the old account and Kagi&lt;br&gt;
Mail &lt;a href="https://help.kagi.com/kagi/mail/#importing-your-mail" rel="noopener noreferrer"&gt;keeps checking it for new mail&lt;/a&gt; every few&lt;br&gt;
minutes, so the switch can be gradual.&lt;/p&gt;

&lt;p&gt;kagi.com gives a before and after. Our February 2026 scan of&lt;br&gt;
5,499,028 domains recorded kagi.com’s records, so we can show them&lt;br&gt;
beside what it publishes now. Two snapshots show what changed, not the order&lt;br&gt;
or the reason.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;kagi.com in our scan of February 27, 2026 and in DNS on November 28, 2026&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Record&lt;/th&gt;
&lt;th&gt;February 2026 scan&lt;/th&gt;
&lt;th&gt;Now&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;MX host&lt;/td&gt;
&lt;td&gt;&lt;code&gt;mail.kagi.com&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;mail.kagimail.com&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SPF&lt;/td&gt;
&lt;td&gt;&lt;code&gt;v=spf1 ip4:35.212.75.77/32 include:_spf.google.com -all&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;v=spf1 ip4:35.212.75.77/32 ip4:198.133.160.17/32 include:_spf.google.com -all&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DKIM selectors (6 common names probed in the scan)&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;google&lt;/code&gt;, &lt;code&gt;dkim&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;the same two; also &lt;code&gt;v1-rsa-20260831&lt;/code&gt; and &lt;code&gt;v1-ed25519-20260831&lt;/code&gt;, which the scan did not probe&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DMARC policy&lt;/td&gt;
&lt;td&gt;reject&lt;/td&gt;
&lt;td&gt;reject&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The MX host changed, the SPF record gained one address and kept Google’s&lt;br&gt;
include, and the DMARC policy did not move. Two date-stamped DKIM keys now sit beside the old ones, and the date in&lt;br&gt;
their names falls after the scan. In that February scan, no domain pointed its&lt;br&gt;
MX record at Kagi Mail.&lt;/p&gt;

&lt;p&gt;For the Google side of the move, see&lt;br&gt;
&lt;a href="https://dmarcguard.io/blog/dmarc-google-workspace-setup/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=kagi-mail-custom-domain-dns" rel="noopener noreferrer"&gt;DMARC for Google Workspace&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  How do you check that a Kagi Mail custom domain works?
&lt;/h2&gt;

&lt;p&gt;Check four things: what Kagi sees, what DNS returns, what a receiving server&lt;br&gt;
concludes, and which folder the message reaches.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In Kagi Mail.&lt;/strong&gt; Click &lt;strong&gt;Recheck DNS&lt;/strong&gt; in Settings &amp;gt; Domains. For a record&lt;br&gt;
that is missing or differs, the row shows the value Kagi expects beside the&lt;br&gt;
one it found. Once every record of ours was found, with the DMARC record at&lt;br&gt;
&lt;code&gt;p=reject&lt;/code&gt;, each of the five rows showed a check and the domain’s DNS status&lt;br&gt;
read “Valid”.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In DNS.&lt;/strong&gt; Query each record yourself:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Query the records&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Replace example.com with your domain and YYYYMMDD with the date in your selectors.&lt;/span&gt;
dig +short MX example.com
dig +short TXT example.com &lt;span class="o"&gt;|&lt;/span&gt; grep spf1
dig +short TXT v1-ed25519-YYYYMMDD._domainkey.example.com
dig +short TXT v1-rsa-YYYYMMDD._domainkey.example.com
dig +short TXT _dmarc.example.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;In a real message.&lt;/strong&gt; Send one message from the new address to a mailbox at&lt;br&gt;
another provider, open the message’s headers there, and find the&lt;br&gt;
&lt;code&gt;Authentication-Results&lt;/code&gt; header&lt;br&gt;
(&lt;a href="https://www.rfc-editor.org/rfc/rfc8601" rel="noopener noreferrer"&gt;RFC 8601&lt;/a&gt;). You want &lt;code&gt;spf=pass&lt;/code&gt;,&lt;br&gt;
&lt;code&gt;dkim=pass&lt;/code&gt; with your own domain, and &lt;code&gt;dmarc=pass&lt;/code&gt;. Outlook.com and Proton&lt;br&gt;
Mail printed our domain after &lt;code&gt;header.d=&lt;/code&gt;; Gmail and Yahoo Mail printed it&lt;br&gt;
after &lt;code&gt;header.i=@&lt;/code&gt;. If&lt;br&gt;
&lt;code&gt;dkim=pass&lt;/code&gt; names a domain outside your Organizational Domain (for&lt;br&gt;
mail.example.com, usually example.com), the message was signed, but DMARC&lt;br&gt;
cannot use that signature. A parent or sibling name with the same&lt;br&gt;
Organizational Domain counts under DMARC’s default relaxed alignment, and does&lt;br&gt;
not under &lt;code&gt;adkim=s&lt;/code&gt;, which needs the two names to be identical.&lt;/p&gt;

&lt;p&gt;This is what Gmail recorded for the first message from our domain. We sent it&lt;br&gt;
after every record was published. By then our DMARC record was the &lt;code&gt;p=reject&lt;/code&gt;&lt;br&gt;
one that got the check, which is why Gmail prints &lt;code&gt;p=REJECT&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Authentication-Results at Gmail (address and signature data cut)&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Authentication-Results: mx.google.com;
       dkim=neutral (no key) header.i=@kagi.dmarcguard.dev header.s=v1-ed25519-20261124 header.b=...;
       dkim=pass header.i=@kagi.dmarcguard.dev header.s=v1-rsa-20261124 header.b=...;
       spf=pass (google.com: domain of ...@kagi.dmarcguard.dev designates 198.133.160.17 as permitted sender) smtp.mailfrom=...@kagi.dmarcguard.dev;
       dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=kagi.dmarcguard.dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The Return-Path was the address on our domain, and both signatures carried&lt;br&gt;
the domain after &lt;code&gt;d=&lt;/code&gt;. Each is identical to the From domain, so SPF and DKIM&lt;br&gt;
both align, even under the strict alignment (&lt;code&gt;adkim=s; aspf=s&lt;/code&gt;) our DMARC&lt;br&gt;
record asked for. The first DKIM line is the Ed25519 signature Gmail did not&lt;br&gt;
verify, as &lt;a href="https://dmarcguard.io/blog/kagi-mail-custom-domain-dns/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=kagi-mail-custom-domain-dns#which-dkim-selectors-does-kagi-mail-use" rel="noopener noreferrer"&gt;the DKIM section&lt;/a&gt;&lt;br&gt;
shows; it does not change the result. Our&lt;br&gt;
&lt;a href="https://dmarcguard.io/blog/read-email-headers/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=kagi-mail-custom-domain-dns" rel="noopener noreferrer"&gt;guide to reading email headers&lt;/a&gt; explains each&lt;br&gt;
field.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In the folder.&lt;/strong&gt; A pass is not a place in the inbox. We sent a first message&lt;br&gt;
from a new address on the domain to 7 mailboxes of our own, had&lt;br&gt;
each mailbox write back, and then sent a second message.&lt;/p&gt;

&lt;p&gt;Read the results narrowly. This was one account on one afternoon:&lt;br&gt;
21 short messages between one person’s mailboxes. The address&lt;br&gt;
was a minute old and the domain had never sent mail, and the test cannot tell&lt;br&gt;
those two apart. The Google Workspace mailbox is on the parent of the domain&lt;br&gt;
we sent from, a third thing it cannot separate. We did not send the same&lt;br&gt;
messages from another provider, so the table says nothing about Kagi Mail&lt;br&gt;
compared with anyone else.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where mail from our domain landed on November 28, 2026&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Mailbox&lt;/th&gt;
&lt;th&gt;First message&lt;/th&gt;
&lt;th&gt;Next message, after the mailbox wrote back&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Gmail (two mailboxes)&lt;/td&gt;
&lt;td&gt;Inbox&lt;/td&gt;
&lt;td&gt;not checked&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Google Workspace&lt;/td&gt;
&lt;td&gt;Spam&lt;/td&gt;
&lt;td&gt;Inbox&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Outlook.com (two mailboxes)&lt;/td&gt;
&lt;td&gt;Junk Email&lt;/td&gt;
&lt;td&gt;Inbox&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Yahoo Mail&lt;/td&gt;
&lt;td&gt;Spam&lt;/td&gt;
&lt;td&gt;Spam&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Proton Mail&lt;/td&gt;
&lt;td&gt;Inbox&lt;/td&gt;
&lt;td&gt;not checked&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;SPF, DMARC and a DKIM signature passed at each of the&lt;br&gt;
5 mailboxes where we read the authentication results, three of which had filed&lt;br&gt;
the message as spam or junk. The results were the same whether the message&lt;br&gt;
went to the inbox or not. Yahoo Mail filed the second domain’s messages as&lt;br&gt;
spam too, so that row is not only about a new address.&lt;/p&gt;

&lt;p&gt;The practical point is to test placement as well as headers. Send a first&lt;br&gt;
message to a mailbox you control at each provider your contacts use, and look&lt;br&gt;
at which folder it reaches.&lt;/p&gt;

&lt;h2&gt;
  
  
  Frequently asked questions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What DNS records does Kagi Mail need for a custom domain?
&lt;/h3&gt;

&lt;p&gt;Five kinds: a TXT record whose value starts with&lt;br&gt;
&lt;code&gt;kagimail-verification=&lt;/code&gt; to prove you own the domain, an MX&lt;br&gt;
record pointing to &lt;code&gt;mail.kagimail.com&lt;/code&gt;, one SPF record, DKIM keys&lt;br&gt;
published as TXT records, and a DMARC record. Settings &amp;gt; Domains shows the&lt;br&gt;
exact values for your domain and flags extra records.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is the MX record for Kagi Mail?
&lt;/h3&gt;

&lt;p&gt;For the domain we added, Kagi listed priority 10 and the&lt;br&gt;
host &lt;code&gt;mail.kagimail.com&lt;/code&gt;. kagi.com, Kagi’s own domain, publishes the&lt;br&gt;
same record. Remove the previous provider’s MX records when you switch: two&lt;br&gt;
sets of MX records split mail between providers, and Kagi’s checker flags&lt;br&gt;
extra records.&lt;/p&gt;

&lt;h3&gt;
  
  
  What DKIM selector does Kagi Mail use?
&lt;/h3&gt;

&lt;p&gt;For the domain we added, Kagi listed two keys, both published as TXT records:&lt;br&gt;
an Ed25519 key and an RSA key, at selectors shaped like &lt;code&gt;v1-ed25519-YYYYMMDD&lt;/code&gt;&lt;br&gt;
and &lt;code&gt;v1-rsa-YYYYMMDD&lt;/code&gt;. The date on ours was the day we added the domain.&lt;br&gt;
Settings &amp;gt; Domains shows the exact selector names for your domain.&lt;/p&gt;

&lt;h3&gt;
  
  
  Should I publish p=reject for my Kagi Mail domain?
&lt;/h3&gt;

&lt;p&gt;Not as the domain’s first DMARC record. The DMARC value Kagi listed for the&lt;br&gt;
domain we added is &lt;code&gt;v=DMARC1; p=reject&lt;/code&gt;, with no report address. RFC&lt;br&gt;
9989 says domains&lt;br&gt;
whose users may post to mailing lists should not publish &lt;code&gt;p=reject&lt;/code&gt;. It advises&lt;br&gt;
at least a month at &lt;code&gt;p=none&lt;/code&gt; and as long at &lt;code&gt;p=quarantine&lt;/code&gt; before a domain that&lt;br&gt;
wants &lt;code&gt;p=reject&lt;/code&gt; moves to it. A domain that a DMARC policy already covers keeps&lt;br&gt;
that policy during the move. Kagi’s screen showed a cross beside the &lt;code&gt;p=none&lt;/code&gt;&lt;br&gt;
record we published.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can I keep my Google Workspace SPF include while moving to Kagi Mail?
&lt;/h3&gt;

&lt;p&gt;Yes. SPF allows one record per domain name, so put &lt;code&gt;include:kagimail.com&lt;/code&gt; and&lt;br&gt;
&lt;code&gt;include:_spf.google.com&lt;/code&gt; in the same record while Google still sends for the&lt;br&gt;
domain, and remove Google’s include once it no longer does. That merged record&lt;br&gt;
costs 2 of the 10 DNS lookups SPF allows. Kagi’s Recheck DNS may&lt;br&gt;
show a merged record as a mismatch; we did not test it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does Kagi Mail support MTA-STS for custom domains?
&lt;/h3&gt;

&lt;p&gt;Kagi’s help page and FAQ do not say. The help page lists four records it&lt;br&gt;
checks for a custom domain: MX, SPF, DKIM and DMARC. kagimail.com itself publishes an&lt;br&gt;
MTA-STS policy in testing mode. Do not publish an &lt;code&gt;_mta-sts&lt;/code&gt; record&lt;br&gt;
for your domain unless a policy file is served for it.&lt;/p&gt;

&lt;h3&gt;
  
  
  How long does Kagi Mail custom-domain setup take?
&lt;/h3&gt;

&lt;p&gt;Kagi says about 5 to 10 minutes, plus&lt;br&gt;
the time your DNS changes take to apply. It says DNS changes usually apply&lt;br&gt;
within a few minutes and can take up to 24 hours.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does Kagi Mail check DMARC on incoming mail?
&lt;/h3&gt;

&lt;p&gt;Yes. For each message we sent to an address on our domain, Kagi recorded DKIM,&lt;br&gt;
SPF and DMARC results and a spam score. Each score included&lt;br&gt;
-0.50 from a rule named &lt;code&gt;DMARC_POLICY_ALLOW&lt;/code&gt;. Kagi’s&lt;/p&gt;

&lt;p&gt;&lt;a href="https://help.kagi.com/kagi/mail/#spam-and-junk" rel="noopener noreferrer"&gt;View spam results&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;lists the rules behind a score.&lt;/p&gt;

&lt;p&gt;Kagi Mail has also sent aggregate reports: we hold three from&lt;br&gt;
kagimail.com about two of our own domains. One row is a message&lt;br&gt;
that failed DMARC under &lt;code&gt;p=reject&lt;/code&gt;, with the disposition&lt;br&gt;
&lt;code&gt;reject&lt;/code&gt;. We did not see what happened to that message.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why does Gmail show dkim=neutral (no key) for a Kagi Mail message?
&lt;/h3&gt;

&lt;p&gt;Every Kagi Mail message whose source we read carried two DKIM signatures, one&lt;br&gt;
made with an Ed25519 key and one with an RSA key. In our test Gmail recorded the Ed25519 signature as&lt;br&gt;
&lt;code&gt;dkim=neutral (no key)&lt;/code&gt; and the RSA signature as a pass, and the&lt;br&gt;
message passed DMARC. Outlook.com recorded the Ed25519 signature as ignored&lt;br&gt;
and Proton Mail as a permanent error; Yahoo Mail verified both. One passing&lt;br&gt;
signature whose domain matches the From domain is enough for DMARC.&lt;/p&gt;

&lt;h2&gt;
  
  
  The short version
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;A Kagi Mail custom domain needs an ownership TXT record, an MX record for
&lt;code&gt;mail.kagimail.com&lt;/code&gt;, one SPF record with &lt;code&gt;include:kagimail.com&lt;/code&gt;,
DKIM keys as TXT records, and a DMARC record.&lt;/li&gt;
&lt;li&gt;Copy the selector names and keys from Settings &amp;gt; Domains. Ours carried the
date we added the domain.&lt;/li&gt;
&lt;li&gt;Keep one SPF record, and merge other senders into it.&lt;/li&gt;
&lt;li&gt;The DMARC value Kagi listed is &lt;code&gt;v=DMARC1; p=reject&lt;/code&gt;, with no report address.
A domain that no DMARC policy covers yet is better served by &lt;code&gt;p=none&lt;/code&gt; with a
report address, then quarantine, with reject as a later decision. Kagi’s
screen showed a cross beside our &lt;code&gt;p=none&lt;/code&gt; record.&lt;/li&gt;
&lt;li&gt;Kagi signs with both keys. In our test Gmail, Outlook.com and Proton Mail did
not verify the Ed25519 signature; the RSA one passed at every receiver we
read, and so did DMARC.&lt;/li&gt;
&lt;li&gt;Change MX last. Then read &lt;code&gt;Authentication-Results&lt;/code&gt; on a test message, and
check which folder it reached, before you send real mail.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;This article was created with the help of AI.&lt;/p&gt;

&lt;p&gt;Originally published at &lt;a href="https://dmarcguard.io/blog/kagi-mail-custom-domain-dns/" rel="noopener noreferrer"&gt;dmarcguard.io&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>email</category>
      <category>dns</category>
      <category>security</category>
      <category>sysadmin</category>
    </item>
    <item>
      <title>PCI DSS DMARC Requirement: What Section 5.4.1 Requires (and What It Doesn’t)</title>
      <dc:creator>Meysam</dc:creator>
      <pubDate>Wed, 25 Nov 2026 09:54:53 +0000</pubDate>
      <link>https://dev.to/dmarcguard/pci-dss-dmarc-requirement-what-section-541-requires-and-what-it-doesnt-26ee</link>
      <guid>https://dev.to/dmarcguard/pci-dss-dmarc-requirement-what-section-541-requires-and-what-it-doesnt-26ee</guid>
      <description>&lt;p&gt;The PCI DSS DMARC requirement is the question every IT admin asks before a&lt;br&gt;
payment audit — and the honest answer is more precise than most vendor pages&lt;br&gt;
admit. Most vendor pages round the standard up to “PCI requires DMARC”; the&lt;br&gt;
standard says something narrower, and the difference decides what your assessor&lt;br&gt;
can and cannot demand of you. So does PCI DSS require DMARC? Not by name. In&lt;br&gt;
practice, it is the control your assessor expects you to point to, because it is&lt;br&gt;
the example the standard itself gives.&lt;/p&gt;

&lt;p&gt;This guide is for the IT manager, DevOps lead, or compliance owner staring down a&lt;br&gt;
PCI assessment and trying to separate what the standard says from what vendor&lt;br&gt;
blogs claim it says. It answers three questions in order: what Requirement 5.4.1&lt;br&gt;
says, verbatim; what your Qualified Security Assessor (QSA) will accept as&lt;br&gt;
evidence; and what to do in the next 30 days if the assessment is already on the&lt;br&gt;
calendar. Everything here is quoted from the standard itself — not a paraphrase —&lt;br&gt;
and keeps the example-versus-mandate distinction straight, because that&lt;br&gt;
distinction is exactly what competitor guidance overstates. For the&lt;br&gt;
protocol-by-protocol reference with a DNS record at every step, start with&lt;br&gt;
&lt;a href="https://dmarcguard.io/learn/pci-dss/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=pci-dss" rel="noopener noreferrer"&gt;our PCI DSS protocol reference&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  Does PCI DSS require DMARC? What Requirement 5.4.1 says, verbatim
&lt;/h2&gt;

&lt;p&gt;Not by name. Section 5.4.1 is new in v4.0 and has no equivalent in v3.2.1 — it&lt;br&gt;
is one of the headline PCI DSS 4.0 changes. The §5.4 heading reads:&lt;br&gt;
“Anti-phishing mechanisms protect users against phishing attacks.” The&lt;br&gt;
requirement itself is short and binding:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Processes and automated mechanisms are in place to detect and protect&lt;br&gt;
personnel against phishing attacks.”&lt;/p&gt;

&lt;p&gt;— PCI DSS v4.0.1, Requirement 5.4.1 (Defined Approach)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That is the entire binding text, sourced directly from the&lt;br&gt;
&lt;a href="https://www.pcisecuritystandards.org/document_library/" rel="noopener noreferrer"&gt;PCI DSS v4.0.1 standard in the PCI SSC Document Library&lt;/a&gt;.&lt;br&gt;
Notice what it does &lt;em&gt;not&lt;/em&gt; say: it names no protocol, no vendor, and no policy&lt;br&gt;
level. The anti-phishing mandate is written as an outcome — automated mechanisms&lt;br&gt;
that detect and protect — and the choice of mechanism is left to you.&lt;/p&gt;

&lt;p&gt;DMARC enters only in the Guidance column that accompanies the requirement:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“When developing anti-phishing controls, entities are encouraged to consider a&lt;br&gt;
combination of approaches. For example, using anti-spoofing controls such as&lt;br&gt;
Domain-based Message Authentication, Reporting &amp;amp; Conformance (DMARC), Sender&lt;br&gt;
Policy Framework (SPF), and Domain Keys Identified Mail (DKIM) will help stop&lt;br&gt;
phishers from spoofing the entity’s domain and impersonating personnel.”&lt;/p&gt;

&lt;p&gt;— PCI DSS v4.0.1, Requirement 5.4.1 Guidance&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The timeline is the other half of the answer. Section 5.4.1 was classified as a&lt;br&gt;
best practice until 31 March 2025; the applicability note in the standard reads:&lt;br&gt;
“This requirement is a best practice until 31 March 2025, after which it will be&lt;br&gt;
required and must be fully considered during a PCI DSS assessment.” It was one of&lt;br&gt;
the future-dated requirements introduced in v4.0 that became mandatory on that&lt;br&gt;
date. v4.0.1 did not move it: the PCI SSC’s&lt;br&gt;
&lt;a href="https://blog.pcisecuritystandards.org/just-published-pci-dss-v4-0-1" rel="noopener noreferrer"&gt;v4.0.1 release announcement&lt;/a&gt;&lt;br&gt;
confirms that the limited revision added no requirements and left the 31 March&lt;br&gt;
2025 effective date unchanged.&lt;/p&gt;

&lt;p&gt;Two neighboring controls get conflated with 5.4.1. Requirement 12.6.3.1 is the&lt;br&gt;
security-awareness training that teaches personnel to recognize phishing; PCI&lt;br&gt;
DSS 4.0 requires both, and the standard is explicit that 5.4.1 is not satisfied&lt;br&gt;
by awareness training alone — DMARC and its peers address the technical side,&lt;br&gt;
training the human side. The general “PCI DSS Requirement 5” anti-malware&lt;br&gt;
controls are the other source of confusion; 5.4.1 is the distinct&lt;br&gt;
sub-requirement that governs phishing and email spoofing.&lt;/p&gt;
&lt;h2&gt;
  
  
  What will your QSA accept as DMARC evidence for 5.4.1?
&lt;/h2&gt;

&lt;p&gt;Start with the version, because it decides which text your assessor holds you&lt;br&gt;
to. PCI DSS v4.0.1, published 11 June 2024 by the PCI Security Standards Council&lt;br&gt;
(PCI SSC), is the only active version: v3.2.1 was retired on 31 March 2024,&lt;br&gt;
v4.0 on 31 December 2024, and v4.0.1 itself added and deleted no requirements and&lt;br&gt;
changed no effective dates. Scope follows the cardholder data environment (CDE)&lt;br&gt;
— the systems that store, process, or transmit payment card data, plus anything&lt;br&gt;
connected to them. How the 12 principal requirements and 6 control objectives&lt;br&gt;
fit together, and where Requirements 4 and 5 sit among them, is mapped on the&lt;br&gt;
&lt;a href="https://dmarcguard.io/learn/pci-dss/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=pci-dss#what-is-pci-dss-v40" rel="noopener noreferrer"&gt;learn page’s v4.0 overview&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The standard then gives you two routes to compliance. Under the &lt;strong&gt;defined&lt;br&gt;
approach&lt;/strong&gt; you implement the control as written, and your assessor confirms that&lt;br&gt;
automated anti-phishing mechanisms exist and function. Under the &lt;strong&gt;customized&lt;br&gt;
approach&lt;/strong&gt; you meet the stated security objective with controls of your own&lt;br&gt;
design, backed by a documented targeted risk analysis that your QSA validates.&lt;br&gt;
Either path is valid; neither requires DMARC by name. In practice, the named&lt;br&gt;
example controls are what auditors expect to see.&lt;/p&gt;

&lt;p&gt;How do practitioners read it? Jeremy Simon — a PCI QSA (CISSP, CISA) and PCI&lt;br&gt;
compliance practice lead at HALOCK Security Labs — reproduces the 5.4.1 Guidance&lt;br&gt;
verbatim and cautions that passing an SAQ checkbox is not the same as full DSS&lt;br&gt;
compliance: the DSS itself is what every organization ultimately has to meet.&lt;br&gt;
That is the closest thing to a primary-adjacent assessor voice on the question.&lt;/p&gt;

&lt;p&gt;Vendors who sell DMARC tooling go a step further, and their advice is worth&lt;br&gt;
reading as directional opinion rather than as the standard. Skysnag and&lt;br&gt;
Proofpoint both advise demonstrating an enforcement policy — p=quarantine or&lt;br&gt;
p=reject — on the reasoning that a monitoring-only record does not actively&lt;br&gt;
protect personnel. They are vendors with a commercial interest in DMARC&lt;br&gt;
adoption, so treat “auditors expect enforcement” as an expectation, not a&lt;br&gt;
clause. Notably, even PowerDMARC’s own guidance concedes the legal position:&lt;br&gt;
DMARC “is not mandated or otherwise required by the PCI DSS.” Achieving DMARC&lt;br&gt;
compliance, then, is about meeting the anti-phishing objective with controls you&lt;br&gt;
can evidence — not about satisfying a named mandate.&lt;/p&gt;

&lt;p&gt;This is the correctness differentiator. Several competitor pages frame Section&lt;br&gt;
5.4.1 as “DMARC is required” or “you must move to p=reject.” The primary text&lt;br&gt;
supports neither claim. This guide sticks to what the standard actually says,&lt;br&gt;
and the table below separates the three layers — what is required, what is&lt;br&gt;
expected, and what is overstated:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PCI DSS v4.0.1 and DMARC — what is required, expected, and overstated&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Claim&lt;/th&gt;
&lt;th&gt;What PCI DSS v4.0.1 actually says&lt;/th&gt;
&lt;th&gt;Status&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Automated anti-phishing mechanisms&lt;/td&gt;
&lt;td&gt;Required under Requirement 5.4.1 since 31 March 2025&lt;/td&gt;
&lt;td&gt;Mandatory&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DMARC, SPF, and DKIM specifically&lt;/td&gt;
&lt;td&gt;Named only as examples in the 5.4.1 Guidance column&lt;/td&gt;
&lt;td&gt;Expected, not mandated&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A specific DMARC policy such as p=reject&lt;/td&gt;
&lt;td&gt;No policy level is specified anywhere in the standard&lt;/td&gt;
&lt;td&gt;Recommended by QSAs, not required&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DMARC is mandatory / must be p=reject&lt;/td&gt;
&lt;td&gt;Not supported by the binding requirement text&lt;/td&gt;
&lt;td&gt;Vendor overstatement&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Verdict:&lt;/strong&gt; The requirement is the outcome — automated anti-phishing mechanisms. DMARC is the example assessors most expect you to demonstrate, but a documented customized approach is equally valid. Treat DMARC enforcement as the expected baseline, not a literal PCI mandate.&lt;/p&gt;

&lt;p&gt;The evidence request is consistent from one assessment to the next. Have these&lt;br&gt;
four artifacts ready and the example-versus-mandate debate becomes academic —&lt;br&gt;
you can show the mechanism works:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The SPF, DKIM, and DMARC DNS records for every in-scope domain.&lt;/li&gt;
&lt;li&gt;The enforcement policy in effect, with the dates you moved between policy
levels.&lt;/li&gt;
&lt;li&gt;The aggregate and forensic reporting you collect.&lt;/li&gt;
&lt;li&gt;Proof that someone reviews those reports and acts on them — ongoing
monitoring, not an unread mailbox.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Is email in scope, and what does non-compliance cost?
&lt;/h2&gt;

&lt;p&gt;Email is usually in scope, and the penalty figures you have read are less&lt;br&gt;
precise than they look. Take scope first. Email is the primary delivery vector&lt;br&gt;
for the phishing and business-email-compromise (BEC) attacks Section 5.4.1&lt;br&gt;
targets. Without sender authentication, an attacker can spoof your exact domain&lt;br&gt;
to phish the employees who touch the cardholder data environment — requesting&lt;br&gt;
fraudulent payments, redirecting invoices, or harvesting credentials. The&lt;br&gt;
financial scale is documented: the FBI’s Internet Crime Complaint Center (IC3)&lt;br&gt;
attributed&lt;br&gt;
&lt;a href="https://www.ic3.gov/AnnualReport/Reports/2025_IC3Report.pdf" rel="noopener noreferrer"&gt;$3.05 billion in reported losses to BEC in 2025&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;PCI compliance for email systems is in scope more often than teams expect. PCI&lt;br&gt;
DSS scope extends to any system connected to the CDE, and email infrastructure&lt;br&gt;
usually qualifies because employees with CDE access use email to coordinate&lt;br&gt;
transactions, share reports, and communicate with payment processors. If an&lt;br&gt;
attacker spoofs your domain to phish one of those employees, the mailbox becomes&lt;br&gt;
the entry point to cardholder data — which is precisely the threat 5.4.1 asks you&lt;br&gt;
to detect and protect against.&lt;/p&gt;

&lt;p&gt;The common compliance gap is structural: organizations pass their PCI assessment&lt;br&gt;
on network segmentation, access control, and encryption, yet publish no email&lt;br&gt;
authentication at all. That gap is the norm, not the exception.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Key finding:&lt;/strong&gt; 12.8% of domains enforce DMARC (p=quarantine or reject); 57.9% of domains that publish DMARC remain at p=none, which monitors but never blocks spoofed mail&lt;/p&gt;

&lt;p&gt;Source: &lt;a href="https://dmarcguard.io/research/email-authentication/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=pci-dss" rel="noopener noreferrer"&gt;DMARCguard scan of 5,499,028 domains, February 2026&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In the same February 2026 scan of 5,499,028 domains, only 30.4% published a DMARC&lt;br&gt;
record at all, and only 59.2% published DMARC, SPF or a DKIM key we&lt;br&gt;
could find. For an auditor, a p=none record is the relevant trap: it shows&lt;br&gt;
intent to monitor but does not actively protect personnel, which is the verb the&lt;br&gt;
requirement uses. The majority of domains that have adopted DMARC are sitting in&lt;br&gt;
exactly that incomplete state.&lt;/p&gt;

&lt;p&gt;A word on penalties, because the figures get repeated loosely. PCI DSS is a&lt;br&gt;
contractual obligation, not statutory law, and the PCI SSC levies no fines&lt;br&gt;
itself. The card brands set the rules and fine the acquiring bank, which passes&lt;br&gt;
the cost to the merchant by contract. Advisory and vendor sources widely cite a&lt;br&gt;
range of $5,000 to $100,000 per month for non-compliance, but that figure cannot&lt;br&gt;
be traced to any published Visa or Mastercard operating regulation — the actual&lt;br&gt;
amounts are contractual and non-public, and they vary by acquirer. Just as&lt;br&gt;
important: no fine attaches to Requirement 5.4.1 or to email authentication&lt;br&gt;
specifically. Penalties follow overall non-compliance status or a breach event,&lt;br&gt;
never a single requirement. The often-cited Target, British Airways, TJX, and&lt;br&gt;
Equifax figures are breach settlements and regulatory actions, not PCI 5.4.1&lt;br&gt;
fines. Treat any “fail DMARC and pay $X” claim as inference, not established fact.&lt;/p&gt;
&lt;h2&gt;
  
  
  Which protocols satisfy Section 5.4.1? DMARC, SPF, and DKIM
&lt;/h2&gt;

&lt;p&gt;SPF authorizes the servers that may send for your domain, DKIM cryptographically&lt;br&gt;
signs each message, and DMARC ties both to the visible From domain and sets an&lt;br&gt;
enforcement policy — together they are the example anti-spoofing stack the 5.4.1&lt;br&gt;
Guidance names. SPF (Sender Policy Framework, RFC 7208) publishes in DNS the&lt;br&gt;
hosts authorized to use the domain in the MAIL FROM identity (RFC 7208 §1.1.3),&lt;br&gt;
so an unauthorized sender fails the check — the &lt;em&gt;detect&lt;/em&gt; half of the&lt;br&gt;
requirement. DKIM (DomainKeys Identified Mail, RFC 6376) attaches a signature via&lt;br&gt;
the DKIM-Signature header (RFC 6376 §3.5) that fails verification if the message&lt;br&gt;
was altered in transit or sent by an unauthorized party. DMARC (Domain-based&lt;br&gt;
Message Authentication, Reporting &amp;amp; Conformance, RFC 9989) requires an SPF- or&lt;br&gt;
DKIM-authenticated identifier to &lt;em&gt;align&lt;/em&gt; with the visible From domain (RFC 9989&lt;br&gt;
§4.4), applies a published policy of none, quarantine, or reject (RFC 9989&lt;br&gt;
§4.7), and emits aggregate and forensic reports. Alignment plus enforcement is&lt;br&gt;
what turns “we publish records” into “spoofed mail is rejected.”&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Protocol&lt;/th&gt;
&lt;th&gt;What it authenticates&lt;/th&gt;
&lt;th&gt;Which part of 5.4.1 it helps satisfy&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;SPF&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Sending server IP address&lt;/td&gt;
&lt;td&gt;Detects unauthorized senders&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;DKIM&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Message integrity and signing domain&lt;/td&gt;
&lt;td&gt;Detects forged or tampered messages&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;DMARC&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;From-header alignment + policy enforcement&lt;/td&gt;
&lt;td&gt;Protects personnel by blocking spoofed email&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;How each protocol maps to Section 5.4.1. The mapping shows which control helps satisfy the requirement — the standard names these protocols only as Guidance examples.&lt;/p&gt;

&lt;p&gt;DMARC enforcement at p=quarantine or p=reject demonstrates the strongest posture&lt;br&gt;
for an assessor, because it actively protects personnel. A policy of p=none shows&lt;br&gt;
monitoring intent only — useful while you ramp, but, as the data above shows, the&lt;br&gt;
state most domains never move past. The DNS record for each protocol, with a&lt;br&gt;
worked example, is in the&lt;br&gt;
&lt;a href="https://dmarcguard.io/learn/pci-dss/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=pci-dss#how-dmarc-spf-and-dkim-help-you-meet-section-541" rel="noopener noreferrer"&gt;learn page’s protocol mapping&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  Does PCI DSS regulate email encryption too? Requirement 4.2.2
&lt;/h2&gt;

&lt;p&gt;Yes — and it is the requirement most DMARC guides skip entirely. PCI DSS also&lt;br&gt;
governs cardholder data in transit: Requirement 4.2.2 requires that primary&lt;br&gt;
account numbers (PAN) be secured with strong cryptography whenever they are sent&lt;br&gt;
via end-user messaging technologies like email, which is squarely relevant to&lt;br&gt;
any organization whose mailboxes touch payment data.&lt;/p&gt;

&lt;p&gt;The §4.2 heading reads: “PAN is protected with strong cryptography during&lt;br&gt;
transmission.” The specific messaging clause is 4.2.2:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“PAN is secured with strong cryptography whenever it is sent via end-user&lt;br&gt;
messaging technologies.”&lt;/p&gt;

&lt;p&gt;— PCI DSS v4.0.1, Requirement 4.2.2&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The standard defines end-user messaging technologies as email, instant&lt;br&gt;
messaging, SMS, chat, and the like, and its testing procedure expects PAN to be&lt;br&gt;
rendered unreadable or secured with strong cryptography whenever it is sent that&lt;br&gt;
way. (Requirement 4.2.1 is the adjacent control: it governs strong cryptography&lt;br&gt;
for transmission over open, public networks generally, including a&lt;br&gt;
certificate-validity bullet that was itself a best practice until 31 March 2025.)&lt;/p&gt;

&lt;p&gt;Email transport is where this gets technical. Standard SMTP encryption is&lt;br&gt;
opportunistic by default — if a TLS handshake fails, mail often falls back to&lt;br&gt;
plaintext, and an active attacker can force that downgrade. Three protocols close&lt;br&gt;
the gap:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;MTA-STS&lt;/strong&gt; (RFC 8461) publishes a policy that tells sending servers to require
TLS when delivering to your domain and to refuse cleartext fallback, defeating
downgrade attacks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TLS-RPT&lt;/strong&gt; (RFC 8460) delivers reports when a sending server cannot establish
a TLS connection, giving you the visibility to prove encrypted delivery is
actually working.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;DANE&lt;/strong&gt; (RFC 6698 / 7672) uses DNSSEC to pin mail-server certificates directly
in DNS, removing sole reliance on the public certificate-authority system.&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;PCI DSS requirement&lt;/th&gt;
&lt;th&gt;Focus&lt;/th&gt;
&lt;th&gt;Relevant protocols&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Requirement 5 (Section 5.4.1)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Anti-phishing controls&lt;/td&gt;
&lt;td&gt;DMARC, SPF, DKIM&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Requirement 4 (Section 4.2.2)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Encryption in transit&lt;/td&gt;
&lt;td&gt;MTA-STS, TLS-RPT, DANE&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The two PCI DSS requirements that govern email, and the protocols that help satisfy each.&lt;/p&gt;

&lt;p&gt;If your email systems handle, reference, or transmit cardholder data, deploying&lt;br&gt;
both sets of protocols strengthens your posture across two requirements rather&lt;br&gt;
than one — and it closes a gap most assessments never even probe. Two DNS&lt;br&gt;
records start the Requirement 4 coverage:&lt;/p&gt;

&lt;p&gt;Transport-security TXT records:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;_mta-sts.example.com    IN  TXT  "v=STSv1; id=20260723"
_smtp._tls.example.com  IN  TXT  "v=TLSRPTv1; rua=mailto:tls-reports@example.com"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Host the policy file at&lt;br&gt;
&lt;code&gt;https://mta-sts.example.com/.well-known/mta-sts.txt&lt;/code&gt; with &lt;code&gt;mode: enforce&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  What should you do in the next 30 days?
&lt;/h2&gt;

&lt;p&gt;If the assessment is already on the calendar, aim to walk in with four things:&lt;br&gt;
published SPF, DKIM, and DMARC records on every in-scope domain; a sender&lt;br&gt;
inventory; an enforcement ramp that has demonstrably started; and an evidence&lt;br&gt;
pack. A clean run at p=reject is the strongest position, but a deliberate,&lt;br&gt;
dated ramp is what the “detect and protect” language asks you to show, and each&lt;br&gt;
of the four is reachable inside 30 days from a standing start. The DNS record&lt;br&gt;
for every step below, including the Requirement 4 records, is in the&lt;br&gt;
&lt;a href="https://dmarcguard.io/learn/pci-dss/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=pci-dss#step-by-step-pci-dss-email-authentication-compliance" rel="noopener noreferrer"&gt;learn page’s step-by-step walkthrough&lt;/a&gt;.&lt;br&gt;
Start with the records themselves:&lt;/p&gt;

&lt;p&gt;Day 1: audit existing records:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dig TXT _dmarc.example.com
dig TXT example.com                      &lt;span class="c"&gt;# SPF record&lt;/span&gt;
dig TXT default._domainkey.example.com   &lt;span class="c"&gt;# DKIM record&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;30-day PCI DSS 5.4.1 readiness plan&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Day 1 — establish where every domain stands.&lt;/strong&gt; Run each domain your
organization sends from through the
&lt;a href="https://dmarcguard.io/tools/pci-anti-phishing/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=pci-dss" rel="noopener noreferrer"&gt;PCI 5.4.1 anti-phishing checker&lt;/a&gt;, which grades
the same controls against a QSA-facing rubric, and note missing records,
syntax errors, and SPF records that exceed the 10-DNS-lookup limit.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Days 1–3 — publish DMARC at p=none with reporting wherever it is missing.&lt;/strong&gt;
The &lt;code&gt;rua&lt;/code&gt; tag starts the aggregate-report trail your evidence pack depends
on; a domain with no record on Day 1 has no monitoring history to show on
Day 30.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Days 3–21 — inventory legitimate senders as reports arrive, and fix SPF and
DKIM per source.&lt;/strong&gt; Aggregate reports list every IP and domain sending as you.
Add each legitimate source — mail server, marketing platform, CRM, support
tools, transaction-notification services — to SPF and enable DKIM signing
for it. Two to four weeks of reports give the complete picture, so keep
adding low-volume senders after Day 30. This inventory doubles as evidence
for the PCI third-party-service review.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Days 21–30 — start the enforcement ramp and close the subdomains.&lt;/strong&gt; Once
reports show 95%+ authentication across legitimate sources, move to
&lt;code&gt;p=quarantine&lt;/code&gt;, watch the reports for one to two weeks, then &lt;code&gt;p=reject&lt;/code&gt;; set
&lt;code&gt;sp=reject&lt;/code&gt; explicitly so &lt;code&gt;billing.example.com&lt;/code&gt; and &lt;code&gt;payments.example.com&lt;/code&gt;
are covered. The &lt;a href="https://dmarcguard.io/tools/pnone-escape-plan/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=pci-dss" rel="noopener noreferrer"&gt;p=none Escape Plan&lt;/a&gt; generates
the four-week schedule with the exact record at each step.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Day 30 — assemble the evidence pack.&lt;/strong&gt; DNS-record screenshots for SPF,
DKIM, and DMARC on every in-scope domain; aggregate-report summaries showing
pass rates over time; the sender inventory from step 3; the dated
enforcement timeline from none to quarantine to reject; and proof that
reports are collected, reviewed, and acted on. This is the step most teams
underprepare.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Under DMARCbis (RFC 9989), the &lt;code&gt;pct&lt;/code&gt; tag is removed from the specification and&lt;br&gt;
listed as historic (Appendix A.6), so the staged-percentage rollout older guides&lt;br&gt;
describe no longer applies. Ramp by policy level instead; the testing tag &lt;code&gt;t=y&lt;/code&gt;&lt;br&gt;
tells receivers to apply the policy one level below the one you publish while&lt;br&gt;
you validate.&lt;/p&gt;

&lt;h2&gt;
  
  
  What do assessors flag most often on 5.4.1?
&lt;/h2&gt;

&lt;p&gt;Four findings account for most 5.4.1 write-ups: DMARC left at p=none&lt;br&gt;
indefinitely (monitoring intent is not the “protect” the requirement asks for);&lt;br&gt;
no &lt;code&gt;sp=&lt;/code&gt; subdomain policy, which leaves &lt;code&gt;payments.example.com&lt;/code&gt; spoofable behind&lt;br&gt;
a p=reject organizational domain; SPF broken past the 10-DNS-lookup limit of&lt;br&gt;
RFC 7208 §4.6.4, where a &lt;code&gt;permerror&lt;/code&gt; fails authentication for all your mail; and&lt;br&gt;
the requirement treated as optional because the Guidance says “for example” —&lt;br&gt;
the inverse of the vendor overstatement, and one that will not survive an&lt;br&gt;
assessment. Third-party senders without DKIM signing, reports emitted into an&lt;br&gt;
unread mailbox, and Requirement 4 ignored entirely round out the list. The&lt;br&gt;
30-day plan above prevents all seven; the full list with fixes is in the learn&lt;br&gt;
page’s&lt;br&gt;
&lt;a href="https://dmarcguard.io/learn/pci-dss/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=pci-dss#common-mistakes-that-fail-pci-dss-email-audits" rel="noopener noreferrer"&gt;common audit mistakes&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Frequently asked questions before your PCI assessment
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Does PCI DSS 5.4.1 name DMARC as a required control?
&lt;/h3&gt;

&lt;p&gt;Not specifically. Requirement 5.4.1 mandates automated anti-phishing mechanisms,&lt;br&gt;
and its Guidance column names DMARC, SPF, and DKIM as example anti-spoofing&lt;br&gt;
controls — not required technologies. The mechanisms became mandatory on March&lt;br&gt;
31, 2025, but the standard names no single required protocol, and a customized&lt;br&gt;
approach is permitted.&lt;/p&gt;

&lt;h3&gt;
  
  
  Is DMARC mandatory for PCI DSS 4.0?
&lt;/h3&gt;

&lt;p&gt;Anti-phishing controls became mandatory on March 31, 2025, but PCI DSS names no&lt;br&gt;
single required technology. DMARC, SPF, and DKIM are cited only as examples in&lt;br&gt;
the 5.4.1 Guidance column. Some vendor pages overstate this as DMARC being&lt;br&gt;
required; the primary standard does not.&lt;/p&gt;

&lt;h3&gt;
  
  
  What does Requirement 5.4.1 actually say?
&lt;/h3&gt;

&lt;p&gt;Section 5.4.1 requires processes and automated mechanisms to detect and protect&lt;br&gt;
personnel against phishing attacks. New in v4.0, it has no v3.2.1 equivalent and&lt;br&gt;
is explicitly not satisfied by security-awareness training alone — that is a&lt;br&gt;
separate requirement, 12.6.3.1.&lt;/p&gt;

&lt;h3&gt;
  
  
  When did the PCI DSS anti-phishing requirement take effect?
&lt;/h3&gt;

&lt;p&gt;Section 5.4.1 was a best practice until March 31, 2025, after which it became&lt;br&gt;
required and must be fully considered during every assessment. PCI DSS v4.0.1,&lt;br&gt;
published June 2024, did not change that effective date.&lt;/p&gt;

&lt;h3&gt;
  
  
  Is DMARC alone enough for PCI compliance?
&lt;/h3&gt;

&lt;p&gt;No. The standard expects a combination of approaches — anti-spoofing controls&lt;br&gt;
plus malware and URL protection and awareness training. DMARC is one component of&lt;br&gt;
5.4.1 and does not, by itself, satisfy the requirement or the broader&lt;br&gt;
anti-phishing program.&lt;/p&gt;

&lt;h3&gt;
  
  
  What DMARC policy do I need for PCI?
&lt;/h3&gt;

&lt;p&gt;The standard specifies no policy level. QSAs and vendors recommend an enforcement&lt;br&gt;
policy (p=quarantine or p=reject) over p=none because it actively protects&lt;br&gt;
personnel, but p=reject is not a PCI requirement. Choose enforcement to&lt;br&gt;
demonstrate a stronger posture.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can I send credit card numbers (PAN) by email?
&lt;/h3&gt;

&lt;p&gt;Not unprotected. Under Requirement 4.2.2, PAN sent via end-user messaging must be&lt;br&gt;
rendered unreadable or secured with strong cryptography. The best practice is a&lt;br&gt;
policy banning PAN over email, instant messaging, SMS, and chat entirely.&lt;/p&gt;

&lt;h3&gt;
  
  
  What happens if I don’t comply, and who enforces fines?
&lt;/h3&gt;

&lt;p&gt;PCI DSS is contractual, not statutory. The PCI SSC issues no fines; card brands&lt;br&gt;
penalize your acquiring bank, which bills you. Advisory sources widely cite&lt;br&gt;
$5,000–$100,000 per month, but no primary card-brand document publishes that&lt;br&gt;
range, and no fine attaches to 5.4.1 specifically — amounts are contractual and&lt;br&gt;
non-public.&lt;/p&gt;

&lt;h2&gt;
  
  
  PCI DSS Email Authentication: The Bottom Line
&lt;/h2&gt;

&lt;p&gt;The PCI DSS DMARC requirement is best understood as an outcome, not a checkbox:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Section 5.4.1 mandates automated anti-phishing mechanisms&lt;/strong&gt; — in force for
every assessment since March 31, 2025.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;DMARC, SPF, and DKIM are the named examples&lt;/strong&gt;, living in the Guidance column,
not the binding requirement. No protocol and no policy level is mandated.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enforcement plus documentation is what assessors want&lt;/strong&gt; — p=quarantine or
p=reject, an aggregate-report trail, and a sender inventory.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Requirement 4.2.2 covers PAN over email&lt;/strong&gt; — pair MTA-STS and TLS-RPT with your
anti-phishing stack if mailboxes touch cardholder data.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The same technology-neutral pattern shows up across every modern compliance&lt;br&gt;
regime: a mandate states an outcome, and email authentication is how you meet it.&lt;br&gt;
See the &lt;a href="https://dmarcguard.io/blog/nis2-email-security/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=pci-dss" rel="noopener noreferrer"&gt;NIS2 email-security control map&lt;/a&gt; for the EU&lt;br&gt;
essential-and-important-entity angle,&lt;br&gt;
&lt;a href="https://dmarcguard.io/blog/hipaa-email-authentication/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=pci-dss" rel="noopener noreferrer"&gt;HIPAA email authentication&lt;/a&gt; for the US&lt;br&gt;
healthcare §164.312 mapping, and&lt;br&gt;
&lt;a href="https://dmarcguard.io/blog/dora-email-authentication/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=pci-dss" rel="noopener noreferrer"&gt;DORA email authentication&lt;/a&gt; for the EU&lt;br&gt;
financial sector — one control stack, cited three ways.&lt;/p&gt;




&lt;p&gt;This article was created with the help of AI.&lt;/p&gt;

&lt;p&gt;Originally published at &lt;a href="https://dmarcguard.io/blog/pci-dss/" rel="noopener noreferrer"&gt;dmarcguard.io&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>email</category>
      <category>security</category>
      <category>dns</category>
      <category>devops</category>
    </item>
    <item>
      <title>DMARC rua: Where Aggregate Reports Go, and Why Yours May Not Arrive</title>
      <dc:creator>Meysam</dc:creator>
      <pubDate>Wed, 18 Nov 2026 09:54:07 +0000</pubDate>
      <link>https://dev.to/dmarcguard/dmarc-rua-where-aggregate-reports-go-and-why-yours-may-not-arrive-5418</link>
      <guid>https://dev.to/dmarcguard/dmarc-rua-where-aggregate-reports-go-and-why-yours-may-not-arrive-5418</guid>
      <description>&lt;p&gt;A DMARC record without a &lt;code&gt;rua=&lt;/code&gt; is a policy with no feedback loop: the policy still runs, and it never tells you anything.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;rua&lt;/code&gt; tag is the list of addresses where receiving mail providers send your daily aggregate reports. &lt;code&gt;rua&lt;/code&gt; stands for Reporting URI for Aggregate reports, and its presence is what asks for feedback at all: RFC 9990 §3.4 states that the presence of the &lt;code&gt;rua&lt;/code&gt; tag specifies where to send feedback, and RFC 9989 §4.7 makes the converse normative — if the tag is not provided, Mail Receivers MUST NOT generate aggregate feedback reports for the domain. No &lt;code&gt;rua=&lt;/code&gt;, no reports.&lt;/p&gt;

&lt;p&gt;Two readers land here: one published DMARC months ago, has never seen a report, and cannot tell a healthy silence from a broken one; the other published a &lt;code&gt;rua=&lt;/code&gt; and still gets nothing back.&lt;/p&gt;

&lt;p&gt;Below: what your record is doing now, where &lt;code&gt;rua=&lt;/code&gt; should point, the DNS record a third-party destination needs, and the ranked reasons a published &lt;code&gt;rua=&lt;/code&gt; goes quiet. For &lt;a href="https://dmarcguard.io/learn/dmarc/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=dmarc-rua-collection" rel="noopener noreferrer"&gt;how DMARC itself works&lt;/a&gt;, start there first.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is the DMARC rua tag?
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;rua=&lt;/code&gt; is the DMARC tag that tells receiving mail providers where to email your aggregate reports. It holds a comma-separated list of &lt;code&gt;mailto:&lt;/code&gt; URIs and is defined as a &lt;code&gt;dmarc-urilist&lt;/code&gt; in &lt;a href="https://www.rfc-editor.org/rfc/rfc9989.html" rel="noopener noreferrer"&gt;RFC 9989&lt;/a&gt; §4.8. Receivers discover it when they look up the DMARC record for a message’s From domain (RFC 9990 §3.4).&lt;/p&gt;

&lt;p&gt;RFC 9989 §4.7 permits any valid URI, but a receiver only has to support &lt;code&gt;mailto:&lt;/code&gt; and MUST ignore schemes it does not support — so in practice every working rua URI is a &lt;code&gt;mailto:&lt;/code&gt;. Two separators then do different jobs, and this is the part of the DMARC rua tag that catches people out: &lt;strong&gt;semicolons separate DMARC tags, commas separate addresses inside one tag.&lt;/strong&gt; A minimal record reads &lt;code&gt;v=DMARC1; p=none; rua=mailto:dmarc@example.com&lt;/code&gt;.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tag&lt;/th&gt;
&lt;th&gt;What it asks for&lt;/th&gt;
&lt;th&gt;What arrives&lt;/th&gt;
&lt;th&gt;If absent&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;rua=&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Aggregate feedback (RFC 9990)&lt;/td&gt;
&lt;td&gt;Daily gzipped XML summary&lt;/td&gt;
&lt;td&gt;No aggregate reports are generated&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;ruf=&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Per-message failure reports (RFC 9991)&lt;/td&gt;
&lt;td&gt;Individual failure samples&lt;/td&gt;
&lt;td&gt;No failure reports; most domains set only &lt;code&gt;rua&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;neither&lt;/td&gt;
&lt;td&gt;Nothing&lt;/td&gt;
&lt;td&gt;Nothing&lt;/td&gt;
&lt;td&gt;Policy still applies; you see none of its effect&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;One behaviour almost nobody documents: a valid &lt;code&gt;rua&lt;/code&gt; keeps a partly broken record alive. RFC 9989 §4.10.1 says that if a retrieved record does not contain a valid &lt;code&gt;p&lt;/code&gt; tag but a &lt;code&gt;rua&lt;/code&gt; tag is present with at least one syntactically valid reporting URI, the receiver MUST act as if &lt;code&gt;p=none&lt;/code&gt; was retrieved and continue processing. With neither, it applies no DMARC processing to the message at all. The same rule covers an invalid &lt;code&gt;sp=&lt;/code&gt; or &lt;code&gt;np=&lt;/code&gt; value: with a valid &lt;code&gt;rua=&lt;/code&gt; the receiver acts as if the record said &lt;code&gt;p=none&lt;/code&gt;; without one it skips DMARC.&lt;/p&gt;

&lt;p&gt;The full tag grammar and how to &lt;a href="https://dmarcguard.io/blog/how-to-create-dmarc-record/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=dmarc-rua-collection" rel="noopener noreferrer"&gt;publish a DMARC record for the first time&lt;/a&gt; are covered separately. This page starts after that.&lt;/p&gt;

&lt;h2&gt;
  
  
  Does your DMARC record actually have a rua?
&lt;/h2&gt;

&lt;p&gt;Look at the record itself. Query &lt;code&gt;_dmarc.yourdomain.com&lt;/code&gt; for its TXT record and check whether the string contains &lt;code&gt;rua=mailto:&lt;/code&gt;. If it does not, no receiver has ever generated an aggregate report for your domain, and none ever will while the tag is absent.&lt;/p&gt;

&lt;p&gt;Run &lt;code&gt;dig +short TXT _dmarc.example.com @1.1.1.1&lt;/code&gt;, substituting your own domain. Querying a resolver outside your own network shows you what receivers see rather than a split-horizon answer. There are three outcomes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;No &lt;code&gt;rua=&lt;/code&gt;.&lt;/strong&gt; Nothing is being collected. The policy runs; the feedback loop does not exist.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;rua=&lt;/code&gt; on your own domain.&lt;/strong&gt; Reports should arrive. If they do not, work the diagnostic further down.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;rua=&lt;/code&gt; on someone else’s domain.&lt;/strong&gt; You also need the authorization record two sections below, or conforming receivers drop the URI.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdmarcguard.io%2Fimages%2Fblog%2Fdmarc-rua-collection%2Fdmarc-rua-collection_is-it-collecting_flowchart.svg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdmarcguard.io%2Fimages%2Fblog%2Fdmarc-rua-collection%2Fdmarc-rua-collection_is-it-collecting_flowchart.svg" alt="Flowchart deciding whether a DMARC record collects aggregate reports: no rua tag, rua on the same domain, or rua on an external domain" width="860" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Three outcomes from one TXT lookup. Only the external-destination branch needs a second record.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Key finding:&lt;/strong&gt; 776,918 of 1,670,975 DMARC domains publish a policy with no rua= address — 46.49% ask for no aggregate reports at all&lt;/p&gt;

&lt;p&gt;Source: &lt;a href="https://dmarcguard.io/research/email-authentication/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=dmarc-rua-collection" rel="noopener noreferrer"&gt;DMARCguard analysis of the State of Email Authentication 2026 scan — 5,499,028 Tranco domains, 2026-02-27&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That is a measurement of how the tag is used, not a verdict on those domains. Read it beside the enforcement figures from the same scan: 57.9% of DMARC domains sit at &lt;code&gt;p=none&lt;/code&gt;. The composite picture is a large population that published a policy, left it in monitoring, and is not watching the monitoring.&lt;/p&gt;

&lt;p&gt;Your own record takes seconds to settle — you can &lt;a href="https://dmarcguard.io/tools/dmarc-checker/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=dmarc-rua-collection" rel="noopener noreferrer"&gt;check whether your record publishes a &lt;code&gt;rua=&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where should the rua address point?
&lt;/h2&gt;

&lt;p&gt;Point &lt;code&gt;rua=&lt;/code&gt; at a mailbox or processor that can parse XML unattended: a dedicated address on your own domain, or a report processor. A person’s inbox works mechanically and fails operationally. RFC 9990 §9.2 says outright that the XML reports are not human readable in bulk.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Destination&lt;/th&gt;
&lt;th&gt;What you get&lt;/th&gt;
&lt;th&gt;What it costs&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Dedicated mailbox on your own domain&lt;/td&gt;
&lt;td&gt;Reports arrive with no extra DNS, and you hold the raw data&lt;/td&gt;
&lt;td&gt;You parse gzipped XML yourself (RFC 9990 §9.2)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A report processor on another domain&lt;/td&gt;
&lt;td&gt;Parsed, deduplicated data&lt;/td&gt;
&lt;td&gt;Needs the _report._dmarc authorization record unless the vendor wildcards it&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A personal or shared human mailbox&lt;/td&gt;
&lt;td&gt;Mail you cannot act on&lt;/td&gt;
&lt;td&gt;A gzipped attachment per reporting receiver, every day&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;No rua= at all&lt;/td&gt;
&lt;td&gt;Nothing&lt;/td&gt;
&lt;td&gt;The policy runs with no feedback loop; 46.49% of DMARC domains in the 2026-02-27 scan&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Verdict:&lt;/strong&gt; Point rua= at a destination built to parse XML unattended. Whatever you pick, it must accept a large compressed attachment every day, indefinitely.&lt;/p&gt;

&lt;p&gt;In the same 2026-02-27 scan, 365,257 domains — 40.85% of the 894,057 publishing a &lt;code&gt;rua=&lt;/code&gt; — point it at their own domain or a subdomain of it. Read that as an upper bound rather than a count of do-it-yourself setups: operators are grouped by hostname suffix, so that bucket also holds vendors who ask customers to publish a CNAME under their own domain.&lt;/p&gt;

&lt;p&gt;The human-mailbox case is worth stating concretely, because the mechanics are fine and the outcome is not. One report per reporting provider per day arrives indefinitely, and a domain whose subdomains each generate their own reports multiplies that — on Cisco’s ESA, each subdomain without its own policy produced a separate report email, each counting against a 1,000-per-day cap (operator account, 2021; pre-dates the current specification, so read it as illustration). The end state in the documented thread is not anger. It is an abandoned mailbox and an accepted answer — “You can ignore the email or remove the email from the DMARC record in DNS” — which trades the noise for blindness.&lt;/p&gt;

&lt;p&gt;Before you route reports to a person, look at &lt;a href="https://dmarcguard.io/blog/how-to-read-dmarc-report/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=dmarc-rua-collection" rel="noopener noreferrer"&gt;what reading one actually involves&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sending reports to another domain: the &lt;code&gt;_report._dmarc&lt;/code&gt; record
&lt;/h2&gt;

&lt;p&gt;If your &lt;code&gt;rua=&lt;/code&gt; address is on a different organizational domain than the DMARC record, that destination domain must publish a TXT record granting permission — otherwise conforming receivers ignore the URI. &lt;a href="https://www.rfc-editor.org/rfc/rfc9990.html" rel="noopener noreferrer"&gt;RFC 9990&lt;/a&gt; §4 defines the check: the receiver queries &lt;code&gt;&amp;lt;your-domain&amp;gt;._report._dmarc.&amp;lt;destination-domain&amp;gt;&lt;/code&gt; and requires a record beginning &lt;code&gt;v=DMARC1&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The reason the check exists is spelled out in the same section. Without it, a bad actor could publish a record pointing reports at a victim address, send a large volume of failing mail, and let the world’s receivers flood that address on their behalf.&lt;/p&gt;

&lt;p&gt;What the receiver does is mechanical: take the host from the &lt;code&gt;rua&lt;/code&gt; URI, prepend &lt;code&gt;_report._dmarc&lt;/code&gt;, prepend the domain the policy was retrieved from, query TXT, and require a parseable record whose first tag is &lt;code&gt;v=DMARC1&lt;/code&gt;. Where that fails to confirm authorization, the URI MUST be ignored.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;; Zone file for reports.example.net - the DESTINATION domain.
; Neither record belongs in the policy domain's own zone.

; Named form: authorizes example.com, and only example.com, to have its
; DMARC reports delivered here. This is the exact name RFC 9990 Section 4
; tells the receiver to query.
example.com._report._dmarc.reports.example.net. IN TXT "v=DMARC1"

; Wildcard form: accepts reports for any policy domain. Report processors
; usually publish this one themselves, which is why most people pointing
; rua= at a vendor never create a record at all.
*._report._dmarc.reports.example.net. IN TXT "v=DMARC1"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A destination willing to receive reports for any domain publishes the wildcard form instead. A resolver cannot distinguish a synthesized wildcard answer from an explicit one, so checkers and report generators treat the two identically. Processors usually publish the wildcard themselves, which is why most people pointing &lt;code&gt;rua=&lt;/code&gt; at a vendor never create anything — verify it resolves rather than assuming. &lt;code&gt;dig +short TXT example.com._report._dmarc.reports.vendor.example&lt;/code&gt; should return a record beginning &lt;code&gt;v=DMARC1&lt;/code&gt;. Our ARF checker runs this same lookup for &lt;code&gt;ruf=&lt;/code&gt; destinations.&lt;/p&gt;

&lt;p&gt;Now the trap, because this is where the diagnosis usually goes wrong. &lt;strong&gt;Enforcement of this check is not universal.&lt;/strong&gt; OpenDMARC’s report generator does not perform it: the last documented state is a 2018-03-20 maintainer response on its issue tracker, and no public report of a fix has appeared since. So a partial trickle of reports can coexist with a validator warning that the destination is not authorized, and reading that trickle as proof the setup is correct is the single most common error here. Rspamd is not documented either way — no code path confirms either behaviour, so do not assume it skips the check.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdmarcguard.io%2Fimages%2Fblog%2Fdmarc-rua-collection%2Fdmarc-rua-collection_report-authorization_process.svg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdmarcguard.io%2Fimages%2Fblog%2Fdmarc-rua-collection%2Fdmarc-rua-collection_report-authorization_process.svg" alt="Diagram of the RFC 9990 external destination verification query name built from the policy domain and the report destination host" width="860" height="570"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The query name is assembled, not configured — which is why the record lives in the destination's zone, never yours.&lt;/p&gt;

&lt;h2&gt;
  
  
  Who receives DMARC reports, measured across 5.5M domains?
&lt;/h2&gt;

&lt;p&gt;Across 5,499,028 Tranco domains scanned on 2026-02-27, 894,057 DMARC domains publish a &lt;code&gt;rua=&lt;/code&gt;. The largest single destination is the domain’s own infrastructure, at 40.85%, and no commercial receiver exceeds 7.1%.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Receiver&lt;/th&gt;
&lt;th&gt;Domains&lt;/th&gt;
&lt;th&gt;Share of the 894,057&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Own domain or subdomain&lt;/td&gt;
&lt;td&gt;365,257&lt;/td&gt;
&lt;td&gt;40.85%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cloudflare&lt;/td&gt;
&lt;td&gt;63,482&lt;/td&gt;
&lt;td&gt;7.10%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GoDaddy&lt;/td&gt;
&lt;td&gt;62,943&lt;/td&gt;
&lt;td&gt;7.04%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Valimail&lt;/td&gt;
&lt;td&gt;44,781&lt;/td&gt;
&lt;td&gt;5.01%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Brevo&lt;/td&gt;
&lt;td&gt;39,544&lt;/td&gt;
&lt;td&gt;4.42%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Proofpoint&lt;/td&gt;
&lt;td&gt;31,555&lt;/td&gt;
&lt;td&gt;3.53%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;dmarcian&lt;/td&gt;
&lt;td&gt;23,354&lt;/td&gt;
&lt;td&gt;2.61%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MXToolbox&lt;/td&gt;
&lt;td&gt;19,566&lt;/td&gt;
&lt;td&gt;2.19%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Postmark&lt;/td&gt;
&lt;td&gt;17,396&lt;/td&gt;
&lt;td&gt;1.95%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DMARC Analyzer&lt;/td&gt;
&lt;td&gt;17,370&lt;/td&gt;
&lt;td&gt;1.94%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Free consumer mailboxes&lt;/td&gt;
&lt;td&gt;15,242&lt;/td&gt;
&lt;td&gt;1.70%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;DMARC report destinations by operator — share of the 894,057 domains publishing a rua=, from a 2026-02-27 scan of 5,499,028 Tranco domains&lt;/p&gt;

&lt;p&gt;Four things bound what that table can tell you. It is a single scan taken on 2026-02-27. Tranco is a popularity-ranked sample, so these are shares of 5,499,028 Tranco domains and not of the internet. Operators are grouped by hostname suffix, so a vendor on an unrecognised hostname falls into the long tail and is undercounted, and the own-domain row includes vendors who ask customers to publish a CNAME under their own domain. And the count is per-domain, not per-message: a receiver with few domains may still process far more mail than one with many. A domain listing two operators counts in both rows, so the column does not sum to 100%.&lt;/p&gt;

&lt;p&gt;For completeness: DMARCguard does not appear in the top 40 receivers in this scan.&lt;/p&gt;

&lt;p&gt;The 15,242 domains in the last row route aggregate XML to a free consumer mailbox: the destination decision from the previous section, measured rather than argued. A separate post covers &lt;a href="https://dmarcguard.io/blog/dmarc-aggregate-report/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=dmarc-rua-collection" rel="noopener noreferrer"&gt;what actually arrives at whichever address you choose&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  You published a rua= and nothing arrives
&lt;/h2&gt;

&lt;p&gt;Work these in order. The most commonly reported fixable cause is a missing external-destination authorization record, and its symptom is inconsistent silence rather than total silence, because some report generators skip the check and send anyway.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Read the live record from an external resolver.&lt;/strong&gt; Exactly one &lt;code&gt;v=DMARC1&lt;/code&gt; record, &lt;code&gt;rua=&lt;/code&gt; present, value byte-for-byte as intended. Smart quotes pasted from a document and DNS-panel field wrapping are real causes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check the two-separator rule&lt;/strong&gt; against the valid record and its three broken variants below. The failure is not uniform, so “it parses in one checker” is not dispositive — parse it in two.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Publish &lt;code&gt;_report._dmarc&lt;/code&gt; if the destination is external&lt;/strong&gt;, and do not read a partial trickle as evidence it is unnecessary. No dated public operator account, in any archive searched for this post, shows silence, then a published authorization record, then reports resuming with counts. The mechanism is documented; that before-and-after narrative is not. So use an observable signal: after publishing, watch whether &lt;strong&gt;new reporting organizations&lt;/strong&gt; appear over the next two to three reporting cycles. If they do, the previous setup was hiding a whole class of traffic.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prove the mailbox accepts large compressed attachments.&lt;/strong&gt; Reports are ordinary email carrying a gzip attachment (RFC 9990 §3.5.2). Size the mailbox for a large one, remove &lt;code&gt;.zip&lt;/code&gt;, &lt;code&gt;.gz&lt;/code&gt; and &lt;code&gt;.com&lt;/code&gt; extension filters, and read the &lt;strong&gt;inbound reject logs&lt;/strong&gt;, not the inbox — the step most operators skip. One operator account, whose date could not be verified, traced missing Gmail reports to an Exim filter matching a &lt;code&gt;.com&lt;/code&gt; rule. Malformed declarations happen upstream too: &lt;a href="https://www.mail-archive.com/mailop@mailop.org/msg22653.html" rel="noopener noreferrer"&gt;on 2024-07-25 the mailop list recorded 1&amp;amp;1&lt;/a&gt; sending gzipped data labelled &lt;code&gt;application/zip&lt;/code&gt;, breaking strict parsers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Set coverage expectations per receiver.&lt;/strong&gt; Microsoft 365 generates aggregate reports only when the domain’s MX points directly at Microsoft 365; a gateway in front means zero Microsoft reports, which &lt;a href="https://learn.microsoft.com/en-us/defender-office-365/email-authentication-dmarc-configure" rel="noopener noreferrer"&gt;Microsoft documents as intended behaviour&lt;/a&gt; and which sits alongside the rest of &lt;a href="https://dmarcguard.io/blog/microsoft-dmarc-enforcement/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=dmarc-rua-collection" rel="noopener noreferrer"&gt;Microsoft’s DMARC enforcement rollout&lt;/a&gt;. “Google reports, no Microsoft” is usually this. Coverage is voluntary and partial, so treat a &lt;strong&gt;change&lt;/strong&gt; in the set of reporters as the signal, not the size of the set. A reporter can also run late on its own: during &lt;a href="https://dmarcguard.io/blog/microsoft-outage-ex1550543-email-deferred/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=dmarc-rua-collection" rel="noopener noreferrer"&gt;Microsoft’s November 2026 outage&lt;/a&gt;, its first report of the day reached us hours behind schedule while other reporters’ kept arriving.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check the destination is mail-routable at all.&lt;/strong&gt; A &lt;code&gt;rua&lt;/code&gt; domain with no MX still looks like silence to you — the bounces accumulate in the reporting sender’s queue, not yours. No major receiver documents suppressing a persistently failing destination, and RFC 9990 §3.5 lets a receiver that cannot deliver simply discard the data, so resolve the destination’s MX (or A/AAAA fallback) yourself rather than waiting for a signal.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Step 2 is worth seeing rather than describing:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# VALID - semicolons separate tags, commas separate addresses
v=DMARC1; p=none; rua=mailto:dmarc@example.com,mailto:reports@example.net

# BROKEN 1 - the mailto: scheme is missing on the second address.
# That one destination is not a valid DMARC URI and is dropped. The rest of
# the record still parses, so reports keep arriving from the first address
# and the fault stays invisible.
v=DMARC1; p=none; rua=mailto:dmarc@example.com,reports@example.net

# BROKEN 2 - a comma is used where a semicolon belongs.
# The whole record misparses and ALL reporting stops.
v=DMARC1, p=none, rua=mailto:dmarc@example.com

# BROKEN 3 - a semicolon sits between two addresses inside one rua= tag.
# A tag value cannot contain a semicolon (RFC 9989 Section 4.8 ABNF), so the
# rua value ends at the first address and the second one is never used.
v=DMARC1; p=none; rua=mailto:dmarc@example.com;mailto:reports@example.net
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you generate reports yourself rather than only consuming them, two gotchas are specific to that setup: &lt;strong&gt;your&lt;/strong&gt; OpenDMARC install does not enforce external-destination authorization, and &lt;strong&gt;your&lt;/strong&gt; Rspamd install can generate reports about its own reporting domain unless you exclude that recipient.&lt;/p&gt;

&lt;h2&gt;
  
  
  Frequently Asked Questions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What is the rua tag in DMARC?
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;rua&lt;/code&gt; is the DMARC tag listing where receivers email your daily aggregate reports. It holds comma-separated &lt;code&gt;mailto:&lt;/code&gt; URIs and is defined as a &lt;code&gt;dmarc-urilist&lt;/code&gt; in RFC 9989, Section 4.8. Its presence is what requests feedback at all (RFC 9990, Section 3.4). Without it, no aggregate report is generated.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why am I not getting any DMARC reports?
&lt;/h3&gt;

&lt;p&gt;In order: the record has no &lt;code&gt;rua=&lt;/code&gt;; the value is malformed (a missing &lt;code&gt;mailto:&lt;/code&gt;, or a comma where a semicolon belongs, which breaks the whole record); the destination is on another domain and lacks the &lt;code&gt;_report._dmarc&lt;/code&gt; authorization record; or the mailbox rejects the compressed attachment. Check inbound reject logs, not just the inbox.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can I use my own email address for the DMARC rua tag?
&lt;/h3&gt;

&lt;p&gt;It works mechanically, and it stops working the moment volume matters. Each reporting provider sends a gzipped XML file per day, and RFC 9990, Section 9.2 notes the reports are not human readable in bulk. Use a dedicated mailbox or a report processor: in a 2026-02-27 scan of 5,499,028 Tranco domains, 15,242 route aggregate XML to a free consumer mailbox instead.&lt;/p&gt;

&lt;h3&gt;
  
  
  Do I need a rua tag in my DMARC record?
&lt;/h3&gt;

&lt;p&gt;DMARC enforces without it, but you see nothing: no senders, no alignment failures, no evidence the policy is safe to tighten. In a 2026-02-27 scan of 5,499,028 Tranco domains, 776,918 of 1,670,975 DMARC domains publish none. A valid &lt;code&gt;rua&lt;/code&gt; also keeps a record with a broken &lt;code&gt;p&lt;/code&gt;, &lt;code&gt;sp&lt;/code&gt; or &lt;code&gt;np&lt;/code&gt; tag in play as &lt;code&gt;p=none&lt;/code&gt; (RFC 9989, Section 4.10.1).&lt;/p&gt;

&lt;h3&gt;
  
  
  Can I put multiple addresses in the rua tag?
&lt;/h3&gt;

&lt;p&gt;Yes. Separate addresses inside one &lt;code&gt;rua=&lt;/code&gt; with commas; separate DMARC tags with semicolons. Getting those two backwards is a common cause of total reporting failure. Each address on an external domain needs its own &lt;code&gt;_report._dmarc&lt;/code&gt; authorization, and conforming receivers send only to the authorized ones.&lt;/p&gt;

&lt;h2&gt;
  
  
  What to change today
&lt;/h2&gt;

&lt;p&gt;Three things, in the order they pay off:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Check whether the record has a &lt;code&gt;rua=&lt;/code&gt; at all.&lt;/strong&gt; Nearly half of DMARC domains in the 2026-02-27 scan of 5,499,028 Tranco domains do not, and that is the whole explanation for their silence.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Point it at something that parses XML unattended&lt;/strong&gt;, not at a person who will stop opening the attachments by week three.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;If the destination is external, publish &lt;code&gt;_report._dmarc&lt;/code&gt;&lt;/strong&gt; — then watch for &lt;em&gt;new&lt;/em&gt; reporting organizations rather than trusting the trickle you already have.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A DMARC rua tag is a one-line change that decides whether the rest of your DMARC work is measurable. Once the first report lands, the work shifts from collecting to reading.&lt;/p&gt;




&lt;p&gt;This article was created with the help of AI.&lt;/p&gt;

&lt;p&gt;Originally published at &lt;a href="https://dmarcguard.io/blog/dmarc-rua-collection/" rel="noopener noreferrer"&gt;dmarcguard.io&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>email</category>
      <category>dns</category>
      <category>security</category>
      <category>sysadmin</category>
    </item>
    <item>
      <title>SPF Record Syntax: Mechanisms, Qualifiers, Modifiers, and Macros</title>
      <dc:creator>Meysam</dc:creator>
      <pubDate>Wed, 11 Nov 2026 09:51:02 +0000</pubDate>
      <link>https://dev.to/dmarcguard/spf-record-syntax-mechanisms-qualifiers-modifiers-and-macros-i7k</link>
      <guid>https://dev.to/dmarcguard/spf-record-syntax-mechanisms-qualifiers-modifiers-and-macros-i7k</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Short answer&lt;/p&gt;

&lt;p&gt;SPF record syntax follows one shape: a single DNS TXT record starting with &lt;code&gt;v=spf1&lt;/code&gt;, followed by space-separated terms — mechanisms with optional qualifiers, then modifiers — evaluated left to right until the first match. A complete record such as &lt;code&gt;v=spf1 ip4:192.0.2.0/24 include:_spf.example.com -all&lt;/code&gt; authorizes a /24 network and a third party’s servers, then fails everything else. Every rule governing it lives in RFC 7208. Break a record down term by term with the &lt;a href="https://dmarcguard.io/tools/spf-syntax-inspector/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=spf-record-syntax" rel="noopener noreferrer"&gt;SPF syntax inspector&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;SPF record syntax follows one shape: a single DNS TXT record that starts with &lt;code&gt;v=spf1&lt;/code&gt;, followed by space-separated terms — mechanisms with optional qualifiers, then modifiers — evaluated left to right until the first match. Here is a complete record:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;v=spf1 ip4:192.0.2.0/24 include:_spf.example.com -all
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That one line authorizes a /24 network and a third party’s servers, then fails everything else. Every rule governing it lives in &lt;a href="https://datatracker.ietf.org/doc/html/rfc7208" rel="noopener noreferrer"&gt;RFC 7208&lt;/a&gt;, the SPF standard published in April 2014.&lt;/p&gt;

&lt;p&gt;This page is the full reference: every mechanism, every qualifier, both modifiers, the complete macro table, evaluation order, DNS lookup limits, and record placement rules — each with the RFC 7208 section that defines it. If you want protocol fundamentals first — why SPF exists and how it fits with DKIM and DMARC — start with our &lt;a href="https://dmarcguard.io/learn/spf/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=spf-record-syntax" rel="noopener noreferrer"&gt;SPF guide&lt;/a&gt;. If you build and maintain records, bookmark this.&lt;/p&gt;

&lt;h2&gt;
  
  
  SPF Record Syntax at a Glance
&lt;/h2&gt;

&lt;p&gt;An SPF record is one string of text in the RDATA of a single TXT record, and its grammar has exactly three kinds of parts: a version tag, mechanisms (each with an optional qualifier), and modifiers. The version tag must be exactly &lt;code&gt;v=spf1&lt;/code&gt; — a record starting &lt;code&gt;v=spf10&lt;/code&gt; is discarded, not partially matched (§4.5).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdmarcguard.io%2Fimages%2Fblog%2Fspf-record-syntax%2Fspf-record-syntax_anatomy_diagram.svg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdmarcguard.io%2Fimages%2Fblog%2Fspf-record-syntax%2Fspf-record-syntax_anatomy_diagram.svg" alt="Labeled anatomy of an SPF record: version tag, ip4 mechanism with argument, include mechanism, minus qualifier, and terminal all mechanism" width="800" height="360"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Every SPF record is the same three kinds of parts: a version tag, mechanisms with optional qualifiers, and modifiers.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The grammar in brief, from §3 and §4.6.1:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Part&lt;/th&gt;
&lt;th&gt;Form&lt;/th&gt;
&lt;th&gt;Role&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Version&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;v=spf1&lt;/code&gt;, always first, exact&lt;/td&gt;
&lt;td&gt;Selects the record (§4.5)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Mechanism&lt;/td&gt;
&lt;td&gt;&lt;code&gt;[qualifier]name[:arg][/cidr]&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Tested against the client IP; can match or not match (§4.6.2)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Qualifier&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;+&lt;/code&gt; &lt;code&gt;-&lt;/code&gt; &lt;code&gt;~&lt;/code&gt; &lt;code&gt;?&lt;/code&gt; before mechanism&lt;/td&gt;
&lt;td&gt;The result returned when its mechanism matches (§4.6.2)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Modifier&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;name=value&lt;/code&gt;, at most once each&lt;/td&gt;
&lt;td&gt;Extra information; never matched (§6)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;em&gt;The three kinds of parts in SPF record syntax&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Terms are separated by spaces. Mechanism names are case-insensitive, and terms containing none of &lt;code&gt;=&lt;/code&gt;, &lt;code&gt;:&lt;/code&gt;, or &lt;code&gt;/&lt;/code&gt; are mechanisms (§4.6.1). One syntax error anywhere invalidates the whole record: check_host() — the receiver’s evaluation routine, as the RFC names it — validates SPF syntax first and returns PermError immediately if anything is malformed, without evaluating a single term (§4.6). That is why one stray character can fail authentication for every message a domain sends.&lt;/p&gt;

&lt;h2&gt;
  
  
  SPF Mechanisms
&lt;/h2&gt;

&lt;p&gt;Eight mechanisms exist, and each either matches the connecting IP or does not. RFC 7208 §5 splits them into basic framework mechanisms (&lt;code&gt;all&lt;/code&gt;, &lt;code&gt;include&lt;/code&gt;) and designated-sender mechanisms (&lt;code&gt;a&lt;/code&gt;, &lt;code&gt;mx&lt;/code&gt;, &lt;code&gt;ptr&lt;/code&gt;, &lt;code&gt;ip4&lt;/code&gt;, &lt;code&gt;ip6&lt;/code&gt;, &lt;code&gt;exists&lt;/code&gt;). Before the full table: most real-world records use only &lt;code&gt;include&lt;/code&gt;, &lt;code&gt;ip4&lt;/code&gt;, &lt;code&gt;ip6&lt;/code&gt;, and &lt;code&gt;all&lt;/code&gt; — the rest of this reference exists so you can read other people’s records, not because your own needs them.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Mechanism&lt;/th&gt;
&lt;th&gt;Syntax&lt;/th&gt;
&lt;th&gt;Matches when…&lt;/th&gt;
&lt;th&gt;Counts toward 10-lookup limit?&lt;/th&gt;
&lt;th&gt;RFC §&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;all&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;all&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Always&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;§5.1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;include&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;include:domain&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The referenced record returns Pass&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;§5.2&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;a&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;a[:domain][/cidr]&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Client IP is among the domain’s A/AAAA addresses&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;§5.3&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;mx&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;mx[:domain][/cidr]&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Client IP is an address of one of the domain’s MX hosts&lt;/td&gt;
&lt;td&gt;Yes (plus per-MX address caps)&lt;/td&gt;
&lt;td&gt;§5.4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;ptr&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;ptr[:domain]&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Reverse DNS validates into the target domain&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;§5.5&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;ip4&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;ip4:network[/cidr]&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Client IP is inside the IPv4 network&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;§5.6&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;ip6&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;ip6:network[/cidr]&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Client IP is inside the IPv6 network&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;§5.6&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;exists&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;exists:domain&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The constructed domain has any A record&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;§5.7&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;em&gt;All eight SPF mechanisms with syntax, match condition, and DNS lookup cost&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;You can parse any published record term-by-term — with each mechanism’s cost and RFC cite attached — using the &lt;a href="https://dmarcguard.io/tools/spf-syntax-inspector/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=spf-record-syntax" rel="noopener noreferrer"&gt;SPF syntax inspector&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;all&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;all&lt;/code&gt; always matches, which is why it belongs at the end as the explicit default (§5.1). Everything after it is dead text: “Mechanisms listed after &lt;code&gt;all&lt;/code&gt; MUST be ignored,” and any &lt;code&gt;redirect=&lt;/code&gt; modifier is ignored whenever &lt;code&gt;all&lt;/code&gt; appears anywhere in the record (§5.1). A record without a trailing &lt;code&gt;all&lt;/code&gt; or &lt;code&gt;redirect=&lt;/code&gt; silently defaults to Neutral (§4.7).&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;include&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;include:domain&lt;/code&gt; recursively evaluates the referenced domain’s SPF record and matches only when that evaluation returns Pass (§5.2). It is not a splice. The RFC itself concedes the name was “poorly chosen”: a &lt;code&gt;-all&lt;/code&gt; inside an included record does &lt;strong&gt;not&lt;/strong&gt; fail your outer record — a Fail, Softfail, or Neutral inside simply means “no match here, keep going” (§5.2). Better mental model: &lt;code&gt;if-match&lt;/code&gt;. One consequence worth knowing: if the included domain publishes no SPF record at all, &lt;code&gt;include&lt;/code&gt; returns PermError (§5.2).&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;a&lt;/code&gt; and &lt;code&gt;mx&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;a&lt;/code&gt; matches when the client IP is one of the target domain’s A or AAAA addresses; &lt;code&gt;mx&lt;/code&gt; matches when it is an address of one of the domain’s MX hosts (§5.3, §5.4). Both default to the current domain when no argument is given, and both accept dual CIDR suffixes — &lt;code&gt;a/24&lt;/code&gt; compares only the top 24 bits, and &lt;code&gt;a:example.com/24//64&lt;/code&gt; sets IPv4 and IPv6 prefixes separately (§5.3). Note the cost asymmetry: &lt;code&gt;mx&lt;/code&gt; is one term against the 10-lookup limit, but evaluating it triggers one MX query plus an address query per MX host, capped at 10 address records before PermError (§4.6.4).&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;ip4&lt;/code&gt; and &lt;code&gt;ip6&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;ip4:&lt;/code&gt; and &lt;code&gt;ip6:&lt;/code&gt; test whether the client IP falls inside a literal network, using a colon — &lt;code&gt;ip4:192.0.2.0/24&lt;/code&gt;, never &lt;code&gt;ip4=&lt;/code&gt; (§5.6). Omitted CIDR lengths default to &lt;code&gt;/32&lt;/code&gt; and &lt;code&gt;/128&lt;/code&gt;, i.e., exact-address match, and truncated addresses like &lt;code&gt;192.0.2&lt;/code&gt; are not permitted (§5.6). These are the only designated-sender mechanisms with zero DNS cost, which makes them the cheapest terms in any record.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;exists&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;exists:domain&lt;/code&gt; constructs a domain name, queries it for an A record, and matches if any A record comes back — regardless of its value, and always an A query even on IPv6 connections (§5.7). One lookup, arbitrary logic. Combined with macros (§7), it powers dynamic authorization: publish per-IP hostnames in a zone you control, and the record authorizes exactly those IPs without ever listing them. This is the pattern behind Salesforce’s current record, shown in the examples below.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;ptr&lt;/code&gt; (do not use)
&lt;/h3&gt;

&lt;p&gt;RFC 7208’s own heading for §5.5 is literally &lt;code&gt;"ptr" (do not use)&lt;/code&gt;: the mechanism “SHOULD NOT be published” because it is slow, unreliable under DNS errors, and burdens the &lt;code&gt;.arpa&lt;/code&gt; name servers. Receivers must still support it, but you should never publish it.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Key finding:&lt;/strong&gt; 41,728 domains — 1.4% of SPF-enabled domains — still publish the deprecated ptr mechanism (Source: DMARCguard SPF Supply Chain study — our scan of 5,499,028 Tranco domains, March 15, 2026)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  SPF Qualifiers: +, -, ~, ?
&lt;/h2&gt;

&lt;p&gt;A qualifier is a single prefix character that sets the result returned when its mechanism matches — and when you omit it, the default is &lt;code&gt;+&lt;/code&gt; (§4.6.2). &lt;code&gt;mx&lt;/code&gt; and &lt;code&gt;+mx&lt;/code&gt; are the same term.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Qualifier&lt;/th&gt;
&lt;th&gt;Result&lt;/th&gt;
&lt;th&gt;Meaning (§2.6)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;+&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Pass&lt;/td&gt;
&lt;td&gt;The client is authorized (default when omitted)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;-&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Fail&lt;/td&gt;
&lt;td&gt;The client is explicitly not authorized&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;~&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Softfail&lt;/td&gt;
&lt;td&gt;Probably not authorized; the domain isn’t willing to state a hard Fail&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;?&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Neutral&lt;/td&gt;
&lt;td&gt;The domain asserts nothing about the client&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;em&gt;The four SPF qualifiers and their check_host() results&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;In practice the choice comes down to the final term: &lt;code&gt;-all&lt;/code&gt; versus &lt;code&gt;~all&lt;/code&gt;. Receivers treat them differently, and mail flows through forwarders complicate the picture — we cover the trade-off in depth in &lt;a href="https://dmarcguard.io/blog/spf-softfail-vs-hardfail/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=spf-record-syntax" rel="noopener noreferrer"&gt;softfail vs hardfail&lt;/a&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The two largest mailbox providers disagree on the qualifier&lt;/p&gt;

&lt;p&gt;Google’s setup doc tells single-provider domains to publish &lt;code&gt;v=spf1 include:_spf.google.com ~all&lt;/code&gt; (softfail), while Microsoft recommends &lt;code&gt;-all&lt;/code&gt; “because we also recommend DKIM and DMARC for the domain.” (Google, &lt;a href="https://knowledge.workspace.google.com/admin/security/set-up-spf" rel="noopener noreferrer"&gt;Set up SPF&lt;/a&gt;; Microsoft, &lt;a href="https://learn.microsoft.com/en-us/defender-office-365/email-authentication-spf-configure" rel="noopener noreferrer"&gt;Set up SPF for Microsoft 365&lt;/a&gt;)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;On a domain that sends mail, &lt;code&gt;~all&lt;/code&gt; alongside DKIM and DMARC enforcement is the usual choice; publish &lt;code&gt;-all&lt;/code&gt; on parked and non-sending domains. The &lt;a href="https://dmarcguard.io/blog/spf-softfail-vs-hardfail/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=spf-record-syntax" rel="noopener noreferrer"&gt;softfail vs hardfail&lt;/a&gt; post walks through the trade-off.&lt;/p&gt;

&lt;h2&gt;
  
  
  SPF Modifiers: redirect and exp
&lt;/h2&gt;

&lt;p&gt;Modifiers are &lt;code&gt;name=value&lt;/code&gt; pairs — always an equals sign, never a colon — that provide information rather than being matched (§6). RFC 7208 defines two, each allowed at most once; a duplicated &lt;code&gt;redirect=&lt;/code&gt; or &lt;code&gt;exp=&lt;/code&gt; is a PermError, while unrecognized modifiers are ignored no matter how often they appear (§6).&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;redirect=&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;redirect=domain&lt;/code&gt; hands the entire evaluation to another domain’s record — but only after every mechanism has failed to match (§6.1). The other record’s result becomes your result, with one sharpening: where a missing record would normally give None, a &lt;code&gt;redirect=&lt;/code&gt; to a domain with no SPF record gives PermError (§6.1). Two rules people miss: &lt;code&gt;redirect=&lt;/code&gt; counts as one DNS lookup (§4.6.4), and it “MUST be ignored” whenever an &lt;code&gt;all&lt;/code&gt; mechanism appears anywhere in the record (§6.1).&lt;/p&gt;

&lt;p&gt;How it differs from &lt;code&gt;include&lt;/code&gt;:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Behavior&lt;/th&gt;
&lt;th&gt;
&lt;code&gt;include:&lt;/code&gt; (§5.2)&lt;/th&gt;
&lt;th&gt;
&lt;code&gt;redirect=&lt;/code&gt; (§6.1)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Matches on&lt;/td&gt;
&lt;td&gt;Pass only; otherwise evaluation continues&lt;/td&gt;
&lt;td&gt;Not a mechanism; applies after all misses&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Effect of referenced result&lt;/td&gt;
&lt;td&gt;Only Pass propagates as a match&lt;/td&gt;
&lt;td&gt;Result replaces yours entirely&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;With &lt;code&gt;all&lt;/code&gt; in the record&lt;/td&gt;
&lt;td&gt;Unaffected&lt;/td&gt;
&lt;td&gt;Ignored&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Referenced record missing&lt;/td&gt;
&lt;td&gt;PermError&lt;/td&gt;
&lt;td&gt;PermError&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Intended use&lt;/td&gt;
&lt;td&gt;Crossing administrative boundaries&lt;/td&gt;
&lt;td&gt;Sharing one policy across your own domains&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;em&gt;include: versus redirect= behavior side by side&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;exp=&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;exp=domain&lt;/code&gt; names a TXT record whose macro-expanded string is returned as the explanation when a message Fails (§6.2). It is the only term in the language that never counts toward the lookup limit — §4.6.4 exempts &lt;code&gt;exp&lt;/code&gt; explicitly, because its lookup happens after evaluation, and only on Fail.&lt;/p&gt;

&lt;h2&gt;
  
  
  SPF Macros Reference
&lt;/h2&gt;

&lt;p&gt;Macros are &lt;code&gt;%{...}&lt;/code&gt; sequences expanded at evaluation time from properties of the message — and they are the least-covered corner of SPF record syntax despite being fully specified in RFC 7208 §7. The ABNF defines exactly eleven macro letters: &lt;code&gt;s&lt;/code&gt;, &lt;code&gt;l&lt;/code&gt;, &lt;code&gt;o&lt;/code&gt;, &lt;code&gt;d&lt;/code&gt;, &lt;code&gt;i&lt;/code&gt;, &lt;code&gt;p&lt;/code&gt;, &lt;code&gt;h&lt;/code&gt;, &lt;code&gt;c&lt;/code&gt;, &lt;code&gt;r&lt;/code&gt;, &lt;code&gt;t&lt;/code&gt;, &lt;code&gt;v&lt;/code&gt; (§7.1).&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Macro&lt;/th&gt;
&lt;th&gt;Expands to (§7.2)&lt;/th&gt;
&lt;th&gt;Notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;%{s}&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The full sender, e.g. &lt;code&gt;user@example.com&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;%{l}&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Local-part of the sender (&lt;code&gt;user&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;Limits caching (§7.3)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;%{o}&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Domain of the sender&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;%{d}&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The domain being evaluated&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;%{i}&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The connecting client IP&lt;/td&gt;
&lt;td&gt;Dotted-quad IPv4 / dot-separated nibbles IPv6 (§7.3)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;%{p}&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Validated reverse-DNS name of the IP&lt;/td&gt;
&lt;td&gt;”do not use” (§7.2, §5.5)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;%{v}&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;in-addr&lt;/code&gt; for IPv4, &lt;code&gt;ip6&lt;/code&gt; for IPv6&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;%{h}&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;HELO/EHLO domain&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;%{c}&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Client IP, human-readable&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;exp&lt;/code&gt; text only (§7.2)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;%{r}&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Domain of the host performing the check&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;exp&lt;/code&gt; text only (§7.2)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;%{t}&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Current timestamp (seconds since epoch)&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;exp&lt;/code&gt; text only (§7.2)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;em&gt;All eleven SPF macro letters and their expansions (RFC 7208 §7.2)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Three literal escapes complete the set: &lt;code&gt;%%&lt;/code&gt; is a percent sign, &lt;code&gt;%_&lt;/code&gt; a space, &lt;code&gt;%-&lt;/code&gt; a URL-encoded space (§7.1).&lt;/p&gt;

&lt;p&gt;Transformers modify the expansion inside the braces (§7.3). A digit keeps only that many right-hand parts: &lt;code&gt;%{d2}&lt;/code&gt; on &lt;code&gt;email.example.com&lt;/code&gt; gives &lt;code&gt;example.com&lt;/code&gt;. The letter &lt;code&gt;r&lt;/code&gt; reverses the parts on dots: with client IP 192.0.2.1, &lt;code&gt;%{i}&lt;/code&gt; is &lt;code&gt;192.0.2.1&lt;/code&gt; and &lt;code&gt;%{ir}&lt;/code&gt; is &lt;code&gt;1.2.0.192&lt;/code&gt;. Custom delimiters re-split on other characters — &lt;code&gt;%{l-}&lt;/code&gt; splits the local-part on hyphens — and parts are always rejoined with dots.&lt;/p&gt;

&lt;p&gt;The RFC’s own worked example in §7.4 ties it together. With client IP 192.0.2.3 and domain &lt;code&gt;email.example.com&lt;/code&gt;:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Macro expansion — RFC 7208 §7.4 worked example&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;%{ir}.%{v}._spf.%{d2}
→ 3.2.0.192.in-addr._spf.example.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Pair that with &lt;code&gt;exists:&lt;/code&gt; and you get per-IP authorization in a single lookup — the §5.7 example &lt;code&gt;v=spf1 exists:%{ir}.%{l1r+-}._spf.%{d} -all&lt;/code&gt; makes decisions “at the level of the user and client IP address.” So what does &lt;code&gt;%{i}&lt;/code&gt; mean in an SPF record? It is the connecting client’s IP address — dotted-quad for IPv4, dot-separated nibble format for IPv6 — and it is the macro that makes dynamic gateway records work (§7.2). You can expand any macro against a live IP with the &lt;a href="https://dmarcguard.io/tools/spf-macro-debugger/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=spf-record-syntax" rel="noopener noreferrer"&gt;SPF macro debugger&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;One caution from the RFC itself: records using &lt;code&gt;s&lt;/code&gt;, &lt;code&gt;l&lt;/code&gt;, &lt;code&gt;o&lt;/code&gt;, or &lt;code&gt;h&lt;/code&gt; macros defeat result caching, so §7.3 advises sending domains to avoid them with mechanism directives. Before publishing any macro, expand it against a real client IP in the &lt;a href="https://dmarcguard.io/tools/spf-macro-debugger/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=spf-record-syntax" rel="noopener noreferrer"&gt;SPF macro debugger&lt;/a&gt; and check the constructed name resolves the way you expect.&lt;/p&gt;

&lt;h2&gt;
  
  
  How a Receiver Evaluates Your Record
&lt;/h2&gt;

&lt;p&gt;Evaluation is first-match-wins: mechanisms are considered left to right, the first one that matches ends processing, and its qualifier becomes the result (§4.6.2). Order is not stylistic — it is the semantics.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdmarcguard.io%2Fimages%2Fblog%2Fspf-record-syntax%2Fspf-record-syntax_evaluation-order_flowchart.svg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdmarcguard.io%2Fimages%2Fblog%2Fspf-record-syntax%2Fspf-record-syntax_evaluation-order_flowchart.svg" alt="First-match-wins evaluation of the record v=spf1 ip4:192.0.2.0/24 -a mx ~all for client IP 198.51.100.7: ip4 and -a do not match, mx matches and evaluation stops with result Pass" width="800" height="380"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;First-match-wins evaluation of an SPF record, step by step. The ~all is never reached.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Trace client IP 198.51.100.7 through this record:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;First-match-wins evaluation trace&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;v=spf1 ip4:192.0.2.0/24 -a mx ~all

1. ip4:192.0.2.0/24  → 198.51.100.7 not in range          → no match, continue
2. -a                → IP not among the domain's A records → no match, continue
3. mx                → IP matches an MX host's address     → MATCH — stop here
Result: Pass (the matching mechanism's implicit "+")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;~all&lt;/code&gt; is never reached. Now invert the case: if the IP &lt;strong&gt;had&lt;/strong&gt; matched step 2, the result would be Fail — and no later mechanism could rescue it. A &lt;code&gt;-&lt;/code&gt; qualifier early in the record is final for any IP it matches, no matter what an &lt;code&gt;include&lt;/code&gt; further right would have said. This also answers the ordering question directly: yes, mechanism order matters, because evaluation stops at the first match (§4.6.2).&lt;/p&gt;

&lt;p&gt;If nothing matches and there is no &lt;code&gt;redirect=&lt;/code&gt;, the default result is Neutral, “just as if &lt;code&gt;?all&lt;/code&gt; were specified as the last directive” (§4.7). The RFC recommends terminating explicitly with &lt;code&gt;all&lt;/code&gt; or &lt;code&gt;redirect=&lt;/code&gt; anyway — implicit defaults make debugging harder.&lt;/p&gt;

&lt;h2&gt;
  
  
  DNS Lookup Limits: What Counts and What Doesn’t
&lt;/h2&gt;

&lt;p&gt;The rule, verbatim from §4.6.4: “SPF implementations MUST limit the total number of those terms to 10 during SPF evaluation … If this limit is exceeded, the implementation MUST return ‘permerror’.” Which terms count is fully enumerated:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Term&lt;/th&gt;
&lt;th&gt;Counts toward the 10?&lt;/th&gt;
&lt;th&gt;Extra caps (§4.6.4)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;include&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Nested lookups inside it also count&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;a&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;mx&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;≤10 address (A/AAAA) queries per MX evaluation, else PermError&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;ptr&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;≤10 address queries per PTR evaluation; excess records ignored&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;exists&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;redirect&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;ip4&lt;/code&gt;, &lt;code&gt;ip6&lt;/code&gt;, &lt;code&gt;all&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Never query DNS&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;exp&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Looked up later, only on Fail — explicitly exempt&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;em&gt;Which SPF terms count toward the 10-DNS-lookup limit (RFC 7208 §4.6.4)&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Key finding:&lt;/strong&gt; 148,655 of 3,077,219 SPF-enabled domains — 4.8% — exceed the 10-lookup limit and risk PermError on every message they send (Source: DMARCguard SPF Supply Chain study — our scan of 5,499,028 Tranco domains, March 15, 2026)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That table is the whole of what this reference covers on limits. The second, separate cap on void lookups (§4.6.4), how to count a real record’s include chain, and the step-by-step reduction path when you are over budget all live in &lt;a href="https://dmarcguard.io/blog/spf-too-many-dns-lookups/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=spf-record-syntax" rel="noopener noreferrer"&gt;fix SPF too many DNS lookups&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Record Placement Rules: One Record, TXT Only, 255-Byte Strings
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Exactly one SPF record per name
&lt;/h3&gt;

&lt;p&gt;A domain name “MUST NOT have multiple records that would cause an authorization check to select more than one record” (§3.2) — and the consequence is explicit, not vague: when record selection finds more than one &lt;code&gt;v=spf1&lt;/code&gt; record, check_host() “produces the ‘permerror’ result” (§4.5). Two SPF records don’t merge, don’t race, and don’t half-work. They fail authentication outright. If you have two, merge the mechanisms into one record.&lt;/p&gt;

&lt;h3&gt;
  
  
  TXT type only
&lt;/h3&gt;

&lt;p&gt;“SPF records MUST be published as a DNS TXT (type 16) Resource Record (RR) only” (§3.1). The dedicated SPF record type (type 99) from SPF’s experimental phase was dropped by the SPFbis working group, which concluded the dual-record-type model “was fundamentally flawed” (§3.1).&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Key finding:&lt;/strong&gt; 107,646 domains still publish the deprecated type-99 SPF record (Source: Czybik, Horlboge &amp;amp; Rieck, "Lazy Gatekeepers: A Large-Scale Study on SPF Configuration in the Wild," ACM IMC 2023)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  The 255-byte limit is per string, not per record
&lt;/h3&gt;

&lt;p&gt;This is the rule the SERP most consistently gets wrong. The 255-octet maximum applies to a single &lt;em&gt;character-string&lt;/em&gt; inside a TXT record — not to the record. A TXT record can hold multiple quoted strings, and §3.3 is unambiguous: “If a published record contains multiple character-strings, then the record MUST be treated as if those strings are concatenated together without adding spaces.” So this:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;One TXT record split across two quoted strings (§3.3)&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;example.com. IN TXT "v=spf1 ip4:192.0.2.0/24 include:_spf.exam" "ple.com -all"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;evaluates as &lt;code&gt;v=spf1 ip4:192.0.2.0/24 include:_spf.example.com -all&lt;/code&gt; — note the split lands mid-token and concatenation heals it, because no space is inserted. That is the correct way to publish a record longer than 255 characters. The practical ceiling is elsewhere: §3.4 recommends keeping the whole DNS answer small enough to fit a 512-octet UDP packet (roughly 450 octets of name-plus-records), since oversized answers can be silently dropped by middleboxes that mishandle DNS over TCP.&lt;/p&gt;

&lt;h2&gt;
  
  
  SPF Record Examples
&lt;/h2&gt;

&lt;p&gt;Four annotated records, from minimal to macro-based. Lookup counts come from walking each chain with &lt;code&gt;dig +short TXT&lt;/code&gt; — provider records change (Google flattened &lt;code&gt;_spf.google.com&lt;/code&gt; from 4 lookups to 1 in December 2025), so always count again rather than trust a blog’s cached number.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Single provider (Google’s own published string — &lt;a href="https://knowledge.workspace.google.com/admin/security/set-up-spf" rel="noopener noreferrer"&gt;Set up SPF&lt;/a&gt;):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;v=spf1 include:_spf.google.com ~all
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Reads as: authorize Google’s servers; softfail everything else. Cost: 1 lookup — &lt;code&gt;_spf.google.com&lt;/code&gt; now resolves to a flat &lt;code&gt;ip4&lt;/code&gt;/&lt;code&gt;ip6&lt;/code&gt; list. The &lt;a href="https://dmarcguard.io/blog/google-workspace-spf-record/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=spf-record-syntax" rel="noopener noreferrer"&gt;Google Workspace SPF record guide&lt;/a&gt; covers that include’s full expansion, merged records for third-party senders, and the &lt;code&gt;~all&lt;/code&gt; vs &lt;code&gt;-all&lt;/code&gt; question.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Provider plus your own mail server:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;v=spf1 ip4:192.0.2.10 mx include:_spf.google.com -all
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Reads as: authorize one fixed IP, your MX hosts, and Google; fail everything else. Cost: 2 lookups (&lt;code&gt;mx&lt;/code&gt;, &lt;code&gt;include&lt;/code&gt; — the &lt;code&gt;ip4&lt;/code&gt; is free).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Multi-SaaS — Google plus Microsoft 365 (a combination Google’s doc publishes verbatim):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;v=spf1 include:_spf.google.com include:spf.protection.outlook.com ~all
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Reads as: authorize both providers; softfail the rest. Cost: 2 lookups — both includes currently resolve to flat address lists.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Macro-based dynamic authorization (Salesforce’s live record for &lt;code&gt;_spf.salesforce.com&lt;/code&gt;):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;v=spf1 exists:%{i}._spf.mta.salesforce.com -all
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Reads as: for each connection, ask whether &lt;code&gt;&amp;lt;client-ip&amp;gt;._spf.mta.salesforce.com&lt;/code&gt; has an A record; pass if yes, fail otherwise. One &lt;code&gt;exists&lt;/code&gt; lookup authorizes an entire fleet without listing a single address — the §5.7 pattern running in production.&lt;/p&gt;

&lt;p&gt;Want to assemble your own? The &lt;a href="https://dmarcguard.io/tools/spf-generator/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=spf-record-syntax" rel="noopener noreferrer"&gt;SPF generator&lt;/a&gt; builds a record from your providers, and the &lt;a href="https://dmarcguard.io/tools/spf-checker/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=spf-record-syntax" rel="noopener noreferrer"&gt;SPF checker&lt;/a&gt; validates the result against every rule on this page.&lt;/p&gt;

&lt;h2&gt;
  
  
  Common SPF Syntax Mistakes
&lt;/h2&gt;

&lt;p&gt;Genuine syntax errors are rarer than vendor marketing implies — and the honest numbers are worth stating. The largest peer-reviewed study of SPF configuration found that only 2.9% of 7,251,736 SPF-enabled domains had any error at all, and true syntax mistakes were 18.15% of those errors — roughly 0.5% of all SPF-enabled domains (Czybik et al., ACM IMC 2023, &lt;a href="https://arxiv.org/abs/2502.08240" rel="noopener noreferrer"&gt;arxiv.org/abs/2502.08240&lt;/a&gt;). Keep the categories separate: syntax errors, lookup-limit PermErrors, and permissive policy choices are three different problems.&lt;/p&gt;

&lt;p&gt;The mistakes that do occur are consistent. Each row below is an observed error class with its share of syntax errors where the IMC 2023 study measured it:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Mistake&lt;/th&gt;
&lt;th&gt;Wrong&lt;/th&gt;
&lt;th&gt;Right&lt;/th&gt;
&lt;th&gt;Rule&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;ipv4&lt;/code&gt; instead of &lt;code&gt;ip4&lt;/code&gt; (11.0% of syntax errors, IMC 2023)&lt;/td&gt;
&lt;td&gt;&lt;code&gt;ipv4:192.0.2.0/24&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;ip4:192.0.2.0/24&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;§5.6 defines &lt;code&gt;ip4&lt;/code&gt;/&lt;code&gt;ip6&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Space after the colon (16.6%, IMC 2023)&lt;/td&gt;
&lt;td&gt;&lt;code&gt;include: example.com&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;include:example.com&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;§4.6.1 ABNF permits none&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;=&lt;/code&gt; where &lt;code&gt;:&lt;/code&gt; belongs (Microsoft-documented common error)&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;ip4=192.0.2.0&lt;/code&gt; / &lt;code&gt;include=example.com&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;ip4:192.0.2.0&lt;/code&gt; / &lt;code&gt;include:example.com&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Mechanisms take &lt;code&gt;:&lt;/code&gt;; only modifiers take &lt;code&gt;=&lt;/code&gt; (§4.6.1)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;More than one &lt;code&gt;v=spf1&lt;/code&gt; record (15.3%, IMC 2023)&lt;/td&gt;
&lt;td&gt;Two TXT records&lt;/td&gt;
&lt;td&gt;One merged record&lt;/td&gt;
&lt;td&gt;§3.2 / §4.5 → PermError&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Terms after &lt;code&gt;all&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;&lt;code&gt;v=spf1 -all include:...&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;v=spf1 include:... -all&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;§5.1 — silently ignored&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SPF concatenated with a verification string (7.0%, IMC 2023)&lt;/td&gt;
&lt;td&gt;&lt;code&gt;v=spf1 ...google-site-verification=...&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Separate TXT records&lt;/td&gt;
&lt;td&gt;§4.5 selection breaks&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;em&gt;Observed SPF syntax mistakes: wrong form, right form, and the governing rule&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;=&lt;/code&gt;-for-&lt;code&gt;:&lt;/code&gt; confusion is documented by Microsoft among the most common errors its support teams see, alongside stray spaces and trailing periods (&lt;a href="https://learn.microsoft.com/en-us/defender-office-365/email-authentication-spf-configure" rel="noopener noreferrer"&gt;Microsoft SPF doc&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;If your DMARC reports already show PermError and you need the diagnosis path rather than the reference, that flow lives in &lt;a href="https://dmarcguard.io/blog/spf-permerror-fix/?utm_source=devto&amp;amp;utm_medium=content&amp;amp;utm_campaign=crosspost-2026&amp;amp;utm_content=spf-record-syntax" rel="noopener noreferrer"&gt;fix SPF PermError&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Can a domain have two SPF records?
&lt;/h3&gt;

&lt;p&gt;No. RFC 7208 permits exactly one SPF record per domain name (§3.2), and when record selection finds more than one &lt;code&gt;v=spf1&lt;/code&gt; TXT record, the result is PermError (§4.5) — authentication fails for every message. Merge the mechanisms from both records into a single &lt;code&gt;v=spf1&lt;/code&gt; record instead.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is the difference between include and redirect in SPF?
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;include:&lt;/code&gt; matches only when the referenced record returns Pass, and evaluation continues if it doesn’t (§5.2). &lt;code&gt;redirect=&lt;/code&gt; applies only after every mechanism misses, replaces your record’s result entirely with the referenced domain’s, and is ignored whenever an &lt;code&gt;all&lt;/code&gt; mechanism is present (§6.1).&lt;/p&gt;

&lt;h3&gt;
  
  
  Which SPF mechanisms count toward the 10-lookup limit?
&lt;/h3&gt;

&lt;p&gt;Per RFC 7208 §4.6.4, the terms that count are &lt;code&gt;include&lt;/code&gt;, &lt;code&gt;a&lt;/code&gt;, &lt;code&gt;mx&lt;/code&gt;, &lt;code&gt;ptr&lt;/code&gt;, and &lt;code&gt;exists&lt;/code&gt;, plus the &lt;code&gt;redirect&lt;/code&gt; modifier. The &lt;code&gt;ip4&lt;/code&gt;, &lt;code&gt;ip6&lt;/code&gt;, and &lt;code&gt;all&lt;/code&gt; mechanisms and the &lt;code&gt;exp&lt;/code&gt; modifier never query DNS during evaluation and are exempt. A separate cap of two void lookups also applies.&lt;/p&gt;

&lt;h3&gt;
  
  
  What does %{i} mean in an SPF record?
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;%{i}&lt;/code&gt; is a macro that expands to the connecting client’s IP address — dotted-quad format for IPv4, dot-separated nibble format for IPv6 (§7.2, §7.3). It is most often paired with &lt;code&gt;exists:&lt;/code&gt; to build per-IP hostnames, letting one lookup authorize a dynamic set of senders.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does the order of mechanisms in an SPF record matter?
&lt;/h3&gt;

&lt;p&gt;Yes. Mechanisms are evaluated left to right, the first match stops processing, and that mechanism’s qualifier becomes the result (§4.6.2). An early &lt;code&gt;-&lt;/code&gt; qualifier is final for any IP it matches — no later &lt;code&gt;include&lt;/code&gt; can override it — and terms after &lt;code&gt;all&lt;/code&gt; are never evaluated (§5.1).&lt;/p&gt;

&lt;h3&gt;
  
  
  How do I publish an SPF record longer than 255 characters?
&lt;/h3&gt;

&lt;p&gt;Split it into multiple quoted strings of at most 255 bytes each, inside one TXT record. Receivers must concatenate the strings without adding spaces (§3.3), so the split can even fall mid-token. Keep the full DNS answer under roughly 450 octets so it fits a single UDP packet (§3.4).&lt;/p&gt;

&lt;h2&gt;
  
  
  The reference, in four lines
&lt;/h2&gt;

&lt;p&gt;SPF record syntax rewards precision, and the whole standard reduces to a short list worth keeping:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;One record, TXT only.&lt;/strong&gt; Exactly one &lt;code&gt;v=spf1&lt;/code&gt; TXT record per name; a second one is a PermError, not a merge (§3.1, §3.2).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;First match wins.&lt;/strong&gt; Left to right, stop at the first matching mechanism, return its qualifier (§4.6.2). Order is policy.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Know your lookup budget.&lt;/strong&gt; Ten DNS-querying terms, two void lookups — exceed either and every message fails (§4.6.4).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Macros are standard, not folklore.&lt;/strong&gt; Eleven letters in §7 power the dynamic records Salesforce runs in production today.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;This article was created with the help of AI.&lt;/p&gt;

&lt;p&gt;Originally published at &lt;a href="https://dmarcguard.io/blog/spf-record-syntax/" rel="noopener noreferrer"&gt;dmarcguard.io&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>email</category>
      <category>dns</category>
      <category>security</category>
      <category>sysadmin</category>
    </item>
  </channel>
</rss>
