The relay link service built its Server once per connection, and Server holds a core snapshot, so every relayed message was judged with the settings from when the link connected. A reload after a registry write (directory/mailbox filter, stage rules, spam filter, sender auth, ...) didn't reach relayed mail until the link reconnected, usually a restart. Reported in forum t/259.
Taker::take: each Job gets self.server.inner.build_server().
session(): the loop builds a fresh Server each pass, so sync, events and outbound statuses see current settings too.
Test:relay_link_tests lowers maxReceivedHeaders to 3 with the link up, then a relayed message with five Received headers must get 450 4.4.6; set back to 50, the same message is delivered. Run against main's link service the first assertion fails (250 2.0.0 Accepted), with the fix it passes.
Local:relay_link_tests and relay_tests each pass (run alone; run back to back in one process, relay_tests fails at keysWrapped because the link test leaves the relay key file set process-wide at relay.rs:1670, an existing test-ordering issue, not this change). cargo fmt --all --check, clippy on services, fork checks clean.
Fixes #366.
The relay link service built its `Server` once per connection, and `Server` holds a core snapshot, so every relayed message was judged with the settings from when the link connected. A reload after a registry write (directory/mailbox filter, stage rules, spam filter, sender auth, ...) didn't reach relayed mail until the link reconnected, usually a restart. Reported in forum t/259.
- `Taker::take`: each `Job` gets `self.server.inner.build_server()`.
- `session()`: the loop builds a fresh `Server` each pass, so sync, events and outbound statuses see current settings too.
**Test:** `relay_link_tests` lowers `maxReceivedHeaders` to 3 with the link up, then a relayed message with five Received headers must get `450 4.4.6`; set back to 50, the same message is delivered. Run against main's link service the first assertion fails (`250 2.0.0 Accepted`), with the fix it passes.
**Local:** `relay_link_tests` and `relay_tests` each pass (run alone; run back to back in one process, `relay_tests` fails at `keysWrapped` because the link test leaves the relay key file set process-wide at relay.rs:1670, an existing test-ordering issue, not this change). `cargo fmt --all --check`, clippy on services, fork checks clean.
The relay link service built its Server once per connection, and a
Server holds a snapshot of the core. Every relayed message was judged
through that snapshot, so a reload after a registry write (a domain's
directory and its mailbox filter, RCPT/DATA stage rules, the spam
filter, sender authentication) didn't reach mail arriving through a relay
until the link reconnected, usually at a restart. Mail on port 25 used
the new settings at once, so the two paths disagreed.
Each relayed message is now judged with a Server built from the shared
core when it's taken, and the link loop refreshes its Server on every
pass, so sync, events and outbound statuses see current settings too.
Test: relay_link_tests lowers maxReceivedHeaders to 3 with the link up,
and the next relayed message with five Received headers is refused with
450 4.4.6; set back to 50, the same message is delivered. Without the
fix the first one was accepted (250).
Fixes#366
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Fixes #366.
The relay link service built its
Serveronce per connection, andServerholds a core snapshot, so every relayed message was judged with the settings from when the link connected. A reload after a registry write (directory/mailbox filter, stage rules, spam filter, sender auth, ...) didn't reach relayed mail until the link reconnected, usually a restart. Reported in forum t/259.Taker::take: eachJobgetsself.server.inner.build_server().session(): the loop builds a freshServereach pass, so sync, events and outbound statuses see current settings too.Test:
relay_link_testslowersmaxReceivedHeadersto 3 with the link up, then a relayed message with five Received headers must get450 4.4.6; set back to 50, the same message is delivered. Run against main's link service the first assertion fails (250 2.0.0 Accepted), with the fix it passes.Local:
relay_link_testsandrelay_testseach pass (run alone; run back to back in one process,relay_testsfails atkeysWrappedbecause the link test leaves the relay key file set process-wide at relay.rs:1670, an existing test-ordering issue, not this change).cargo fmt --all --check, clippy on services, fork checks clean.