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
1 Commits
Author SHA1 Message Date
jcoffey-dev c7cfdfccea 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
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.
2026-10-30 12:14:04 -07:00