trailofbits/dmarc — pull request #6 by ryansch (2014-08-12 15:53:27+00:00)
Title: Consider ordering of tag-value pairs; ignore unknown tags

From the spec:

A DMARC policy record MUST comply with the formal specification found
in Section 5.3 in that the "v" and "p" tags MUST be present and MUST
appear in that order. 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.

We are currently enforcing the order of all of the tags (not just v and p). We also blow up on unknown tags.

I've added a failing test with yahoo's dmarc record as an example of the `pct` tag being out of order.