Karta.Auth.SPF.Result (Karta v1.0.0)

The outcome of an SPF check (RFC 7208 §2.6), in the terms of Authentication-Results (RFC 8601 §2.7.2).

  • result - :pass, :fail, :softfail, :neutral, :none, :temperror or :permerror (and :unknown for a configuration check, see Karta.Auth.SPF.check_host/4).
  • identity - :mailfrom or :helo: which identity was checked.
  • domain - the domain checked (the sender's, or the HELO name).
  • reason - for :permerror and :temperror, why: :syntax, :multiple_records, :too_many_lookups, :too_many_void_lookups, :too_many_mx, :include_none, :redirect_none, :dns or :timeout.
  • lookups - the terms that looked up DNS on the way (at most 10).
  • explanation - for :fail, the domain's explanation (exp=), when asked for.

Summary

Types

result()

@type result() ::
  :pass
  | :fail
  | :softfail
  | :neutral
  | :none
  | :temperror
  | :permerror
  | :unknown

t()

@type t() :: %Karta.Auth.SPF.Result{
  domain: String.t() | nil,
  explanation: String.t() | nil,
  identity: :mailfrom | :helo | nil,
  lookups: non_neg_integer(),
  reason: atom() | nil,
  result: result()
}