Skip to content

5.16.0: Align DMARC parser with the final RFC 9989#252

Merged
seanthegeek merged 2 commits into
mainfrom
5.16.0
May 20, 2026
Merged

5.16.0: Align DMARC parser with the final RFC 9989#252
seanthegeek merged 2 commits into
mainfrom
5.16.0

Conversation

@seanthegeek
Copy link
Copy Markdown
Contributor

  • Tree walk now reaches single-label parents so PSDs (_dmarc.gov with psd=y, etc.) can be discovered — the original reason the tree walk was added in RFC 9989.
  • Tree-walk parent lookups pass apex_fallback=False, so a stray v=DMARC1 at a parent's apex no longer aborts the walk with DMARCRecordInWrongLocation.
  • pct, rf, ri are removed in RFC 9989. They are no longer implicitly defaulted, are no longer strictly validated (out-of-range / non-integer / unknown-rf no longer raise), and explicit use emits a "removed in RFC 9989" warning. Pre-9989 readers may still honor them, so the value is left intact for those consumers.
  • Unknown tags are ignored with a warning instead of raising InvalidDMARCTag, per RFC 9989 §4.7 ("Unknown tags MUST be ignored").
  • The "p must immediately follow v" constraint and the !size URI suffix are now warnings rather than hard errors — RFC 9989 dropped both, but older RFC 7489 readers may still expect them.
  • dmarc_tags["p"]["required"] flipped to False; stale RFC 7486 / RFC 7489 references updated to RFC 9989 / RFC 9990.
  • BIMI's pct=100 check tolerates pct being absent. CSV row builder drops the now-unused dmarc_pct / dmarc_rf / dmarc_ri columns.

- Tree walk now reaches single-label parents so PSDs (`_dmarc.gov` with
  `psd=y`, etc.) can be discovered — the original reason the tree walk
  was added in RFC 9989.
- Tree-walk parent lookups pass `apex_fallback=False`, so a stray
  `v=DMARC1` at a parent's apex no longer aborts the walk with
  `DMARCRecordInWrongLocation`.
- `pct`, `rf`, `ri` are removed in RFC 9989. They are no longer
  implicitly defaulted, are no longer strictly validated (out-of-range
  / non-integer / unknown-rf no longer raise), and explicit use emits a
  "removed in RFC 9989" warning. Pre-9989 readers may still honor them,
  so the value is left intact for those consumers.
- Unknown tags are ignored with a warning instead of raising
  `InvalidDMARCTag`, per RFC 9989 §4.7 ("Unknown tags MUST be ignored").
- The "p must immediately follow v" constraint and the `!size` URI
  suffix are now warnings rather than hard errors — RFC 9989 dropped
  both, but older RFC 7489 readers may still expect them.
- `dmarc_tags["p"]["required"]` flipped to False; stale `RFC 7486` /
  `RFC 7489` references updated to RFC 9989 / RFC 9990.
- BIMI's pct=100 check tolerates pct being absent. CSV row builder drops
  the now-unused `dmarc_pct` / `dmarc_rf` / `dmarc_ri` columns.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented May 20, 2026

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@seanthegeek seanthegeek changed the title Align DMARC parser with the final RFC 9989 5.16.0: Align DMARC parser with the final RFC 9989 May 20, 2026
- `checkdmarc/__init__.py`: drop the `dmarc_pct` / `dmarc_rf` / `dmarc_ri`
  column headers — the matching row writers were removed in the previous
  commit, so the CSV had three empty columns.
- `docs/source/cli.md`: drop the `pct` / `rf` / `ri` implicit-default
  entries from the example JSON output; those tags no longer appear in
  parsed results.
- `README.md` and `docs/source/index.md`: reword the features bullet to
  note that `pct`/`rf`/`ri` are removed in RFC 9989.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@seanthegeek seanthegeek merged commit aef0d10 into main May 20, 2026
3 checks passed
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