On Mon 27/Feb/2023 16:17:33 +0100 Tim Wicinski wrote:
I agree that we should fix this tolerance in the bis document.
I agree we should fix the grammar, but the general syntax of dmarcbis allows trailing spaces. I tried and verified it using the IETF's extractor[*] and an ABNF to regex conversion tool[†] (I found no other tools to check ABNF). I had to simplify the rules, e.g. excluding URI. For dmarcbis, I had to replace dmarc-version with the old one, because the tool doesn't support RFC 7405 (There's an open issue on Github[‡]). The tool complained about 'dmarc-value = %x20-3A | %x3C-7E', where | has to be replaced with /. The results are as follows: $ printf 'v=DMARC1; p=reject; pct=100\nv=DMARC1; p=reject; pct=100;\nv=DMARC1; p=reject; pct=100 \n' | grep -nP '^[Vv][ \t]*\=[ \t]*DMARC1[ \t]*;[ \t]*(([Pp][ \t]*\=[ \t]*([Nn][Oo][Nn][Ee]|[Qq][Uu][Aa][Rr][Aa][Nn][Tt][Ii][Nn][Ee]|[Rr][Ee][Jj][Ee][Cc][Tt])))?([ \t]*;[ \t]*([Ss][Pp][ \t]*\=[ \t]*([Nn][Oo][Nn][Ee]|[Qq][Uu][Aa][Rr][Aa][Nn][Tt][Ii][Nn][Ee]|[Rr][Ee][Jj][Ee][Cc][Tt])))?([ \t]*;[ \t]*[Rr][Uu][Aa][ \t]*\=[ \t]*((\![0-9]+[KkMmGgTt]?)?)([ \t]*,[ \t]*((\![0-9]+[KkMmGgTt]?)?))*)?([ \t]*;[ \t]*[Rr][Uu][Ff][ \t]*\=[ \t]*((\![0-9]+[KkMmGgTt]?)?)([ \t]*,[ \t]*((\![0-9]+[KkMmGgTt]?)?))*)?([ \t]*;[ \t]*([Aa][Dd][Kk][Ii][Mm][ \t]*\=[ \t]*[RrSs]))?([ \t]*;[ \t]*([Aa][Ss][Pp][Ff][ \t]*\=[ \t]*[RrSs]))?([ \t]*;[ \t]*[Rr][Ii][ \t]*\=[ \t]*[0-9]+)?([ \t]*;[ \t]*([Ff][Oo][ \t]*\=[ \t]*(0|1|[DdSs])([ \t]*\:[ \t]*(0|1|[DdSs]))*))?([ \t]*;[ \t]*[Pp][Cc][Tt][ \t]*\=[ \t]*[0-9]{1,3})?([ \t]*;[ \t]*)?$' 1:v=DMARC1; p=reject; pct=100 2:v=DMARC1; p=reject; pct=100; and $ printf 'v=DMARC1; p=reject; pct=100\nv=DMARC1; p=reject; pct=100;\nv=DMARC1; p=reject; pct=100 \n' | grep -nP '^[Vv][ \t]*\=[ \t]*DMARC1([ \t]*;[ \t]*[A-Za-z]+[ \t]*\=[ \t]*[ -\:\<-~]+)*([ \t]*;[ \t]*)?$' 1:v=DMARC1; p=reject; pct=100 2:v=DMARC1; p=reject; pct=100; 3:v=DMARC1; p=reject; pct=100 Best Ale -- [*] https://author-tools.ietf.org/abnf [†] https://www.msweet.org/abnf/index.html [‡] https://github.com/michaelrsweet/abnf/issues/5 _______________________________________________ dmarc mailing list dmarc@ietf.org https://www.ietf.org/mailman/listinfo/dmarc