DMARC (RFC 9989): checks that a DKIM signature or the SPF check that passed
belongs to the domain in the From: address, and reads the policy the
domain publishes.
The organizational domain is found with RFC 9989's DNS tree walk, so no
copy of the Public Suffix List is needed. A caller who wants the list's
answers passes :organizational_domain.
Options
:spf: theMailAuth.SPF.Resultof the message, if SPF ran:organizational_domain: a function(domain, opts) -> {:ok, org} | {:error, reason}used instead of the tree walk. With it, the record is looked up at the From domain and then at its organizational domain, as RFC 7489 did:resolver,:deadline,:timeout: seeMailAuth.ResolverandMailAuth
Summary
Functions
Evaluates DMARC for raw, given its DKIM results and, in opts[:spf], its
SPF result.
Looks up the DMARC record that applies to domain.
Functions
@spec evaluate(binary(), [MailAuth.DKIM.Result.t()], keyword()) :: MailAuth.DMARC.Result.t()
Evaluates DMARC for raw, given its DKIM results and, in opts[:spf], its
SPF result.
@spec lookup(String.t(), keyword()) :: {:ok, MailAuth.DMARC.Record.t(), String.t()} | {:error, :no_record | :dns_error | :deadline | :invalid_domain}
Looks up the DMARC record that applies to domain.
Returns the record (its domain field says where it was found) and the
organizational domain.