Commit 016c425
authored
feat: add walk-mode selection and cross-mode comparison to opendmarc-check (#431)
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.1 parent d3a63b0 commit 016c425
2 files changed
Lines changed: 285 additions & 96 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
14 | 56 | | |
15 | 57 | | |
16 | 58 | | |
| |||
0 commit comments