From e09e0a63ef9cef76e9bce9cca5dd1a855f8d9c9b Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 10 Oct 2026 11:27:04 +0000 Subject: [PATCH 1/3] ogar-dir-sim: mail is the user's licence plate; it follows the user, not the mailbox Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg --- crates/ogar-dir-sim/src/violation.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/crates/ogar-dir-sim/src/violation.rs b/crates/ogar-dir-sim/src/violation.rs index 866648c9..3c7e60ac 100644 --- a/crates/ogar-dir-sim/src/violation.rs +++ b/crates/ogar-dir-sim/src/violation.rs @@ -25,9 +25,10 @@ pub enum AddressRole { PrimarySmtp, /// A secondary SMTP proxy (`smtp:`). SecondarySmtp, - /// The `mail` attribute: the licence plate. It is shown in the address - /// book and used inside messages, and it matters, but it is a label: - /// not the identity of the mailbox or the user (identity is read by + /// The `mail` attribute: the licence plate on the user object. It is + /// shown in the address book and used inside messages, and it follows + /// the user, not the mailbox or the recipient. It matters, but it is a + /// label: not the identity of the mailbox or the user (identity is read by /// GUID, [`ExchangeIdentity`](crate::exchange::ExchangeIdentity)), not an /// address anything is received at, and not provisioned. Exchange does /// not reserve it, so it never makes an object a holder in From bbbd0a754c0b91beb33d06fbbf9fa7716bb4b591 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 10 Oct 2026 11:28:43 +0000 Subject: [PATCH 2/3] ogar-dir-sim: mail is a business-card property of the user; PrimarySmtpAddress identifies the recipient mail is a property on the user's business card, like the telephone number: shown in the address book and used inside messages, it follows the user rather than the mailbox, and is not identity. The recipient's identity is its PrimarySmtpAddress; the provisioned mailbox is identified by its ExchangeGuid; ExternalDirectoryObjectId links the mailbox to its Entra user. Replaces the 'licence plate' wording. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg --- crates/ogar-dir-sim/src/exchange.rs | 12 ++++++------ crates/ogar-dir-sim/src/violation.rs | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/crates/ogar-dir-sim/src/exchange.rs b/crates/ogar-dir-sim/src/exchange.rs index 365cfae4..4502449e 100644 --- a/crates/ogar-dir-sim/src/exchange.rs +++ b/crates/ogar-dir-sim/src/exchange.rs @@ -342,17 +342,17 @@ impl Recipient { /// `ExchangeGuid` across a move) and the address it receives at /// (`PrimarySmtpAddress`). /// -/// Identities are GUIDs: `node` is the on-premises object, and a -/// provisioned mailbox is identified by its `exchange_guid`. The user is the +/// The recipient is identified by its `PrimarySmtpAddress` (`primary_smtp`); +/// `node` is the on-premises object, and a provisioned mailbox is +/// identified by its `exchange_guid`. The user is the /// Entra object (Azure AD, formerly the MsolUser), which carries /// `{alias}@{tenant}.onmicrosoft.com`, Microsoft's internal cloud address. /// Every mail recipient links its mailbox to that user through /// `ExternalDirectoryObjectId` — "external" because it points into the /// directory outside Exchange. None of these is the routing address /// `{alias}@{tenant}.mail.onmicrosoft.com` ([`ROUTING`]), the external -/// target EOP delivers to. An address is a value of an identity, -/// never the key it is found by, and `mail` in particular is a label that -/// hydrates no identity. +/// target EOP delivers to. `mail` is a property on the user's business card, +/// like the telephone number, and hydrates no identity. #[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct ExchangeIdentity { /// The object (`objectGUID`). @@ -361,7 +361,7 @@ pub struct ExchangeIdentity { pub recipient: Option, /// `msExchMailboxGuid`; `None` = no mailbox, or not read. pub exchange_guid: Option, - /// `PrimarySmtpAddress`. + /// `PrimarySmtpAddress`: the recipient's identity. pub primary_smtp: Option, } diff --git a/crates/ogar-dir-sim/src/violation.rs b/crates/ogar-dir-sim/src/violation.rs index 3c7e60ac..8f156d9a 100644 --- a/crates/ogar-dir-sim/src/violation.rs +++ b/crates/ogar-dir-sim/src/violation.rs @@ -25,11 +25,11 @@ pub enum AddressRole { PrimarySmtp, /// A secondary SMTP proxy (`smtp:`). SecondarySmtp, - /// The `mail` attribute: the licence plate on the user object. It is - /// shown in the address book and used inside messages, and it follows - /// the user, not the mailbox or the recipient. It matters, but it is a - /// label: not the identity of the mailbox or the user (identity is read by - /// GUID, [`ExchangeIdentity`](crate::exchange::ExchangeIdentity)), not an + /// The `mail` attribute: a property on the user's business card, like + /// the telephone number. It is shown in the address book and used inside + /// messages, and it follows the user, not the mailbox or the recipient. + /// It is not the recipient's identity (that is `PrimarySmtpAddress`; see + /// [`ExchangeIdentity`](crate::exchange::ExchangeIdentity)), not an /// address anything is received at, and not provisioned. Exchange does /// not reserve it, so it never makes an object a holder in /// [`Violation::AddressConflict`]. This holds as long as AD Connect does From e4205694e50b14f6996f7143f95c3ff3b021f248 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 10 Oct 2026 11:32:04 +0000 Subject: [PATCH 3/3] ogar-dir-sim: ExchangeGuid is the immutable mailbox identity; PrimarySmtpAddress identifies the recipient implicitly and can change Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg --- crates/ogar-dir-sim/src/exchange.rs | 10 ++++++---- crates/ogar-dir-sim/src/violation.rs | 3 ++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/crates/ogar-dir-sim/src/exchange.rs b/crates/ogar-dir-sim/src/exchange.rs index 4502449e..06a71c89 100644 --- a/crates/ogar-dir-sim/src/exchange.rs +++ b/crates/ogar-dir-sim/src/exchange.rs @@ -342,9 +342,10 @@ impl Recipient { /// `ExchangeGuid` across a move) and the address it receives at /// (`PrimarySmtpAddress`). /// -/// The recipient is identified by its `PrimarySmtpAddress` (`primary_smtp`); -/// `node` is the on-premises object, and a provisioned mailbox is -/// identified by its `exchange_guid`. The user is the +/// A provisioned mailbox's immutable identity is its `exchange_guid`; +/// `PrimarySmtpAddress` (`primary_smtp`) identifies the recipient +/// implicitly, as a string, and can change; `node` is the on-premises +/// object. The user is the /// Entra object (Azure AD, formerly the MsolUser), which carries /// `{alias}@{tenant}.onmicrosoft.com`, Microsoft's internal cloud address. /// Every mail recipient links its mailbox to that user through @@ -361,7 +362,8 @@ pub struct ExchangeIdentity { pub recipient: Option, /// `msExchMailboxGuid`; `None` = no mailbox, or not read. pub exchange_guid: Option, - /// `PrimarySmtpAddress`: the recipient's identity. + /// `PrimarySmtpAddress`: identifies the recipient implicitly, as a + /// string; mutable, unlike `exchange_guid`. pub primary_smtp: Option, } diff --git a/crates/ogar-dir-sim/src/violation.rs b/crates/ogar-dir-sim/src/violation.rs index 8f156d9a..73b48699 100644 --- a/crates/ogar-dir-sim/src/violation.rs +++ b/crates/ogar-dir-sim/src/violation.rs @@ -28,7 +28,8 @@ pub enum AddressRole { /// The `mail` attribute: a property on the user's business card, like /// the telephone number. It is shown in the address book and used inside /// messages, and it follows the user, not the mailbox or the recipient. - /// It is not the recipient's identity (that is `PrimarySmtpAddress`; see + /// It is not the recipient's identity (immutably the mailbox's + /// `ExchangeGuid`, implicitly its `PrimarySmtpAddress`; see /// [`ExchangeIdentity`](crate::exchange::ExchangeIdentity)), not an /// address anything is received at, and not provisioned. Exchange does /// not reserve it, so it never makes an object a holder in