Follows a message through the logs, from the connection it came in on
to its final delivery, for sovitectl trace.
The message is named by its queue ID or its Message-ID. The trace
collects:
- the queue IDs of the message: those the
Message-IDwas accepted under (smtp.message.accepted), and the notifications sent about it (queue.notification.sent), which are traced too; - every line with one of those queue IDs;
- every line of the SMTP sessions they were received in (
session_id), such as the client's connection, login, and rejected commands.
Lines come back in log order. Files are read twice, so the queue IDs found in the first pass can pull in earlier session lines; standard input is read into memory once.
Summary
Functions
Traces id (a queue ID, or a Message-ID with or without its angle
brackets) through the log files at paths ("-" for standard input).
Returns the message's queue IDs and the log entries.
Functions
@spec run(String.t(), [Path.t()]) :: %{ queue_ids: [String.t()], entries: [Sovite.Core.LogReader.entry()] }
Traces id (a queue ID, or a Message-ID with or without its angle
brackets) through the log files at paths ("-" for standard input).
Returns the message's queue IDs and the log entries.