relay: the Outbound queue #258

Merged
jcoffey-dev merged 1 commits from relay/outbound-queue into main 2026-10-30 15:09:12 +00:00
Owner

The first part of step 4, outbound: the relay can take mail to send, but doesn't send it yet.

  • Outbound/set create takes an uploaded message and its envelope. The upload moves into spool/out/, so it can't be used twice. Each recipient starts out queued.
  • RL-19 / RL-T10: a sender outside the relay's domains is refused with forbiddenFrom. A create is also refused as tooLarge (size or recipient count), overQuota when the spool is full, and invalidProperties for a bad address, a duplicate recipient, or an SMTP parameter that could break the command line.
  • Outbound/get and /changes, with push. Destroy cancels a queued message or clears a finished one. No update: only the relay sets status.
  • The spool survives a restart, and an uncommitted message is deleted at start, as on the inbound side. The inbound spool's change log is now shared with it.
  • status.spool.outbound is filled in, the spool-full check counts both directions, and inbuxa-relay status shows the outbound count.
  • Spec: size added to Outbound, the create rules written down, and the status section updated.

Not in this PR: delivery (shared DANE/MTA-STS crate, then the relay's sender), and the downstream handing mail over (inbuxaRelay route).

Tests: new unit tests for the outbound spool and the envelope rules. The relay's end-to-end test now uploads, creates, gets, refuses a foreign sender, refuses a reused upload and an update, and destroys. system::relay::relay_link_tests still passes. fmt, clippy and the fork checks are clean.

The first part of step 4, outbound: the relay can take mail to send, but doesn't send it yet. - `Outbound/set` create takes an uploaded message and its envelope. The upload moves into `spool/out/`, so it can't be used twice. Each recipient starts out `queued`. - RL-19 / RL-T10: a sender outside the relay's domains is refused with `forbiddenFrom`. A create is also refused as `tooLarge` (size or recipient count), `overQuota` when the spool is full, and `invalidProperties` for a bad address, a duplicate recipient, or an SMTP parameter that could break the command line. - `Outbound/get` and `/changes`, with push. Destroy cancels a queued message or clears a finished one. No update: only the relay sets status. - The spool survives a restart, and an uncommitted message is deleted at start, as on the inbound side. The inbound spool's change log is now shared with it. - `status.spool.outbound` is filled in, the spool-full check counts both directions, and `inbuxa-relay status` shows the outbound count. - Spec: `size` added to `Outbound`, the create rules written down, and the status section updated. Not in this PR: delivery (shared DANE/MTA-STS crate, then the relay's sender), and the downstream handing mail over (`inbuxaRelay` route). Tests: new unit tests for the outbound spool and the envelope rules. The relay's end-to-end test now uploads, creates, gets, refuses a foreign sender, refuses a reused upload and an update, and destroys. `system::relay::relay_link_tests` still passes. fmt, clippy and the fork checks are clean.
jcoffey-dev added 1 commit 2026-10-30 13:33:35 +00:00
relay: the Outbound queue
ci / fork-checks (pull_request) Skipped
ci / build (pull_request) Skipped
github/ci (branch) GitHub Actions
ci / github (pull_request) Successful in 9m46s
21d16fc150
Outbound/set create takes an uploaded message and its envelope, refuses a
sender outside the relay's domains (RL-19, RL-T10), and spools it in
spool/out/ with a queued status for each recipient. Outbound/get and
/changes report it, with push, and destroy cancels or clears one. The
inbound spool's change log is shared with it. Delivery is the next step.
jcoffey-dev merged commit e14fc5f800 into main 2026-10-30 15:09:12 +00:00
jcoffey-dev deleted branch relay/outbound-queue 2026-10-30 15:09:12 +00:00
Sign in to join this conversation.