Aggregate DMARC and TLS reports get a random hold of up to 3 hours before their first attempt (send_report, unchanged from upstream). Delivery time was measured from when a message was queued, so the hold counted as delivery time, and the console's delivery-time graph showed spikes of several hours.
Change
send_report records the hold in the message flags' top 14 bits (50-63; up to 16,383 s, and the hold is under 10,800 s). Helpers in queue/mod.rs: with_planned_hold, planned_hold, delivery_time.
Both Delivery Completed events in outbound/delivery.rs now report elapsed time as delivery_time(created, flags, now): from when the first attempt was due. That one value feeds the delivery-time histogram, the stored delivery.total-time metric (the dashboard and scheduled reports read it) and delivery history.
The hold itself and expiry are unchanged.
Why flag bits and not a new field: the stored queue format doesn't change. In a mixed-version cluster, an older node ignores the bits and measures from when the message was queued, as it does today; the console's flag list (registry/mapping/queued_message.rs) reads only the bits it knows. Messages already in the queue have no hold recorded and are measured as before. A test checks that the hold bits overlap no FROM_* flag, FROM_JOURNAL or smtp-proto MAIL_* flag.
The queue side of #517: no change. The console's queue list already has a Next Retry column, which for a held report is its planned send time, and the message's flags show Report. The queue-size chart still counts held reports, since they are in the queue.
Tests: 3 new unit tests (cargo test -p smtp --lib --features mail-auth/test planned_hold). cargo fmt --all --check and the notice check are clean.
Fixes #517.
Aggregate DMARC and TLS reports get a random hold of up to 3 hours before their first attempt (`send_report`, unchanged from upstream). Delivery time was measured from when a message was queued, so the hold counted as delivery time, and the console's delivery-time graph showed spikes of several hours.
**Change**
- `send_report` records the hold in the message flags' top 14 bits (50-63; up to 16,383 s, and the hold is under 10,800 s). Helpers in `queue/mod.rs`: `with_planned_hold`, `planned_hold`, `delivery_time`.
- Both `Delivery Completed` events in `outbound/delivery.rs` now report elapsed time as `delivery_time(created, flags, now)`: from when the first attempt was due. That one value feeds the delivery-time histogram, the stored `delivery.total-time` metric (the dashboard and scheduled reports read it) and delivery history.
- The hold itself and expiry are unchanged.
**Why flag bits and not a new field:** the stored queue format doesn't change. In a mixed-version cluster, an older node ignores the bits and measures from when the message was queued, as it does today; the console's flag list (`registry/mapping/queued_message.rs`) reads only the bits it knows. Messages already in the queue have no hold recorded and are measured as before. A test checks that the hold bits overlap no FROM_* flag, FROM_JOURNAL or smtp-proto MAIL_* flag.
**The queue side of #517:** no change. The console's queue list already has a Next Retry column, which for a held report is its planned send time, and the message's flags show Report. The queue-size chart still counts held reports, since they are in the queue.
**Tests:** 3 new unit tests (`cargo test -p smtp --lib --features mail-auth/test planned_hold`). `cargo fmt --all --check` and the notice check are clean.
jcoffey-dev
added this to the 27.1 milestone 2026-11-20 23:26:50 +00:00
Aggregate DMARC and TLS reports are queued with their first attempt at a
random time up to three hours later, so reports from every server don't
reach receivers at once. Delivery time was counted from when a message
was queued, so a report held for hours on purpose and sent on its first
try showed up as hours of delivery time: the console's delivery-time
graph spiked and its average read 18 minutes against 2 seconds per
attempt.
send_report now records the hold in the message's flags, in the top 14
bits (50-63), which no flag uses, and the delivery-completed event's
elapsed time counts from the end of the hold. That event feeds the
delivery-time histogram, the stored metric the dashboard and scheduled
reports read, and delivery history. The hold itself is unchanged.
Spare bits rather than a new field, so the stored queue format doesn't
change: a node that doesn't know them ignores them and measures as
before, and the console's flag list only reads the bits it knows.
Messages already queued carry no hold and are measured as before.
Reported on Discord (#inbuxa).
Fixes#517
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Fixes #517.
Aggregate DMARC and TLS reports get a random hold of up to 3 hours before their first attempt (
send_report, unchanged from upstream). Delivery time was measured from when a message was queued, so the hold counted as delivery time, and the console's delivery-time graph showed spikes of several hours.Change
send_reportrecords the hold in the message flags' top 14 bits (50-63; up to 16,383 s, and the hold is under 10,800 s). Helpers inqueue/mod.rs:with_planned_hold,planned_hold,delivery_time.Delivery Completedevents inoutbound/delivery.rsnow report elapsed time asdelivery_time(created, flags, now): from when the first attempt was due. That one value feeds the delivery-time histogram, the storeddelivery.total-timemetric (the dashboard and scheduled reports read it) and delivery history.Why flag bits and not a new field: the stored queue format doesn't change. In a mixed-version cluster, an older node ignores the bits and measures from when the message was queued, as it does today; the console's flag list (
registry/mapping/queued_message.rs) reads only the bits it knows. Messages already in the queue have no hold recorded and are measured as before. A test checks that the hold bits overlap no FROM_* flag, FROM_JOURNAL or smtp-proto MAIL_* flag.The queue side of #517: no change. The console's queue list already has a Next Retry column, which for a held report is its planned send time, and the message's flags show Report. The queue-size chart still counts held reports, since they are in the queue.
Tests: 3 new unit tests (
cargo test -p smtp --lib --features mail-auth/test planned_hold).cargo fmt --all --checkand the notice check are clean.