Microsoft Outlook 2013/2016 clients on PC did not exhibit any issues. Latest Microsoft Outlook for Mac did not exhibit any issues either!
It is worth pointing out that while Outlook 2013/2016 on PC use MAPI/HTTP or RPC/HTTP to connect to Exchange 2013/2016 servers, both clients on Mac (Mac‘s own Mail client and Microsoft Outlook for Mac) use EWS to connect.
Mac Mail would show “Account Error” which read “Unable to connect … The server returned error: Connections to host mail.contoso.com on default ports failed.”
The error is somewhat misleading as when you look at EWS logs on Exchange server, you see that the server rejected the request with HTTP error 400 which translated to “bad request”. What I didn’t know at that point is which element in the HTTP request was causing the server to reject the request.
Microsoft provides great testing tools for Exchange on www.exrca.com, so I decided to run EWS connectivity test from the toolset. To my surprise, the test failed with the error “Message: The request failed. The remote server returned an error: (501) Not Implemented.”
I knew about this particular error as I had worked with Michael Van Horenbeeck and is documented here:
The issue is also documented by Brian Reid: Exchange Web Services (EWS) and 501 Error and Phil Sharp: Kemp Load Balancer and Lync Unified Contact Store Integration Note.
After enabling L7 debug tracing on my KEMP LoadMaster I observed the same error mentioned in the above articles “lb100 kernel: L7: badrequest-client_read [184.108.40.206:51830->220.127.116.11:443] (-501): <?xml ? , 0 [hlen 1405, nhdrs 11]”
It would be easy to blame load balancer at this point and implement the recommended fix by changing 100-continue handling on LoadMaster. But if that was the issue, why did Outlook for Mac work without any errors?
Anyhow, I proceeded changing the 100-continue handling by changing it from default setting of RFC-2616 compliant, to RFC-7231 compliant instead:
After changing this setting, I ran the EWS test from exrca website again, and as one would expect, the test passed with no issues.
It did, however, failed to address the issue for Mac Mail client! No eureka moment, just yet!
I will cover details of further troubleshooting in second part of this article. You can read it here.