-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
maddy fails to validate SPF record with long lookup chain #487
Comments
Related to #485 (maddy not ignoring permerror status as most services do). |
From RFC 7208:
Seems like I am a month late - currently set SPF record for that domain cannot cause more than 9 lookups. |
Closing as non-actionable. |
@foxcpp Appreciate the reply.. have you checked on whether maddy actually handles that record? Might be that the implementation doesn’t fully conform to the expectation of the RFC..? I’ve seen this error with other domains (and meanwhile have set permerror to “ignore”) |
Woops, I double-checked what was I doing and apparently I passed parameters in the wrong format to the SPF library. Here is the list of DNS queries maddy does while checking 130.180.63.115 against mediterana.de SPF record. SPF library used by maddy counts A+AAAA queries as one and actually does 14 queries before stopping.
|
Ah, that’s a tricky one, good catch! Mixed IPv4/6 is a nightmare 🙈 |
It gets even more interesting. Apparently, RFC 4408 text means that the limit is in terms of SPF "terms", not DNS lookups.
In this case, the problematic record has only 8 out of 10 allowed terms. @albertito, is this intentional that blitiri.com.ar/go/spf counts DNS lookups and not terms? |
Sorry about this, the problem is indeed caused by a bug in the SPF library, in the way that some terms are counted for the purposes of DNS lookup limits. Coincidentally, this problem was reported yesterday and fixed today in commit 48ee700, which is in the So far I know of two domains affected, While looking at it, I've identified two other minor bugs related to how the DNS lookup limit was counted. I think those are more rare to hit in practice, but in any case, they've also been fixed in the With the fixes, both domains now work fine. Given it seems to be affecting now more than one person, and two domains, I plan to cut a release tomorrow, once I've done a bit more real-life testing just in case. I hope this helps, please let me know if there are any issues, questions or concerns; and sorry again for the hassle! |
@albertito Fantastic response time, thank you for your hard work! |
FYI I've just cut v1.4.0 of the spf package which includes a fix for this problem. |
Good. Thanks, @albertito! I will bump version used in maddy and probably tag 0.6 finally. |
Describe the bug
When receiving email with a standard-compliant SPF header maddy fails to validate the SPF record because it considers it to have too many lookups. It should fail to deliver the message though since the SPF header is considered valid.
Steps to reproduce
The SPF record is considered valid when using popular tools to verify it. It's a rather long chain, but it's compliant as far as I can tell. And yes, it is lacking a valid DKIM signature (and therefore doesn't pass the DMARC check).
Google's servers are receiving email from the same domain without any issues.
Log files
Configuration file
Environment information
The text was updated successfully, but these errors were encountered: