Routing mail from 365 to a subdomain

Kenny Stern 371 Reputation points
2021-06-03T15:17:02.84+00:00

We have a need to route email from O365 to a subdomain. Emails from 365 to the subdomain need to route to a smart host in our datacenter that has a mail bot running on it. I have the subdomain added as an internal relay accepted domain and a send connector that specifies that emails to the subdomain route to the smart host. However, the emails are not using this connector and are instead using the default send connector that routes mail to our on-prem Exchange servers.
I should also mention that we are currently in hybrid mode and have centralized transport enabled.

Can anyone tell me how to get emails to the subdomain to route to the correct smart host? The email would only ever be sent by internal people so we don't need this to work with external senders.

So to summarize, we need emails from domain.com in 365 sent to bot.domain.com to route to a smart host and not to Exchange on-prem as we are planning to go out of hybrid and decommission the on-prem servers eventually.

Thanks

Exchange | Exchange Server | Management
Exchange | Hybrid management
0 comments No comments
{count} votes

Accepted answer
  1. Kenny Stern 371 Reputation points
    2021-06-04T13:51:10.843+00:00

    I was able to get this to work by changing the send connector to the subdomain to require a mail flow rule. Then using the mail flow rule to specify that all mails to the subdomain use that connector.

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Andy David - MVP 157.8K Reputation points MVP Volunteer Moderator
    2021-06-03T18:33:46.147+00:00

    Does the default connector to on-prem have this set to $false?
    AllAcceptedDomains

    Get-OutboundConnector

    It should be $false if you do not want all the accepted domains to go through it.


  2. KyleXu-MSFT 26,396 Reputation points
    2021-06-04T09:35:16.017+00:00

    @Kenny Stern

    Do you want emails sent from the Exchange online mailbox to be sent to the subdomain through the smart host? If so, why not create a send connect to send this email directly?
    102456-qa-kyle-17-31-02.png
    102369-qa-kyle-17-31-24.png

    If I misunderstood your question, please point it out.


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.