Repository navigation
dir-sim: a group's secondary SMTP proxies deliver to the group - #1483
Conversation
Exchange delivers mail sent to any of a distribution group's SMTP proxies, but the address space read a group by its primary address only: mail to a group's secondary proxy resolved to no one. rows_over now adds each live, observed group's secondary SMTP proxies, so address_owner and address_recipient answer the group, and validate's address rules see the same rows (Exchange refuses an address another object holds). provisioning_conflicts read the group proxies in a loop of its own; that loop is now part of rows_over, so the two planes keep one definition of a group's claims. The provisioning plane is otherwise unchanged. Behaviour change, pinned both ways: mail_to_a_groups_secondary_proxy_ reaches_the_group (red before: Ok(None)); a_groups_secondary_proxy_ claims_its_address now expects an AddressConflict where it pinned the user as owner, since the user and the group share the key. Board: D-DSV-1 shipped (#1477, #1480); D-DSV-2 added. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reachedYour organization has reached its usage spending cap. Adjust your spending cap in the billing tab. Next included review available in 41 minutes. View limit details
Warning Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8dfd6f2d35
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
A group with no primary SMTP address is not mail-enabled (View::is_mail_recipient), so it holds and receives at nothing in Exchange. The previous commit added every live group's secondary proxies to the Exchange address space, so a stale proxy on such a group took the address away from a user who legitimately holds it (AddressConflict). rows_over takes every_group_proxy: the Exchange rows (address_owner, address_recipient, validate) keep a group's secondary proxies only when the group has a primary SMTP address; the provisioning plane keeps every present group's, since Entra keeps proxy addresses unique whatever the object. Test: a_non_mail_enabled_groups_proxy_is_only_a_provisioning_claim (red before: AddressConflict where the user owns and receives the address; the provisioning conflict is still reported). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
What
Exchange delivers mail sent to any of a distribution group's SMTP proxies. dir-sim's address space read a group by its primary address only, so mail to a group's secondary proxy resolved to no one.
rows_overnow adds each mail-enabled, observed group's secondary SMTP proxies to the Exchange address space. A mail-enabled group is one with a primary SMTP address, which is whatView::is_mail_recipientchecks. A group without one claims its proxies only in the provisioning plane, so a stale proxy cannot take an address away from a user who legitimately holds it:address_ownerandaddress_recipientanswer the group for a secondary proxy.validate's address rules read the same rows, because Exchange refuses an address another object holds, whatever kind that object is.Changesets none), so only observed groups contribute these rows.provisioning_conflictsread group proxies in a loop of its own. That loop now lives inrows_over, so the delivery and provisioning planes share one definition of a group's claims. The provisioning results are unchanged.This is a delivery-fidelity fix. The lookup does not grow to serve validation.
Behaviour change, pinned both ways
mail_to_a_groups_secondary_proxy_reaches_the_group(new): a group's secondary proxy is held by the group and delivers to it, and validation stays empty. Before the fix it failed withOk(None).a_groups_secondary_proxy_claims_its_address(re-pinned): a user and a group both carryingsales@x.testshare the key.address_ownerandaddress_recipientnow returnAddressConflictlisting both holders, where this test used to pin the user as owner. This matches how dir-sim already treats every other shared key: no holder is chosen. The test comment records the old expectation.a_non_mail_enabled_groups_proxy_is_only_a_provisioning_claim(new, after Codex P1): a group with no primary address has a stale proxy that a user also holds. The user owns and receives the address, and the provisioning conflict is still reported. Before the gate it failed withAddressConflict.Disable run: with the new rows removed, both of the first two tests fail and nothing else does. With the mail-enabled gate forced open, only the third test fails.
Checks
cargo +1.99.0 fmt --check,clippy --all-targets -D warningsandcargo test(233 passed, 0 failed) pass onlance-graph-dir-sim. The supersession index is current.Board: D-DSV-1 marked shipped (#1477, #1480); D-DSV-2 added.
Downstream: Stalwart's dir-sim backend and Spear call
address_recipient, so a group's secondary address now resolves to the group's list there too. Stalwart's dir-sim CI builds against lance-graph main.🤖 Generated with Claude Code
https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
Generated by Claude Code