Forum Discussion
Setup O365 in order that sends mail on another mail provider
- May 16, 2020Sandro,
The O365 services like SharePoint and Teams were designed with the expectation that the primary user's mailbox is located in Exchange Online.
A work-around is to configure Criteria-Based Routing (CBR) so that the email is forwarded to Google instead of the mailbox on Office 365.
Instructions:
Create a new distribution group "ForwardToGoogle"
Add the users to the group.
Connect to Exchange Online PowerShell
Create a CBR Connector:
$result = New-OutboundConnector -Name "CBRConnector" -ConnectorType OnPremises -SmartHosts “aspmx.l.google.com” -UseMXRecord $false -IsTransportRuleScoped $true
Create the Transport rule that redirects the mail to the connector
$result = New-TransportRule -Name "ForwardToGoogle" -SentToMemberOf "ForwardToGoogle" -RouteMessageOutboundConnector "CBRConnector"
If this was helpful, please mark as best answer.
The O365 services like SharePoint and Teams were designed with the expectation that the primary user's mailbox is located in Exchange Online.
A work-around is to configure Criteria-Based Routing (CBR) so that the email is forwarded to Google instead of the mailbox on Office 365.
Instructions:
Create a new distribution group "ForwardToGoogle"
Add the users to the group.
Connect to Exchange Online PowerShell
Create a CBR Connector:
$result = New-OutboundConnector -Name "CBRConnector" -ConnectorType OnPremises -SmartHosts “aspmx.l.google.com” -UseMXRecord $false -IsTransportRuleScoped $true
Create the Transport rule that redirects the mail to the connector
$result = New-TransportRule -Name "ForwardToGoogle" -SentToMemberOf "ForwardToGoogle" -RouteMessageOutboundConnector "CBRConnector"
If this was helpful, please mark as best answer.
- SandroRizMay 16, 2020Copper Contributor
Joe Stocker first of all thanks for the response and for your time.
Yes, it seems it works. Sharepoint's notify is sent (in spam folder, but it is another story) and when I schedule a meeting in Teams mail are sent to Google.
The only drawback is that now, if I schedule a meeting from Teams calendar, the creation is stucked (the spinning icon runs for minutes); the meeting is created, because mail starts, the link works and the record in the Posts timeline exists; but after long waiting, on the calendar there is nothing.
And I guess it is related to this change, because till yesterday I created dozens of meeting and they are all on the calendar.
Any suggestion?
- Joe StockerMay 16, 2020Bronze ContributorI assume the calendar doesn't contain the appointment because it was forwarded to google, so I think you'll have to train the user to not look at the Teams calendar but instead look at the Google calendar.
If that is not acceptable, then you should disable the transport rule and then enable SMTP forwarding on each mailbox, as that will allow the appointment to show on both the Teams app and also the Google calendar.
Test it on a single mailbox first:
Set-Mailbox -Identity "John Doe" -DeliverToMailboxAndForward $true -ForwardingSMTPAddress "JohnDoe@googleemail.com"
Then to do it on all the rest of the mailboxes, put the source and destination address in a text file, then you could automate this like:
#The 'forwarding.csv' file contains two column headers, source and destination
$import =import-csv forwarding.csv
$import | %{Set-Mailbox -Identity $_.source -DeliverToMailboxAndForward $true -ForwardingSMTPAddress $_.destination
To prevent the email from being sent to Google's spam folder, update the DNS SPF TXT record to include this:
include:spf.protection.outlook.com- SandroRizMay 19, 2020Copper Contributor
Joe Stocker thanks again
The strange thing is that if I schedule a meeting without indicating a specific channel, the event is created normally, mail is sent and it appears on calendar.
Only if I choose a Team+Channel, then I have the issue of long-spinning + diseappering...
Question: if I follow your 2nd hint I had to write so:
Set-Mailbox -Identity "John Doe" -DeliverToMailboxAndForward $true -ForwardingSMTPAddress "JohnDoe@myDomain.com"
where myDomain.com is the same for o365 (exhange online) and Gsuite.
So are you sure he will check the DNS MX and route to google?Thank you