feat: add walk-mode selection and cross-mode comparison to opendmarc-check#431
Merged
thegushi merged 1 commit intoJun 21, 2026
Conversation
…check Adds -m to opendmarc-check to run a single DMARCbis walk mode (auto/psl/rfc7489/rfc9989), -p to load a Public Suffix List file (PSL mode and auto otherwise have nothing to query), and -a to query a domain under all four modes in one pass and print a comparison line per mode (status, org domain, p=, sp=, whether the RFC 7489 fallback walk was used). This exercises the actual opendmarc_policy_query_dmarc() path the milter uses, not a re-implementation, so it can be used to spot real divergence between walk modes for a given label rather than relying on the Perl survey scripts in contrib/. Extracted policy_to_str()/alignment_to_str() helpers out of the existing inline switch statements so both the classic single-domain report and the new comparison output share one source of truth for p=/sp=/adkim=/aspf= string conversion.
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.
Summary
This goes through the actual opendmarc_policy_query_dmarc() path the milter uses, not a re-implementation, so it can be used to spot real divergence between walk modes for a given label instead of relying on the Perl survey scripts in contrib/.
Test plan