feat(panel): give a delivery its history and its own log lines
The delivery page was a list of the fields the send-log table has no column for, stacked one per line down the reading measure. Six values of a few characters each — domain, application, queue id, journal id and two timestamps — came to a page of mostly empty rows, and none of them answered the question the log raises when a row is opened: what actually happened to this message. So the page states that instead. The subject heads it and the sender, recipient and outcome are the line under it, which puts what the message was and how it ended on the first line. Below, two columns: what the journal recorded on the left, as a grid of tiles rather than a stack, and on the right the two timestamps stated as the steps they stand for — accepted and queued, then delivered, deferred, bounced, or refused before queueing. Each step carries its status in the panel's own ok/warn/error/unknown vocabulary, so a colour means here what it means on the status page. A message still queued shows the report it is waiting for as a step that has not happened, rather than dating it with the moment the row was written. Under both, at full width, the mail.log lines for the message's queue id. The queue id was printed on this page as something to go and search the system log for by hand; logtail.QueueLines does that search. It scans a bounded tail of the current file — finding one message's lines means reading rather than seeking — and anchors the match on the character before the id, since queue ids are hexadecimal runs and a shorter one is regularly the tail of a longer one. Send-log rows outlive mail.log (retention ninety days, rotation fourteen files), so a message with nothing left to show says so; that is the normal end state, not a fault, and only a log that cannot be read at all is reported as one. Two cards abreast and a block of raw log lines do not fit the reading measure, so the page now declares itself wide — the opposite of what it did when the column width was unified, where it was the page that stayed prose. The mechanism is unchanged and is why the reversal costs one line: how wide a page needs to be is the page's own property, not the navigation entry's. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -213,9 +213,13 @@ service healthy and will mail be accepted?"
|
||||
time, sender, recipient, subject and status `queued` (accepted, not yet
|
||||
delivered), `sent` (handed off successfully), or `rejected` (refused — for
|
||||
example by a level-2 rate limit); *Details* opens that row's own page
|
||||
(`/deliveries/{id}`) with the sending domain, the application it was
|
||||
submitted under, the Postfix queue id to search the system log for, and when
|
||||
the status was last reported. Retention is controlled by
|
||||
(`/deliveries/{id}`). That page carries the sending domain, the application it
|
||||
was submitted under, the Postfix queue id and the journal id, beside the
|
||||
message's history — when it was accepted and what Postfix later reported for
|
||||
the recipient — and, under both, the `mail.log` lines for its queue id: the
|
||||
connection to the receiving server, the server's reply, and the status that
|
||||
reply was filed as. Rows outlive `mail.log`, so an older message's lines may
|
||||
have rotated away; the page says so. Retention is controlled by
|
||||
`SEND_LOG_RETENTION_DAYS`.
|
||||
- **Mail queue** (`/mail-queue`) — live view of messages Postfix is still
|
||||
trying to deliver or deferring.
|
||||
|
||||
Reference in New Issue
Block a user