Security Auditor — looks up the TXT records of the audited domain and checks that exactly one of them is an SPF record (
v=spf1 …) ending with a strict terminal mechanism (-all or ~all).Protection
Stops other people from sending email that claims to come from your domain and keeps your real mail out of the spam folder.
Standards
Follows RFC 7208, Sender Policy Framework (SPF) for Authorizing Use of Domains in Email, Version 1.
-all, ~all, ?all or +all) to decide what to do with a message from a server that is not listed. This auditor reads the SPF record of the domain behind the audited URL and checks that it exists, that there is exactly one, and that it ends in a way that actually limits who can send.
How it works
- Domain — takes the host of the audited URL and strips one leading
www.(https://www.example.com/pageis audited asexample.com). A URL without a host ends the audit with501. The auditor never fetches the page. - Lookup — asks DNS for the TXT records of the domain. A lookup that cannot complete (SERVFAIL, timeout) ends the audit with
500; it is not reported as a missing record. - Select — keeps the TXT records that start with
v=spf1(any letter case). None is aFAIL(400); more than one is aFAIL(401), because RFC 7208 treats several records as a permanent error. - Terminal mechanism — splits the single record on whitespace and takes its first
allterm (with any qualifier-,~,?,+or none), or, when there is noall, its firstredirect=modifier.+allor a bareallfails (402); no terminal at all warns (300); the neutral?allwarns (301). - Length — a record longer than 450 UTF-8 bytes warns (
302), because the TXT answer is about to outgrow a 512-byte UDP packet. - Aggregate — FAIL wins over WARNING; when every rule passes the audit is
SUCCESS(200) and the message quotes the record. - Specification pin — every run emits
37A-DnsMailSpfAuditor-100(INFORMATION), naming RFC 7208, Sender Policy Framework (April 2014). It does not change the overall status.
What it audits
Every row maps to onecheckRule* method and one CheckCode, in the order the auditor runs them. CheckCode suffixes use status ranges: 100 information, 200 success, 300–399 warning, 400–499 fail, 500–599 error.
Output documentation
Every check carries
domain, txtRecords, spfRecords, spfRecord, recordCount, terminalMechanism and recordBytes in its data, so the record the verdict was taken from is visible in the report.
Risks and considerations
Why SPF matters
- Without SPF, or with a record that passes everyone, phishing campaigns can send email as your domain and receivers cannot tell it from your real mail; DMARC also cannot be enforced without SPF or DKIM.
- A broken record (several records, an oversized answer) is worse than none for deliverability: receivers return a permanent error and may reject your legitimate mail.
-all, ~all, ?all, +all
-all(fail) asks receivers to reject unlisted senders;~all(softfail) asks them to accept but mark the message, and is the usual first step while you confirm every legitimate sender is listed.?all(neutral) and+all(pass) give no protection.redirect=other.examplehands the whole evaluation to another domain’s record and counts as a terminal; that other record is not followed by this auditor.- The auditor reads the first
allterm in the record; RFC 7208 ignores anything after it.
What changed in this version
+all(and a bareall) now fails with402; the previous version only warned.- The two “no terminal mechanism” warnings no longer fire together: a record with no
allwarns once with300, a record with?allwarns once with301. - A
redirect=modifier now counts as a terminal mechanism instead of warning. - A URL without a hostname is an
ERROR(501) instead of aFAIL. - A DNS lookup that cannot complete is an
ERROR(500) instead of a “missing SPF record”FAIL.
What this auditor does not check
- It does not evaluate the mechanisms themselves:
include:chains, the 10-lookup limit,a/mx/ip4/ip6validity or whether the listed hosts really send your mail. - It only looks at the domain of the audited URL (minus one
www.), not at subdomains used for mail. - DKIM and DMARC have their own auditors.