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
- Every Morning at 07:00
- When Clicking Execute Workflow
- Configuration
- Split Domains
- Resolve DNS Round 1
- Expand Includes Level 1
- Resolve DNS Round 2
- Expand Includes Level 2
- Resolve DNS Round 3
- Count SPF Lookups
- Build Alert Digest
- Send Slack Digest
- Email Security Digest
Similar automations
Email AutomationAudit SPF, DKIM and DMARC DNS for sheet domains with Google DNS, GPT-4o-mini and Telegram16 stepsSecurity & ComplianceEnumerate Subdomains and DNS Records with Markdown Export10 stepsSecurity & ComplianceSecure inbound webhooks with HMAC, rate limits, audit logs, and Slack alerts19 stepsEmail AutomationMonitor SPF, DKIM and DMARC across multiple domains with Apify, Gmail and Slack24 steps