Urgent.News

What's breaking now, across thousands of outlets.

Tech

SPF "too many DNS lookups" (PermError): what it means and how to fix it

Your mail quietly started landing in spam, and when you checked SPF you found this: PermError: too many DNS lookups . Here's exactly what that means and how to fix it without guessing. The rule nobody tells you about SPF (RFC 7208) caps the number of DNS-lookup-causing terms in your record at 10 . Not 10 records — 10 lookups , counted recursively. Blow past it and a correct receiver returns…

Your emails may have been ending up in spam folders due to an overabundance of DNS lookups in your Sender Policy Framework (SPF) record. The rule states that there can only be 10 lookups in total, counted recursively. If you exceed this limit, your legitimate emails will be incorrectly marked as SPF failed and filtered out.

An SPF record includes various elements, such as include, a, mx, ptr, exists, and ip4 or ip6 addresses. Each of these elements counts as one lookup when used, except for ip4:, ip6:, and all, which are free. However, the tricky part is that an include statement can itself expand into more include statements, leading to an unexpected number of lookups. For example, add a few senders from different services, and you might unknowingly exceed the 10-lookup limit.

To diagnose this issue, first resolve your TXT record and walk through the includes, adding up the lookup-causing terms across the entire tree. Use a tool like dig to scan through the TXT record and grep for spf1. After identifying the culprit, remove or simplify any unnecessary senders, flatten stable include statements into ip4: or ip6: ranges (free lookups), or delegate by subdomain if appropriate.

Finally, consider implementing Sender Policy Framework (SPF) in combination with DomainKeys Identified Mail (DKIM) and Domain-based Message Authentication, Reporting, and Conformance (DMARC) policies. Properly configured, SPF, DKIM, and DMARC together will significantly reduce the chances of your emails being filtered out into spam folders. Tools like the zero-config CLI 'domain-doctor' can help you easily diagnose and fix SPF issues, generating a graded report with recommended fixes.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Why your PHP-FPM throws 502 under load (pm.max_children, explained)

Your PHP site runs fine, then traffic spikes and nginx starts throwing 502 Bad Gateway . Logs blame the upstream. The cause is almost always one number in your PHP-FPM pool: pm.max_children .

  • 502 Bad Gateway errors occur when PHP-FPM cannot handle increased traffic.
  • pm.maxchildren limits the number of PHP-FPM worker processes.
  • Properly sizing pm.maxchildren prevents 502 errors and optimizes resource usage.

Verifiable legal citation

Short answer Recommendation OAB 001/2024 establishes ethical guidelines for the use of artificial intelligence by lawyers in Brazil, requiring that all legal citations produced with the support of AI…

More from Monday 26 October →