delivery-log-storage: a message's page reads its stored lines
The Delivery log box on a message's page was filled by searching the current
mail.log on every view; that file is rotated daily, so the box was empty for
anything not sent today. deliveryLog now asks the store for the row's lines -
its queue id, dated within the row's queue lifetime plus a day
(RetryPolicy.LongestLifetime) - and shows the latest 200, oldest first.
When nothing is stored the page still searches the current file, which is
what shows a message accepted before 2.2.0. When that finds nothing either,
the note no longer blames rotation for the ordinary case: it says lines are
kept with the row since 2.2.0. The Outbound log help topic in help.go follows
the mockup changed in fc184ec, word for word.
Checked on Windows: go vet clean; go test ./internal/web/... ./internal/postfix
./internal/store pass, the guards among them. New test: lines shown from the
table when mail.log holds none of them, without another queue id's lines and
without those of an earlier message under the same id.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+13
-2
@@ -17,8 +17,19 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); version
|
||||
the tailer reads it; after an unclean stop a line read twice is stored once.
|
||||
Lines whose queue id has no send-log row - the row was pruned, or the
|
||||
message never had one (inbound relay mail, bounces) - are deleted once they
|
||||
are an hour old, with every send-log sweep and hourly between. No page reads
|
||||
them yet.
|
||||
are an hour old, with every send-log sweep and hourly between.
|
||||
|
||||
### Changed
|
||||
|
||||
- **A message's page keeps its delivery log after `mail.log` rotates.** The
|
||||
*Delivery log* box on Outbound › Log › a message was filled by searching
|
||||
the current `mail.log`, which is rotated daily, so it was empty for anything
|
||||
not sent today while the row itself lives for ninety days. The page now
|
||||
reads the lines the tailer stored: they are there for as long as the row
|
||||
is. Postfix reuses queue ids, so a row is given only the lines dated within
|
||||
its own queue lifetime. A message accepted before this version shows its
|
||||
lines only while they are still in the current file, as before; the note
|
||||
shown when there are none and the *Outbound log* help topic say so.
|
||||
|
||||
## [2.1.0] - 2026-10-12
|
||||
|
||||
|
||||
Reference in New Issue
Block a user