wikipedia.org: https://en.wikipedia.org/wiki/DMARC: The content of the TXT resource record consists of name=value tags, separated by semicolons, similar to SPF and DKIM. For example:
Inspection, eg with: https://dmarcian.com/dmarc-inspector
Points to watch out for:
- Reporting to an email address elsewhere requires authorization in that external DNS.
- Choosing ‘s(trict)’ instead of default ‘r(elaxed)’, a subdomain also needs authorization.
- In a related DNS value ‘v = DMARC1;’ requires a semicolon for successful testing.
- Lines with ABNF syntax, as for DMARC, can optionally terminate with a semicolon.
- The file size can be limited to eg 10 megabytes with !10m at the end of the email address.
- Eg _dmarc and _dmarc.www can derive using ‘CNAME _dmarc.reject.janwillemstegink.nl.’ set up with:
‘TXT v=DMARC1; p=reject; sp=reject; adkim=s; aspf=s; ruf=mailto:firstname.lastname@example.org!10m;’
https://tools.ietf.org/html/rfc7489#section-7.1 (Request for Comments for DMARC):
For example, if a DMARC policy query for “blue.example.com” contained “rua=mailto:email@example.com”, the host extracted from the latter (“red.example.net”) does not match “blue.example.com”, so this procedure is enacted. A TXT query for “blue.example.com._report._dmarc.red.example.net” is issued. If a single reply comes back containing a tag of “v=DMARC1”, then the relationship between the two is confirmed.
https://tools.ietf.org/html/rfc6376#section-3.2 (Request for Comments for DKIM):
Formally, the ABNF syntax rules are as follows:
tag-list = tag-spec *( “;” tag-spec ) [ “;” ]
tag-spec = [FWS] tag-name [FWS] “=” [FWS] tag-value [FWS]
tag-name = ALPHA *ALNUMPUNC
tag-value = [ tval ( 1(WSP / FWS) tval ) ]
; Prohibits WSP and FWS at beginning and end
tval = 1*VALCHAR
VALCHAR = %x21-3A / %x3C-7E
; EXCLAMATION to TILDE except SEMICOLON
ALNUMPUNC = ALPHA / DIGIT / “_”
Note that WSP is allowed anywhere around tags. In particular, any
WSP after the “=” and any WSP before the terminating “;” is not part
of the value; however, WSP inside the value is significant.