Reads the queue directory for sovitectl queue and the admin API:
lists of queued messages, and the details of one. Everything returned
is plain maps, strings, and numbers, ready to be encoded as JSON.
It only reads files, so it works whether or not the MTA runs. The
messages are read without checking their checksums; a file that cannot
be read at all is listed with an error.
Summary
Functions
The number of messages in each queue.
The messages in queues (by default all), oldest first
The queue message id is in, or nil.
The details of message id: its summary, the rest of its envelope
(client, HELO name, protocol, login, extension parameters), each
recipient's status and last reply, and the message's header section
(headers, at most 64 KiB) with its message_id and subject.
Functions
@spec counts(Path.t()) :: %{required(Sovite.Queue.Spool.queue()) => non_neg_integer()}
The number of messages in each queue.
The messages in queues (by default all), oldest first:
queue_id,queue,size(bytes),received_at,senderrecipients- how many, andpending, those not delivered yetattempts,next_attempt, andreason, the last error of a pending recipientpriority, andrelease_atfor a message on hold forFUTURERELEASE
Options: :queues, and :limit, the most messages returned.
@spec locate(Path.t(), String.t()) :: Sovite.Queue.Spool.queue() | nil
The queue message id is in, or nil.
@spec queues() :: [Sovite.Queue.Spool.queue()]
The queues list/2 can list.
The details of message id: its summary, the rest of its envelope
(client, HELO name, protocol, login, extension parameters), each
recipient's status and last reply, and the message's header section
(headers, at most 64 KiB) with its message_id and subject.