Skip to content

feat: add configurable walk-mode fallback and fix S 4.10.2 secondary alignment walk - #433

Merged
thegushi merged 1 commit into
trusteddomainproject:developfrom
thegushi:feat/opendmarc-check-walk-modes
Jun 22, 2026
Merged

feat: add configurable walk-mode fallback and fix S 4.10.2 secondary alignment walk#433
thegushi merged 1 commit into
trusteddomainproject:developfrom
thegushi:feat/opendmarc-check-walk-modes

Conversation

@thegushi

Copy link
Copy Markdown
Collaborator

Summary

  • opendmarc_policy_query_dmarc() and the new opendmarc_policy_check_alignment() dispatch both now consult a configurable walk_mode_fallback (DMARCbisWalkModeFallback in opendmarc.conf, -f in opendmarc-check) when the primary walk_mode strategy finds nothing. Any of PSL, RFC7489, or RFC9989 can serve as either the primary or fallback strategy; Auto's existing PSL-then-RFC7489 combinator is unaffected. This matters because RFC 9989 deprecates PSL-based discovery, but RFC 9990's discovery_method report field still has to be able to say "psl", so PSL has to stay a live, selectable strategy.
  • opendmarc_policy_check_alignment() now performs the S 4.10.2 secondary alignment walk for the SPF/DKIM identifier (via the same walk_mode/fallback dispatch) instead of always reducing it through the PSL. Per direct correspondence with an RFC 9989 co-author (DMARCBIS-EDITOR-EMAIL.txt), reusing the single policy-discovery walk's org domain for every identifier was confirmed non-compliant, not an optional reading of "might".
  • DMARCBIS-WALK-NOTES.txt reconciled against that correspondence.
  • Live-DNS test suite (test_dns_lookup.c, test_spf.c, new test_dmarc_walk.c) rewritten against gushi.org / dmarcwalk.gushi.org, replacing cases that depended on flaky third-party domains nobody on this project controls.

Test plan

  • make check in libopendmarc/ -- 13/13 pass, including live-DNS test_dmarc_walk and test_alignment
  • Manual opendmarc-check -m psl -f rfc9989 against sub.nopsd.dmarcwalk.gushi.org confirms the fallback resolves where PSL alone fails
  • make clean build of libopendmarc, opendmarc, and opendmarc-check

…alignment walk

opendmarc_policy_query_dmarc() and the new opendmarc_policy_check_alignment()
dispatch both now consult a configurable walk_mode_fallback
(DMARCbisWalkModeFallback in opendmarc.conf, -f in opendmarc-check) when the
primary walk_mode strategy finds nothing. Any of PSL, RFC7489, or RFC9989 can
serve as either the primary or fallback strategy; AUTO's existing
PSL-then-RFC7489 combinator is unaffected. This matters because RFC 9989
deprecates PSL-based discovery but RFC 9990's discovery_method report field
still has to be able to say "psl", so PSL has to stay a live, selectable
strategy rather than something to delete.

opendmarc_policy_check_alignment() also now performs the S 4.10.2 secondary
alignment walk for the SPF/DKIM identifier (via the same walk_mode/fallback
dispatch) instead of always reducing it through the PSL. Per direct
correspondence with an RFC 9989 co-author (DMARCBIS-EDITOR-EMAIL.txt),
reusing the single policy-discovery walk's org domain for every identifier,
as before, was confirmed non-compliant rather than an optional reading of
"might".

DMARCBIS-WALK-NOTES.txt is reconciled against that correspondence: items 1,
4, and 5 are confirmed-correct/resolved with no code change, item 2 (above)
is fixed, item 3 (multiple records at one level) was already fixed
upstream, and a new item 7 documents the fallback feature.

Also rewrites the live-DNS test suite (test_dns_lookup.c, test_spf.c, and
new test_dmarc_walk.c) against gushi.org and its dmarcwalk.gushi.org
fixture zone, replacing cases that depended on flaky third-party domains
(bcx.com, facebook.com, agari.com, linkedin.com, csh.rit.edu, web.de,
zalando-lounge.de) that nobody on this project controls.
@thegushi
thegushi merged commit d786f11 into trusteddomainproject:develop Jun 22, 2026
2 checks passed
@thegushi
thegushi deleted the feat/opendmarc-check-walk-modes branch June 22, 2026 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant