At least sometimes, when our Exchange server gets rebooted for whatever reason, the ValidPorts data at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Rpc\RpcProxy resets to using only the bare machine name and the FQDN for the local domain, but loses the additional outside domain information added so that outlook-anywhere will work by accessing the external domain name.
I'm not sure what's causing this issue, and my google-fu is failing to find anything useful so far.
I could, as a workaround, use a script to make sure that the data for the key/value is correct whenever the server starts up, but that doesn't get to the root of the issue and could have unintended consequences.
The computer is running Windows Server 2008 R2 and Exchange 2007 SP3
EDIT: I just edited this key a few hours ago and came back to the server to see that it had changed WITHOUT a reboot or any software/patches being installed. I'm looking through scheduled tasks and RSOP now for clues.
EDIT: I don't see anything in RSOP or Tasks that points to why this key keeps reverting. Logoff/logon doesn't seem to be the cause either.
EDIT: Triple checking my settings: Outlook Anywhere was initially configured using the Exchange Management Console. In the console, if I go to server configuration -> Client Access, go to the server properties -> Outlook Anywhere tab, the External host name field is populated correctly.