Share via


Shared Address Space Office365 Mail Routing

Mail Routing

Scenario :

User A(Office 365) & User B (Office365 & External), Whenever User A Sends Mail to User B, It should be delivered External User B account from there it has to be forwarded to Office365 User B Mailbox, However default it will be delivered to User B Mailbox in Office365

Domain.com Hosted with Office365 & Some other Provider
Internal Mails should be routed to Other Provider & Needs to forwarded to Office365

Product:Exchange Online
Version: Wave 15

Cause: Since the same office 365 tenant has User B mailbox enabled, Mails will not be delivered to External Servers. Resolution: We suggest you to create a new Outbound Connector for your domain as follows:

  1. Type : Partner
  2. Connection : Opportunistic TLS
  3. Scope : Use for Criteria Based Routing (CBR)
  4. Outbound Delivery : MX record associated with the recipient domain

Once created, Go ahead & create a rule as follows:

  1. If the message...recipients’ s address domain portion belongs to any of these domains: yourdomain.com  
  2. Do the following...Route the message using the connector named "Created Connector"

If the DomainType Set to InternalRelay, Rules will take high precedance.

Due to connector interface change, above solution may not work in that case, Please follow below steps.

  1. Connect to Exchange Online Powershell
  2. Run below command which creates the Partner Connector : 
  3. New-OutboundConnector -Name "Shared Connector" -ConnectorType "Partner" -SmartHosts "mail.contoso.com" -Enabled $True -UseMXRecord $false -IsTransportRuleScoped $True

Once created, Go ahead & create a rule as follows:

  1. If the message...recipients’ s address domain portion belongs to any of these domains: yourdomain.com  
  2. Do the following...Route the message using the connector named "Created Connector"

Doing this will route all mails through external even if the mailbox is enabled with Office365.

See Also Shared Address Space CBR