feat: add durable mail delivery outbox
This commit is contained in:
@@ -82,10 +82,20 @@ effect.
|
||||
|
||||
### Provider outcomes
|
||||
|
||||
SMTP acceptance, recipient refusal, temporary/permanent failure, connection
|
||||
loss, and unknown outcome are distinct. IMAP append is a separate operation and
|
||||
outcome. Mail returns a sanitized transport result; the consuming domain owns
|
||||
the durable business job and its retry/reconciliation semantics.
|
||||
SMTP acceptance, partial or complete recipient refusal, temporary/permanent
|
||||
failure, connection loss, and unknown outcome are distinct. IMAP append is a
|
||||
separate operation and outcome. Ordinary Campaign recipient delivery retains
|
||||
its Campaign-owned job ledger. Mail owns an encrypted durable command and
|
||||
attempt ledger for report delivery and other effects that do not have such a
|
||||
consumer ledger.
|
||||
|
||||
The Mail worker commits an attempt before it starts SMTP and then commits an
|
||||
effect-start marker before opening the provider effect. Worker redelivery may
|
||||
recover a stale pre-effect claim, but an accepted, partially accepted,
|
||||
in-progress-after-effect, or unknown command is never sent automatically.
|
||||
Unknown outcomes require a separately authorized reconciliation with an
|
||||
external evidence reference. A deliberate resend creates a new command with a
|
||||
new idempotency key and links it to the prior command.
|
||||
|
||||
## User tasks
|
||||
|
||||
@@ -354,11 +364,11 @@ Security invariants:
|
||||
Credential replacement/deletion emits canonical non-secret Mail audit events.
|
||||
Profile/policy create/update/deactivate currently emits change-feed evidence,
|
||||
but connection tests and the complete administrative lifecycle do not yet have
|
||||
equivalent canonical audit events. Consumer send/retry/reconciliation evidence
|
||||
belongs primarily to the consuming module today. A Mail-owned restricted
|
||||
provider-attempt ledger with correlation, retention, and unknown-outcome
|
||||
reconciliation remains part of the durable outbox work in
|
||||
[`govoplan-mail#17`](https://git.add-ideas.de/GovOPlaN/govoplan-mail/issues/17).
|
||||
equivalent canonical audit events. Mail delivery commands emit request,
|
||||
terminal-outcome, reconciliation, and deliberate-resend events without
|
||||
addresses or raw provider responses. MIME, envelope addresses, detailed
|
||||
refusals, and reconciliation notes are encrypted and minimized after their
|
||||
retention deadline while hashes, counts, attempts, and decisions remain.
|
||||
|
||||
## Acceptance checklist
|
||||
|
||||
|
||||
Reference in New Issue
Block a user