5.16.0: Align DMARC parser with the final RFC 9989#252
Merged
Conversation
- 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>
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 ☂️ |
- `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>
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.
_dmarc.govwithpsd=y, etc.) can be discovered — the original reason the tree walk was added in RFC 9989.apex_fallback=False, so a strayv=DMARC1at a parent's apex no longer aborts the walk withDMARCRecordInWrongLocation.pct,rf,riare 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.InvalidDMARCTag, per RFC 9989 §4.7 ("Unknown tags MUST be ignored").!sizeURI 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; staleRFC 7486/RFC 7489references updated to RFC 9989 / RFC 9990.dmarc_pct/dmarc_rf/dmarc_ricolumns.