Relay: the InbuxaRelay route type, naming the relays to send through #264

Merged
jcoffey-dev merged 1 commits from relay/route into main 2026-10-30 19:59:19 +00:00
Owner

Adds the named route from relay spec RL-24, the last piece of step 4.

  • x:MtaRoute gains an InbuxaRelay type with relays: relay names to send through, or none for any. The queue's route expression picks it per recipient, so some domains can go through relays and the rest direct.
  • Only relays this node is linked to, enabled and not inboundOnly, matched by their current names (a rename doesn't restart the link). With none linked, recipients wait and the queue shows which relays they need.
  • With sendThrough on, recipients on an InbuxaRelay route keep their named relays; the rest go through any relay, as before.
  • Stored as the fourth variant, so existing routes read unchanged. The served schema and the privacy catalog have the new type, so the console's route form offers it.

Tested: unit tests for relay selection and the stored format; relay_link_tests (run locally, ignored in CI) now turns sendThrough off and checks a domain routed to the named relay reaches the scripted MX while one routed to a missing relay waits with the reason. smtp suite 78 passed; fmt, clippy on the touched files and the fork checks are clean.

Adds the named route from relay spec RL-24, the last piece of step 4. - `x:MtaRoute` gains an `InbuxaRelay` type with `relays`: relay names to send through, or none for any. The queue's `route` expression picks it per recipient, so some domains can go through relays and the rest direct. - Only relays this node is linked to, enabled and not `inboundOnly`, matched by their current names (a rename doesn't restart the link). With none linked, recipients wait and the queue shows which relays they need. - With `sendThrough` on, recipients on an `InbuxaRelay` route keep their named relays; the rest go through any relay, as before. - Stored as the fourth variant, so existing routes read unchanged. The served schema and the privacy catalog have the new type, so the console's route form offers it. Tested: unit tests for relay selection and the stored format; `relay_link_tests` (run locally, ignored in CI) now turns `sendThrough` off and checks a domain routed to the named relay reaches the scripted MX while one routed to a missing relay waits with the reason. smtp suite 78 passed; fmt, clippy on the touched files and the fork checks are clean.
jcoffey-dev added 1 commit 2026-10-30 19:14:23 +00:00
Relay: the InbuxaRelay route type, naming the relays to send through
ci / fork-checks (pull_request) Skipped
ci / build (pull_request) Skipped
github/ci (branch) GitHub Actions
ci / github (pull_request) Successful in 10m25s
c7cfdfccea
Outbound mail went through relays only with a relay's sendThrough on, and
then every non-local recipient did, through any relay. There was no way
to send some domains through relays and the rest direct, or to keep a
domain's mail on particular relays (relay spec, RL-24).

x:MtaRoute gains a fourth type, InbuxaRelay, with relays: the names of
the inbuxa:Relays to send through, or none for any. The queue's route
expression picks it per recipient like any other route. Its recipients
are handed to the relays named that this node is linked to, enabled and
not inboundOnly, in turn, by the names the relays have now (a rename
doesn't restart a link, so the names come from the registry, not the
link). With none of them linked, the recipients wait and say which
relays they are waiting for. With sendThrough on, a recipient whose route
is an InbuxaRelay route keeps the relays it names; the rest go through
any relay, as before.

The type is stored as the route's fourth variant, so routes saved before
read as they were. The served schema has the type, its relays field and
a form section, so the console's route form offers it, and the privacy
catalog lists it as holding no personal data.

Test: unit tests for the relays a route names (inboundOnly excluded, a
renamed relay matched by its new name) and for the stored format (a
Local route's bytes unchanged, the new one read back). The relay system
test now turns sendThrough off and routes one domain to a route naming
the relay, which sends it to the scripted MX, and another to a route
naming a relay that isn't there, which waits, saying so.
jcoffey-dev merged commit 9ebcbf93bd into main 2026-10-30 19:59:19 +00:00
jcoffey-dev deleted branch relay/route 2026-10-30 19:59:20 +00:00
Sign in to join this conversation.