Karta. Auth. DMARC. Record
(Karta v1.0.0)
A DMARC policy record (RFC 9989 §4.7 and §4.8).
The record must start with v=DMARC1 (case-sensitive); tags are
name=value pairs separated by ;. Unknown tags are ignored, and so is
a tag whose value is not valid: it keeps its default. pct is no longer
part of DMARC (RFC 9989 Appendix A.6) and is ignored like any unknown
tag.
Fields: p, sp, np (:none, :quarantine, :reject or nil),
adkim, aspf (:relaxed by default, or :strict), psd (:y, :n
or :u, the default), t (test mode, false by default), rua and
ruf (the reporting URIs that are valid), fo.
valid is false when p is missing or not valid, or sp or np is
present but not valid. Such a record is used as p=none when it has a
valid rua, and not at all otherwise (§4.10.1); policy/1 says which.
Summary
Functions
True when a TXT record is a DMARC record: its first tag is v=DMARC1.
Parses a DMARC record: {:ok, record}, or :error when it is not one.
How the record applies: {:ok, record} (a record without a valid
policy but with a valid rua becomes p=none, without sp and np),
or :ignore (no valid policy and no rua: no DMARC processing).
Types
@type policy() :: :none | :quarantine | :reject
Functions
True when a TXT record is a DMARC record: its first tag is v=DMARC1.
Parses a DMARC record: {:ok, record}, or :error when it is not one.
How the record applies: {:ok, record} (a record without a valid
policy but with a valid rua becomes p=none, without sp and np),
or :ignore (no valid policy and no rua: no DMARC processing).