Notes from the Field
I have been working on a customer site for some time now and have recently been migrated to Wave 15 of Exchange Online.
It was brought to my attention during the week, that since the migration, Shared Mailboxes which were created via the Exchange Online EAC could not receive external email. Shared mailboxes which were created in the on-premise environment and then migrated to Exchange Online are working as expected.
Note: The support staff have already created the Shared mailboxes using the Exchange online EAC and these mailboxes already have significant amounts of mail contained within.
In the scenario where emails were not delivered, an NDR was sent to the sender advising that the maximum hop count for the email had been exceeded and that this was the reason for the delivery failure.
So, I decided to take a look at the NDR (as you would), and discovered that there did appear to be a routing loop in play. But how could this happen when other shared mailboxes on the same email domain, hosted in Exchange Online, are working fine?
The offending email was first routed to FOPE via the MX record on the domain. This was expected. Then it was routed to the On-premise hybrid server. Also expected, as this is the default routing connector at Exchange Online. But then, the message was routed through the external send connector for some reason. This turned out to be the key to solving this riddle.
Why would exchange route what is effectively an internal email, external to the organization?
Because the on-premise Active Directory knew nothing about this email address. There was no AD object as the mailbox was created in Exchange Online and Dirsync is only synchronised from on-premise to the cloud.
The solution turned out to be remarkably simple after a little bit of thought. Create an on-premise remote user mailbox using the Exchange 2010 EMC.
Active Directory now knew about the address email@example.com, and also knew that it needed to route this address through the outbound Office 365 connector using firstname.lastname@example.org.
I hope this saves some head scratching for those of you out there.