Skip to content
NEWMeet Alaaddin, your AI genie with a voice. trig8n launches 1 January 2027. See what is new

Library / Monitoring, Ops & Incidents

Monitoring, Ops & Incidents

Audit SPF DNS lookup limits daily with Google DNS, Slack and Gmail

Runs daily, follows vendor SPF includes two levels deep, and alerts via Slack and Gmail when a domain nears the 10-lookup limit.

What it does

## SPF 10-Lookup Guard - daily DNS audit RFC 7208 lets a receiving server make at most 10 DNS lookups while checking one SPF record. The 11th aborts the check with _permerror_: your record stops protecting the domain, and some servers reject even your genuine mail. Most SPF checkers only count the include: lines you wrote. This one chases every vendor include two levels deep, so the lookups your vendors spend inside their own records are counted against your budget too - which is where almost every over-limit domain actually breaks. ### How it works 1. Configuration holds your domain list and where alerts go. Nothing else to edit. 2. Each domain's SPF record is fetched from Google's free DNS-over-HTTPS endpoint. No API key. 3. Three resolve rounds chase every include: and redirect= target two levels deep. 4. The receiver's arithmetic is replayed offline: include: redirect= a mx exists: ptr cost 1 each, ip4: ip6: all cost nothing. A term costs 1 however many addresses it returns. 5. Each domain gets a verdict, plus a term-by-term breakdown showing exactly where its lookups go. 6. Anything that needs acting on goes to Slack and email. A healthy estate stays quiet. ### Setup - [ ] In Configuration, replace example.com with your domains, comma separated - [ ] Set slackChannel and alertEmailTo. That is the whole configuration - [ ] Add Slack and Gmail credentials - [ ] Click Execute Workflow to test, then activate for the 07:00 schedule ### Customize Delete the Slack node or the Gmail node if you only want one channel. Change the schedule hour on the trigger.

The steps

  1. Every Morning at 07:00
  2. When Clicking Execute Workflow
  3. Configuration
  4. Split Domains
  5. Resolve DNS Round 1
  6. Expand Includes Level 1
  7. Resolve DNS Round 2
  8. Expand Includes Level 2
  9. Resolve DNS Round 3
  10. Count SPF Lookups
  11. Build Alert Digest
  12. Send Slack Digest
  13. Email Security Digest

Similar automations