Parent
#1
What to build
A return that arrives in a polled mailbox is matched back to the message that caused it, and the outcome is recorded on that message's log row and announced.
Two kinds of return matter, and they share all of their matching machinery while meaning opposite things — which is why they are one ticket rather than two:
- A delivery report says an address could not be reached. Permanent (
5.x.x) is a failure worth acting on. Transient (4.x.x) is recorded and nothing more — the sending infrastructure retries on its own for hours, and a permanent report would follow if it ultimately fails. Reacting to transient reports manufactures alarms that resolve themselves, and teaches whoever reads them to stop reading them.
- An auto-reply says a mailbox accepted the message but nobody is reading it. It is recorded and never changes delivery state in either direction — not failed, which is untrue, and not delivered, which cannot be proven from the sending side at all.
Matching uses the identifiers minted at send time: the identifier read back from the provider's sent copy, and the self-assigned correlation header as a second key. Two keys because a report carries the original headers usually rather than always. A return that matches nothing is recorded as unmatched and kept — it is evidence, and silently dropping it hides both bugs and genuine traffic.
A report names a recipient address, not a message: a mail to three addresses that fails for one is a failure for that address. The recorded outcome is per address.
This package interprets and correlates. What a failure means for a business document is announced as an event and decided elsewhere.
Acceptance criteria
Blocked by
Parent
#1
What to build
A return that arrives in a polled mailbox is matched back to the message that caused it, and the outcome is recorded on that message's log row and announced.
Two kinds of return matter, and they share all of their matching machinery while meaning opposite things — which is why they are one ticket rather than two:
5.x.x) is a failure worth acting on. Transient (4.x.x) is recorded and nothing more — the sending infrastructure retries on its own for hours, and a permanent report would follow if it ultimately fails. Reacting to transient reports manufactures alarms that resolve themselves, and teaches whoever reads them to stop reading them.Matching uses the identifiers minted at send time: the identifier read back from the provider's sent copy, and the self-assigned correlation header as a second key. Two keys because a report carries the original headers usually rather than always. A return that matches nothing is recorded as unmatched and kept — it is evidence, and silently dropping it hides both bugs and genuine traffic.
A report names a recipient address, not a message: a mail to three addresses that fails for one is a failure for that address. The recorded outcome is per address.
This package interprets and correlates. What a failure means for a business document is announced as an event and decided elsewhere.
Acceptance criteria
Blocked by