I have setup a new Windows 2012 R2 server and installed Domain Controller and Exchange 2016 on it with all that needed.
Yes i know, i should not have domain controller on same server as exchange server but thats not my problem everything works except Outlook on Windows can not run MAPI over HTTP becouse when it trying MAPI over HTTP its trying on my domain controller domain name and exhangeserver hostname so its trying to connect to WIN-XXXXXX.XXXXX.local but my external url for my webserver is mail.mydomain.com but something doing that my outlook trying MAPI over HTTP to that wrong url that not exist.
I have tried to searched and searched but can not find where to change the external URL for MAPI over HTTP, everything else runs on my external url but not MAPI over HTTP.
After discuss this with a friend that worked with Exchange for long time he figure out that under the ECP web interface there is a menu called Servers there you select your server and geting a small window with some new left menu where you have Outlook Anywhere, here you can type your external url and internal url for Outlook Anywhere.
Thats fixed my problem.