Delivery-time graph counts the planned hold on aggregate reports as delivery time #517

Closed
opened 2026-11-20 23:19:35 +00:00 by jcoffey-dev · 1 comment
Owner

Reported on Discord (#inbuxa, faisal, 2026-11-20): outbound DMARC reports sit in the queue for hours with no earlier attempt and no 4xx, then go out on the first try, and the console's delivery-time graph shows multi-hour spikes (peaks around 2.5 h, an 18 min average against 2 s per attempt).

Cause: a deliberate hold, counted as delivery time.

  • send_report (crates/smtp/src/reporting/send.rs) queues each aggregate report (DMARC, dmarc.rs:490; TLS-RPT, tls.rs:242, both deliver_now = false) with its first attempt at a random time up to 3 hours later (random_range(0..10800), unchanged from upstream). That spreads reports out so they don't all reach receivers at once, and it's fine to keep. Failure reports (DMARC/SPF/DKIM) go out at once.
  • The delivery-time figure is Delivery Completed's Elapsed, now() - message.created (crates/smtp/src/outbound/delivery.rs), so the hold is counted as delivery time. The queue-size chart also counts these reports while they wait.

Mail delivery is fine; the dashboard reads a scheduled hold as slow delivery.

Wanted

  • Delivery time leaves out the planned hold: count scheduled reports from their first scheduled attempt rather than from when they were queued, or keep them out of the figure.
  • In the queue, a held report says it's a scheduled report and when it's due, so it doesn't look stuck (console queue view, if it doesn't already show the first attempt time).
  • No change to the hold itself.
Reported on Discord (#inbuxa, faisal, 2026-11-20): outbound DMARC reports sit in the queue for hours with no earlier attempt and no 4xx, then go out on the first try, and the console's delivery-time graph shows multi-hour spikes (peaks around 2.5 h, an 18 min average against 2 s per attempt). **Cause: a deliberate hold, counted as delivery time.** - `send_report` (`crates/smtp/src/reporting/send.rs`) queues each aggregate report (DMARC, `dmarc.rs:490`; TLS-RPT, `tls.rs:242`, both `deliver_now = false`) with its first attempt at a random time up to 3 hours later (`random_range(0..10800)`, unchanged from upstream). That spreads reports out so they don't all reach receivers at once, and it's fine to keep. Failure reports (DMARC/SPF/DKIM) go out at once. - The delivery-time figure is `Delivery Completed`'s `Elapsed`, `now() - message.created` (`crates/smtp/src/outbound/delivery.rs`), so the hold is counted as delivery time. The queue-size chart also counts these reports while they wait. Mail delivery is fine; the dashboard reads a scheduled hold as slow delivery. **Wanted** - Delivery time leaves out the planned hold: count scheduled reports from their first scheduled attempt rather than from when they were queued, or keep them out of the figure. - In the queue, a held report says it's a scheduled report and when it's due, so it doesn't look stuck (console queue view, if it doesn't already show the first attempt time). - No change to the hold itself.
jcoffey-dev added this to the 27.1 milestone 2026-11-20 23:19:35 +00:00
jcoffey-dev added the bug
priority
p3
labels 2026-11-20 23:19:35 +00:00
jcoffey-dev self-assigned this 2026-11-20 23:21:45 +00:00
Author
Owner

Fixed in #518. Each aggregate report's planned hold is now recorded on the queued message, and delivery time counts from the end of the hold, so the delivery-time graph, the stored delivery metric and delivery history no longer include it. The hold itself is unchanged. The queue's Next Retry column already shows when a held report will go out.

Ships in 27.1-rc.38. Reports already queued when you update still count their hold until they go out, at most 3 hours.

Fixed in #518. Each aggregate report's planned hold is now recorded on the queued message, and delivery time counts from the end of the hold, so the delivery-time graph, the stored delivery metric and delivery history no longer include it. The hold itself is unchanged. The queue's Next Retry column already shows when a held report will go out. Ships in 27.1-rc.38. Reports already queued when you update still count their hold until they go out, at most 3 hours.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: inbuxa/inbuxa-server#517