A DMARC policy record (RFC 9989).
Fields:
:domain: where the record was found, without the_dmarc.prefix:p,:sp,:np: the policies,:none,:quarantineor:reject, ornilwhen the tag is missing or not valid:adkim,:aspf::relaxed(the default) or:strict:psd::yes,:noor:unknown(the default):testing?: true fort=y:rua,:ruf: report addresses, as written:fo: the failure reporting options, as written:warnings: problems found while parsing, such as:missing_policy
Unknown tags, and the pct, rf and ri tags that RFC 9989 removed, are
ignored. A record without a valid p tag, or with an sp or np tag that
is not valid, is read as p=none when it has a rua address, and does not
apply otherwise, as RFC 9989 section 4.10.1 says.
Summary
Functions
Parses a TXT record. Returns :error unless its first tag is v=DMARC1.
True when the record has a p tag and valid sp and np tags, if any.
RFC 9989 reads a record without them as p=none only when it has a
report address; otherwise DMARC does not apply.
Types
@type policy() :: :none | :quarantine | :reject
@type t() :: %MailAuth.DMARC.Record{ adkim: :relaxed | :strict, aspf: :relaxed | :strict, domain: String.t() | nil, fo: String.t() | nil, np: policy() | nil, p: policy() | nil, psd: :yes | :no | :unknown, rua: [String.t()], ruf: [String.t()], sp: policy() | nil, testing?: boolean(), warnings: [atom()] }
Functions
Parses a TXT record. Returns :error unless its first tag is v=DMARC1.
True when the record has a p tag and valid sp and np tags, if any.
RFC 9989 reads a record without them as p=none only when it has a
report address; otherwise DMARC does not apply.