Tested and written with AI help.
Stalwart v1.1.0 (e7cde9b), official release binary, S3-compatible blob store (Backblaze B2 in production; local mock S3 for the repro).
What happens: when a user Sieve script runs redirect (or vacation) during local delivery, the generated message goes through queue_message (crates/smtp/src/outbound/local.rs:180-191). If the blob write fails, spool.rs:552-559 returns QueueOutcome::Failed without creating a queue entry, and the caller only checks for QuotaExceeded. The original is delivered and the sender gets 250, so the redirected copy (or vacation reply) is gone: no queue entry, no retry, no DSN. The same check is in crates/smtp/src/scripts/event_loop.rs:617.
In production this happens because an S3 PUT that times out is not retried (topic 2221): during an import we had 16 PUT timeouts in an hour across 3 nodes.
Repro: separate v1.1.0 instance, blob store S3 pointed at a local mock, timeout 5000 ms, maxRetries 3, verifyAfterWrite true. Account a@ has require ["copy"]; redirect :copy "[email protected]"; (and, separately, a vacation script). Fault = mock reads the PUT body, waits 8 s, closes the socket without replying, only for the redirect/vacation PUT.
| Run | Fault | SMTP reply to sender | S3 PUTs for the copy | a@ (original) | Copy | Queue after 3 min |
|---|---|---|---|---|---|---|
| Control | none | 250 | 1, 200 | delivered | b@ received | empty |
| Redirect 1 | redirect PUT stalls | 250 | 1, timed out | delivered | not received | empty |
| Redirect 2 | same | 250 | 1, timed out, no further PUT | delivered | not received | empty |
| Vacation control | none | 250 | 1, 200 | delivered | reply received | empty |
| Vacation 1 | reply PUT stalls | 250 | 1, timed out | delivered | no reply | empty |
Log (redirect 1; addresses are test addresses):
2026-11-12T20:33:08Z INFO Sieve sending message (sieve.send-message) queueId = 340232688799581184, queueName = "local", total = 1, from = "[email protected]", to = ["[email protected]"], size = 1145
2026-11-12T20:33:13Z ERROR S3 error (store.s3-error) queueId = 340232688799581184, queueName = "local", from = "[email protected]", to = ["[email protected]"], size = 1145, total = 1, reason = "S3 request failed: ... operation timed out", causedBy = "crates/store/src/dispatch/blob.rs:175", details = "Failed to write blob.", causedBy = "crates/smtp/src/queue/spool.rs:556"
2026-11-12T20:33:13Z DEBUG DSN success notification (delivery.dsn-success) ... to = "[email protected]", code = 250
2026-11-12T20:33:13Z DEBUG Delivery completed (delivery.completed) ... to = ["[email protected]"], elapsed = 5000ms
The only trace is a generic store.s3-error carrying the original’s queueId and envelope; it never names the redirect target, and the preceding INFO sieve.send-message (emitted before queueing, crates/email/src/sieve/ingest.rs:316) reads as if the copy was sent.
Expected: a failed queue for a redirect/vacation either fails the local delivery temporarily (like a failed fileinto, crates/email/src/sieve/ingest.rs:824-854) so the sender retries, or is retried on its own, or at least emits a Sieve event naming the lost recipient.
Question: is ignoring Failed here deliberate? With :copy the local copy is already stored, so retrying the whole delivery would duplicate it; a separate retry for the generated message, or a 4xx when nothing was stored locally yet, would avoid the silent loss.