Mail flow between on-premises Exchange 2013 and Office 365
We have an on-premises Exchange 2013 server and Office 365 in a hybrid configuration. We want all mail to flow through the on-premises server for compliance reasons and for the most part have that working.
We are struggling with mail from the internet reaching Office 365. It is delivered to our on-premises Exchange 2013 server but does not get delivered to the test mailbox in Office 365. Instead it gets stuck in the Submission queue on the Exchange 2013 server because a local loop has been detected.
I've gone through the hybrid configuration wizard many times and cannot figure out why this isn't working. All other mail flow to and from Office 365 is working as expected.
Does anybody have this working and can point me in the right direction?