Hi @vdz ,
Great to know that the issue has already been resolved and thanks for sharing the solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others", I'll repost your solution in case you'd like to "Accept" the answer : )
[A local loop was detected]
Issue Symptom:
"As I am upgrading the hybrid exchange server 2010 to hybrid exchange server 2016.
HCW was successful, receive and send connector seem to be fine on the exchange 2016.
First I could not send an email from @mycompany.com to external email (@gmail.com) after updating the TlsCertificateName on the Default Frontend Ex2016 from Receive connector Exchange 2016, now I am able to send out.
But I am not able to receive an external email e.g ******@gmail.com to ******@mycompany.com, from EAC message trace status: resolved and delivered, I checked the Queue Viewer on the Exchange 2016, the email was stuck in the queue with the last error: A local loop was detected."
Resolution:
"As I mentioned external outbound flow was fine only external inbound was stuck in the queue with the last error : A local loop was detected, that means something misconfigured on the send connectors specifically "Outbound to Office 365" which really depends on your organization / or configuration (such as MX record, DNS ect..)
In my case, I enabled SMTP service on the third party certificate (mail.mycompany.com) and reran the HCW with the Full Hybrid Configuration option which corrected my send connector "Outbound to Office 365" and successfully mail flows as expected."