Contains fixes for three ways live mail could be destroyed, one of which
was observed in production on 2026-08-27. Deploying this is what allows
storage.blob_gc to be returned to "on"; until then the running config
must stay at "dryrun", and note that dryrun does NOT protect the
quarantine deletion paths.
Data loss
- Blob GC never counted the on-disk spool. A blob referenced only by a
spool envelope -- quarantined mail awaiting review, or anything
deferred past the one-hour grace -- was reclaimed while the envelope
survived. Observed symptom: an outbound forward failing with "blob not
found", because deliver.go reuses the spool envelope's BlobHash when
it enqueues a forward. Content in that state is unrecoverable.
- Quarantine deletion destroyed other users' mail. Blobs are
content-addressed and shared, so quarantined spam has the same hash as
any byte-identical copy delivered elsewhere -- the normal case for a
broadcast message. All three paths did it, including the unattended
hourly auto-purge, which no configuration setting disables.
- Queue retry, bounce and retry-now were two Raft commands each: delete
the old key, put the new one. A crash or rejection between them left
the message at neither key. Now one composite command applied in a
single Pebble batch.
Security and correctness
- The Global Address List could not be scoped: any authenticated user
could enumerate every address of every tenant through compose
autocomplete. Now restricted to the caller's own domain.
- IMAP EXAMINE was not read-only. STORE, EXPUNGE and MOVE all mutated a
mailbox the client had been told was read-only; MOVE emptied it.
- CalDAV/CardDAV ignored If-Match and If-None-Match entirely, so
concurrent edits silently last-write-wins. ETags were also
second-resolution, which had to be fixed first or the preconditions
would have protected nothing.
- Mixed permanent and transient relay outcomes re-sent to and re-bounced
permanently-failed recipients on every attempt, up to ten duplicate
DSNs per address.
Other
- Received mail bodies are now indexed, so body search works for mail
you received and not only mail you sent.
- Tagging a message no longer deletes its indexed body.
- Calendar events with an unparseable RRULE are shown as a single
occurrence rather than vanishing from every view.
Tests
Around 60 tests added, each verified to fail against the defect it
covers. Includes the DAV cross-account scoping suite, which had no
coverage at all, and replaces two tests that asserted nothing.