Hybrid mailbox solutions are often a bit more difficult to manage than traditional on-premises Exchange versions. The best way is to stop using one once all of your email boxes have been transferred over the cloud version, but if you are going to use it for longer-term, better master your skills.
In our Exchange hybrid environment, the emails started piling up in the“outbound to office 365’ queue. Usually, this is the queue that is in charge to send and receive emails between the hybrid and other hub transport local servers. Basically, it handles the mail communication between Office 365 and on-prem Exchange mail users. Also, it uses the SMTP relay in the Active directory site delivery type; hence this mail transfer should happen on the local network.
Potential Error Message: Office 365 Hybrid Emails Stuck in Queue: target host responded 4188.8.131.52 connection timed out mail-onmicroosft.mail.protecion.outlook.com
How I Fixed this Issue?
Restarting the transport services without any effective changes will not help. Make sure that all Exchange transport servers are allowed to use the Outbound Office 365 connector. Usually, it automatically happens when you do the Exchange server setup or add another hub transport server in your environment. By any chance, if that was not done properly, you can run the below Exchange PowerShell command on your hybrid server.
Set-SendConnector “Outbound to Office 365” -SourceTransportServers EX01,EX02
EX01 and EX02 are the exchange servers you want to add.
As the final solution, modifying the send connector setting helped to fix this issue permanently.
1) Open your hybrid server ECP.
2) Double click (Edit) ‘Outbound to Office 365′ send connector in mail flow settings.
3) Under General, enable the ‘Proxy through client access server’ checkbox and save the settings.
It will take some to take effect. Otherwise, you can restart the transport service to make it work instantly.
Now you can see that the mails stuck in the Outbound to office 365 queue will process quickly. I hope this small guide is useful to identify and resolve the particular mail stuck issue on your Office 365 Hybrid Exchange setup.