Values of the MAIL and RCPT parameters of these SMTP extensions:
MT-PRIORITY=(RFC 6710): a priority from -9 to 9.HOLDFOR=andHOLDUNTIL=(FUTURERELEASE, RFC 4865): hold the message for some seconds, or until a time.BY=(DELIVERBY, RFC 2852): deliver within some seconds, or return the message (R) or notify the sender (N).RRVS=(RFC 7293): the recipient's mailbox must have had the same owner since a time; if the next hop cannot check that, return the message (R, the default) or continue (C).
Times are RFC 3339 date-times (2026-10-14T12:00:00Z).
iex> Sovite.SMTP.Params.parse_priority("-3")
{:ok, -3}
iex> Sovite.SMTP.Params.parse_by("120;RT")
{:ok, %{time: 120, mode: :return, trace: true}}
iex> Sovite.SMTP.Params.encode_by(%{time: 98, mode: :return, trace: false})
"98;R"
Summary
Types
BY: seconds left, and what to do when they run out.
HOLDFOR or HOLDUNTIL.
RRVS: the time, and what to do at a next hop without RRVS.
Functions
Encodes a BY value.
Encodes an RRVS value.
Formats a hold as in a DSN's Future-Release-Request: field (RFC 4865 §5).
Formats a time for HOLDUNTIL, RRVS, and the FUTURERELEASE keyword, in UTC.
Parses a BY value: by-time;by-mode[T]. With R, the time must be
positive.
Parses a HOLDFOR value: seconds, 1 to 999999999.
Parses a HOLDUNTIL value, an RFC 3339 date-time.
Parses an MT-PRIORITY value: (["-"] NZDIGIT) / "0".
Parses an RRVS value: a date-time without fractions of a second, then ;R or ;C.
The release time of a hold, for a message received at received_at.
Types
BY: seconds left, and what to do when they run out.
@type hold() :: {:for, pos_integer()} | {:until, DateTime.t()}
HOLDFOR or HOLDUNTIL.
@type rrvs() :: {DateTime.t(), :reject | :continue}
RRVS: the time, and what to do at a next hop without RRVS.
Functions
Encodes a BY value.
Encodes an RRVS value.
Formats a hold as in a DSN's Future-Release-Request: field (RFC 4865 §5).
@spec format_time(DateTime.t()) :: String.t()
Formats a time for HOLDUNTIL, RRVS, and the FUTURERELEASE keyword, in UTC.
Parses a BY value: by-time;by-mode[T]. With R, the time must be
positive.
@spec parse_holdfor(String.t()) :: {:ok, pos_integer()} | :error
Parses a HOLDFOR value: seconds, 1 to 999999999.
@spec parse_holduntil(String.t()) :: {:ok, DateTime.t()} | :error
Parses a HOLDUNTIL value, an RFC 3339 date-time.
@spec parse_priority(String.t()) :: {:ok, -9..9} | :error
Parses an MT-PRIORITY value: (["-"] NZDIGIT) / "0".
Parses an RRVS value: a date-time without fractions of a second, then ;R or ;C.
@spec release_time(hold(), DateTime.t()) :: DateTime.t()
The release time of a hold, for a message received at received_at.