Skip to content

RFC 7208: 5.2, none result should be returned as "no match"#58

Open
ahmeij wants to merge 1 commit into
ValiMail:mainfrom
soverin:master
Open

RFC 7208: 5.2, none result should be returned as "no match"#58
ahmeij wants to merge 1 commit into
ValiMail:mainfrom
soverin:master

Conversation

@ahmeij
Copy link
Copy Markdown

@ahmeij ahmeij commented Apr 22, 2025

When including an external SPF record with include the RFC explicitly allows the result to be empty (?all does not need to be present).

Currently when including an SPF record with only ip addresses and no all directive the validation will result in a permerror.

This PR removes the check and allows 'none' as a result.

@taylorrf taylorrf changed the base branch from master to main May 19, 2026 14:40
Comment on lines +13 to +19
# RFC 7208: 5.2, none result should be returned as "no match"
# def evaluate_none_result(result, m, r)
# new_result = super
# return new_result unless new_result.none?

raise Coppertone::NoneIncludeResultError
end
# raise Coppertone::NoneIncludeResultError
# end
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ahmeij

Is it possible to add a spec covering this RFC 7208: 5.2 case, and rebase it with our current main branch?

Also, I was wondering if, instead of commenting on this method, we can actually handle the result argument and return a no match.

Thanks for your PR! And let me know what you think about the suggestions above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants