Sovite.Core.DMARCReports (sovite v0.6.0)

Copy Markdown View Source

Sends DMARC aggregate reports (RFC 7489 §7.2), when dmarc.reports is on.

Sovite.Core.MailAuth stores the DMARC result of every message from outside whose policy asks for aggregate reports (rua=). Every dmarc.report_interval, the results are grouped by policy domain into one report each, as gzipped XML (Sovite.DMARC.Report), and queued as mail from dmarc.report_from to the domain's mailto: destinations. Destinations outside the policy domain's organization are used only if they agree to receive its reports (RFC 7489 §7.1). Reported results are then deleted.

Options

  • :repo - the Sovite.Core.Repo reference. Required.
  • :directory - the queue directory. Required.
  • :hostname, :org_name, :from - this server, the organization named in reports, and their sender address. Required.
  • :interval - milliseconds between reports. Required.
  • :queue_manager - told about each queued report, if given.
  • :resolver - for the destination checks. Defaults to Sovite.DNS.default_resolver/0.
  • :mail_auth - Sovite.Core.MailAuth options, to DKIM sign the report mail with the keys of the :from domain. Not signed without.

Telemetry

  • [:sovite, :dmarc, :report, :sent] - %{rows, messages}, %{domain, report_id, queue_id, to}
  • [:sovite, :dmarc, :report, :skipped] - %{messages}, %{domain, reason}

Summary

Functions

Reports every result stored before until, one report per policy domain. Returns the queue IDs of the queued reports.

Starts the report sender.

Functions

run(opts, until)

@spec run(map(), DateTime.t()) :: [String.t()]

Reports every result stored before until, one report per policy domain. Returns the queue IDs of the queued reports.

start_link(opts)

@spec start_link(keyword()) :: GenServer.on_start()

Starts the report sender.