When setting up Outlook Anywhere in Exchange Server 2007, all the steps described in "Exchange Server 2007 End-to-End Scenario" are not enough. You need to run the following command in the Exchange Management Shell:
Get-AutodiscoverVirtualDirectory set-AutodiscoverVirtualDirectory-ExternalURL https:// your-iis-server.yourdomain.com /AutoDiscover/Autodiscover.xml
Here "your-iis-server" is the IIS server name where you have your Exchange "AutoDiscover" Web application hosted. Besides this extra step, all the steps described in "Exchange Server 2007 End-to-End Scenario" must be followed exactly. You can get to "Exchange Server 2007 End-to-End Scenario" by clicking on the root node in the left pane of the "Exchange Management Console". The "End-to-End Scenario" is on the second tab.
On the client side, as long as your local LAN setup works, you can leave it alone, even if you use domain names that are not publicly accessible since virtual RPC over HTTPS will take care of that automatically. All you need to do is to check the "Connect to Microsoft Exchange using HTTP", and setup "Exchange Proxy Settings". This is located in the email account setup dialog box. Click on "More Settings...", and then go to the "Connection" tab. Outlook Anywhere settings is at the bottom of this tab. Your Exchange server IIS external URL should be entered in the "Exchange Proxy Settings" dialog box as the proxy server URL.One thing you should do is to keep all your authentication protocol consistent. If you choose to use NTLM, use it at every step. Otherwise use "Basic Authentication" everywhere.