Force Exchange to send email outside

Occasional Visitor


I currently have 2 accounts for 2 companies in Exchange 365. &

I would like to add to the domainA account in order to have something to unify.


So I added a second domain in my account A and I created the TXT in the dns but I have not yet change the MX. Users are not yet creating on domainB because I have to migrate the old exchange.


The trouble is that when adding the domainB in domainA, exchange sends the mail inside and so when sends to, the sender receives an email like what the user does not exist. => Logic they are not yet create


To put it simply, I would like to force exchange to send mail to the outside more than to relay it internally.


Thank you  in advance for you help.

2 Replies

You need to configure a relay on the domain! Exchange route mails internally first instead of using the MX record!


/ Adam

Hi @JHNN3791 ,


You can create as the following.


  1. Connect to Exchange Online PowerShell.
  2. Create the Distribution List (DL):
    New-DistributionGroup -Name "NotMigratedUsers"
  3. Add All Users to this DL.
  4. Create the Connector:
    $result = New-OutboundConnector -Name "OnPremConnector" -ConnectorType OnPremises -SmartHosts "<fill smart host to source environment>" -UseMXRecord $false -IsTransportRuleScoped $true
    • -SmartHosts entry needs to be set to the URL or IP Address of the Source environment server.
  5. Create Rule:
    $result = New-TransportRule -Name "Pilot" -SentToMemberOf "NotMigratedUsers" -RouteMessageOutboundConnector "OnPremConnector"

When a user is fully migrated, remove the user from the DL, and they will receive their email in their own Office 365 mailbox.