Forum Discussion
JHNN3791
Feb 26, 2019Copper Contributor
Force Exchange to send email outside
Hello,
I currently have 2 accounts for 2 companies in Exchange 365. domainA.com & domainB.com
I would like to add domainB.com 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 paul@doaminA.com sends to peter@domainB.com, 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.
Hi JHNN3791 ,
You can create as the following.
- Connect to Exchange Online PowerShell.
- Create the Distribution List (DL):
New-DistributionGroup -Name "NotMigratedUsers"
- Add All Users to this DL.
- 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.
- 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.
You need to configure a relay on the domain! Exchange route mails internally first instead of using the MX record!
http://guides.appriver.com/m/8585/l/144618-enable-internal-relay-domain
/ Adam