Karta.MTASTS.HostedPolicy (Karta v1.0.0)

A sending domain's MTA-STS policy (RFC 8461 §3.2) that Karta serves for it at https://mta-sts.<domain>/.well-known/mta-sts.txt (Karta.MTASTS.Hosting).

  • mode - :testing (senders report TLS failures but deliver), :enforce (senders deliver only over TLS to the listed hosts) or :none (the policy is withdrawn);
  • mx - the MX host names, or patterns *.example.com for one more label, that senders may deliver to; required unless the mode is :none; lower-case ASCII without a final dot;
  • max_age - how long senders keep the policy, in seconds: one day to one year (RFC 8461's limit).

The last check of the CNAME record at mta-sts.<domain> is kept as for tracking hosts (Karta.Tracking.TrackingHost): host_check_result (:ok, :missing, :mismatch, :failed), host_found, host_checked_at, and host_verified_at, set while the record points to Karta.

Summary

Functions

The mode, the MX names (a list, or one string with names separated by spaces, commas or lines) and max_age come from input; the domain and the check are set by Karta.MTASTS.Hosting.

The result of a check of the CNAME record at mta-sts.<domain>.

Types

t()

@type t() :: %Karta.MTASTS.HostedPolicy{
  __meta__: term(),
  domain: term(),
  domain_id: term(),
  host_check_result: term(),
  host_checked_at: term(),
  host_found: term(),
  host_verified_at: term(),
  id: term(),
  inserted_at: term(),
  max_age: term(),
  mode: term(),
  mx: term(),
  updated_at: term()
}

Functions

changeset(policy, attrs)

The mode, the MX names (a list, or one string with names separated by spaces, commas or lines) and max_age come from input; the domain and the check are set by Karta.MTASTS.Hosting.

check_changeset(policy, result, found, now)

The result of a check of the CNAME record at mta-sts.<domain>.