Evaluate SPF flattening tradeoffs and implement automation safely

domain: autospf.com · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Understand what SPF flattening does: it resolves all include:, a:, and mx: mechanisms to their underlying ip4:/ip6: literals at publication time, eliminating DNS lookups from the evaluated record.
  2. Identify the risk before flattening: vendor IP ranges (Google Workspace, Microsoft 365, SendGrid, etc.) change without notice; a manually flattened record goes stale silently, de-authorising legitimate mail.
  3. If you choose manual flattening, set a calendar reminder to re-resolve all vendor ranges at least monthly; compare the new ip4: list against the published record and update immediately on any diff.
  4. For automated flattening, use a hosted service (AutoSPF, PowerSPF, Valimail Instant SPF, or similar) that continuously resolves vendor ranges and updates your DNS record via API; your DNS nameserver must support API-driven record updates.
  5. Consider SPF macros as an alternative to flattening: the %{i} macro embeds the sending IP in a per-lookup DNS query, eliminating large static lists entirely—supported by services like Valimail and some self-hosted setups.
  6. After any change to a flattened record, re-validate the lookup count and test with a real send from each authorised source before declaring the change complete.

Known gotchas

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans