Karta. Reports. Sending
(Karta v1.0.0)
Karta's own reports about other people's mail: the DMARC aggregate
report (RFC 7489 §7.2) for the mail it received, and the TLS-RPT report
(RFC 8460) for the TLS sessions of the mail it sent. This module holds
the settings and the identity they are sent under; the work is done by
Karta.Reports.Sending.Planner, .Dispatcher and .Runner, and what
a kind knows is in its module (Karta.Reports.Sending.Kind).
Settings (environment, see the configuration reference):
KARTA_REPORTS_FROM- the address reports are sent from, andKARTA_REPORTS_SERVER- the id of the mail server that sends them. The address must be at a verified domain of that server's organisation, and the message is signed with that domain's keys. Without both, nothing is sent;identity/0says why.KARTA_REPORTS_DMARCandKARTA_REPORTS_TLS_RPT-falseturns a kind off (both are on by default once an identity is set).KARTA_REPORTS_DMARC_EXCLUDE- domains (and their subdomains) no DMARC report is sent about.KARTA_REPORTS_MAX_PER_DESTINATION- reports one address receives in 24 hours (default 100).
Kinds. The kinds sent are :dmarc_aggregate and :tls_rpt (kinds/0). DMARC failure reports (ruf) are not sent: they carry
message data. A further kind is a module implementing
Karta.Reports.Sending.Kind and a line in kinds/0.
Summary
Functions
Whether the kind is switched on (not whether an identity is set).
Whether reports about domain are excluded (it, or a parent, is listed).
A sentence for an operator about a problem of identity/0.
The identity reports are sent under: {:ok, %{from: address, server: server}}, or {:error, problem}: :not_set (no address or no
server), :invalid_from, :server_not_found or
:from_domain_not_verified (the address is not at a verified domain of
the server's organisation).
The kinds sent, as {kind, module}.
The settings, with their defaults.
What Karta sent in the last 30 days (the runs of those days, UTC):
runs ([%{kind:, status:, count:}]), sends (the reports sent,
limited and failed, with their bytes: %{sent:, limited:, failed:, bytes:}) and reasons, why runs were skipped or failed ([%{reason:, count:}], the most frequent ten).
Types
@type identity() :: %{from: Karta.Mail.Address.t(), server: Karta.Servers.Server.t()}
@type problem() ::
:not_set | :invalid_from | :server_not_found | :from_domain_not_verified
Functions
Whether the kind is switched on (not whether an identity is set).
Whether reports about domain are excluded (it, or a parent, is listed).
A sentence for an operator about a problem of identity/0.
The identity reports are sent under: {:ok, %{from: address, server: server}}, or {:error, problem}: :not_set (no address or no
server), :invalid_from, :server_not_found or
:from_domain_not_verified (the address is not at a verified domain of
the server's organisation).
The kinds sent, as {kind, module}.
@spec settings() :: keyword()
The settings, with their defaults.
@spec summary(DateTime.t()) :: map()
What Karta sent in the last 30 days (the runs of those days, UTC):
runs ([%{kind:, status:, count:}]), sends (the reports sent,
limited and failed, with their bytes: %{sent:, limited:, failed:, bytes:}) and reasons, why runs were skipped or failed ([%{reason:, count:}], the most frequent ten).