Loading...
Loading...
SPF (Sender Policy Framework) lists the IP addresses and hostnames authorized to send mail for your domain, and defines what receivers should do with mail from any other source.
Without SPF, anyone can spoof mail from your domain and receivers have no mechanism to verify it. Gmail and Yahoo both require SPF for bulk senders since February 2024. For smaller domains, missing SPF still causes legitimate mail to land in spam (because DMARC has nothing to align against) and leaves you invisible to phishing campaigns impersonating your brand.
RFC 7208 caps SPF evaluation at 10 DNS lookups per message. Every `include:` counts. `include:_spf.google.com` alone already chains 3 lookups. Nested SaaS providers blow the budget fast and then your SPF silently fails with a `permerror`. If you are close to the limit, flatten IPs or split senders onto subdomains (`mail.yourdomain.com`, `marketing.yourdomain.com`) with their own SPF records. Start with `~all` (softfail) while you audit senders, then move to `-all` (hardfail) once reports are clean.
SPF is a TXT record at the apex of your domain, starting with `v=spf1`. Only one SPF record is allowed per domain - if dig returns multiple, that is itself a finding (MX-validators treat duplicates as permerror). `checkdmarc` counts the DNS-lookup chain each `include:` triggers.
dig +short TXT yourdomain.com | grep spf1pip install checkdmarc && checkdmarc yourdomain.comhttps://mxtoolbox.com/spf.aspxNo. RFC 7208 explicitly says one. Multiple records cause a permanent error; receivers reject the message with "too many SPF records". Merge all senders into a single record.
`-all` is the stronger stance (hardfail - mail is rejected). `~all` is softfail (mail is accepted but marked). Use `~all` during the audit phase while you identify every legitimate sender, then switch to `-all` once DMARC reports are clean.
Three options: (1) flatten by resolving `include:` chains to IPs (fragile - requires a tool to refresh daily), (2) delegate bulk senders to subdomains like `marketing.yourdomain.com` with their own SPF, (3) drop providers you do not actively use. Option 2 is usually the right answer.
Applied the configuration change? Run a live scan to confirm the vulnerability is patched.