Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
1. SPF Record Parsing Structure
Before: The
parse_spf_record()function returned aparseddictionary with top-level keys like"pass","neutral","softfail","fail", along with"include","redirect","exp", and"all".After: The
parsedstructure now contains a list of dictionaries under the"mechanisms"key. Each entry describes a mechanism (e.g.,mx,a,include), and includes additional data such as DNS lookup counts and associated addresses.Example:
Before:
After:
2. DNS Lookup Counting Changes
mxlookups).5.11.0), ensuring that the overall limit of 10 DNS queries per SPF evaluation is respected.3. DNS void fields
The field for void DNS lookups in exceptions is now
void_dns_lookups, as opposed todns_void_lookupsin the master branch. Code reading exception data should be updated to reflect this change.Example:
Before:
After:
4. Redirect Handling
redirectmechanism now propagates the terminal policy (i.e.,all) from the redirected SPF record. The effectiveallpolicy is now available directly underparsed["all"]after resolving redirects.🛠️ Improvements
Enhanced Output Data for Mechanisms
dns_lookups), void DNS lookups (void_dns_lookups), and resolved addresses (hostsformxmechanisms).🧰 Migration Notes
1. Handling SPF Parsing Results
"pass","neutral", etc., keys. In the new structure, you must filter the"mechanisms"list based on theactionkey.Before:
After:
2. Error Payload Field Updates
e.data["dns_void_lookups"]must update toe.data["void_dns_lookups"].🚨 Potential Compatibility Breaks for Consumers
--jsonflag or other means), note that the structure of the output has changed. The old format with top-levelpass,fail, and other categories has been replaced with a list of mechanisms.🧑💻 For CLI Users
mechanisms, each containing information like DNS lookups, void lookups, and resolved addresses.✨ Summary of Changes
This release introduces significant changes that improve the clarity, flexibility, and robustness of SPF record evaluation. Please ensure your codebase is compatible with these new structures and exception formats.