In practice, the code that parses DMARC just splits the input into xxx=yyy pairs of tag and value strings and checks the values semantically.
For those, who do not work at the IETF, the spec comes before the implementation. If the spec defines a grammar that looks as authoritative [1] as the one in section 5.4, then an implementation might just solve a decision problem whether a string matches the grammar or not. This is a yes or no question. But as you have pointed out, the authors have an implementation in mind that leaks back into the spec:
Unknown tags MUST be ignored. Syntax errors in the remainder of the record SHOULD be discarded in favor of default values (if any) or ignored outright.
From the perspective of a decision problem, there are no unknown DMARC tags. If there are syntax errors, then the whole thing is not a DMARC record, in particular it does not consist of valid tag-value pairs and invalid tag-value pairs. The record
v=DMARC1; rua=mailto:rep...@example.com; garbage=101; more-garbage
should not yield DMARC reports at all, as there is no DMARC record. In my opinion, the spec should either stick to the grammar, or explicitly and unambiguously define the parsing procedure. [1] "A DMARC policy record MUST comply with the formal specification found in Section 5.4" _______________________________________________ dmarc mailing list dmarc@ietf.org https://www.ietf.org/mailman/listinfo/dmarc