We have begun migrating to Office 365 from Exchange and are currently in hybrid with some users migrated but most not. We have a routing situation that I am struggling with and hoping for assistance.
In Exchange on-prem we have a subdomain defined as an internal relay domain called bot.company.com. The reason for this is we have custom bot running on a server that we have to be able to send certain emails to for custom processing. In Exchange we have a send connector that routes emails addressed to anything ending in @Bot .company.com to a smart host, which is the server running the bot. This has been working fine.
We now need to be able to send to it from 365. I've added the domain to 365 as an internal relay domain and created a send connector that points directly to the bot server as a smart host. However, when I send to it the email goes to the on-prem Exchange server and not the bot server. The Exchange server then routes to the bot server, so it is working, but it does not appear to be using the send connector I created.
Can someone advise me on the correct way to set this up? Do I even need a send connector in 365 and, if so, how would I get it to send directly to the bot server instead of to Exchange first?
Thanks