I've been extensively troubleshooting this for the last couple weeks and have not found information much online. We have a single exchange 2013 server with outlook anywhere enabled, using servername.contoso.com externally and servername.internal.contoso.com internally. In designing this I initially used servername.contoso.com for both external and internal but that was causing all sorts of authentication problems. After reading this article - http://blogs.technet.com/b/exchange/archive/2013/05/23/ambiguous-urls-and-their-effect-on-exchange-2010-to-exchange-2013-migrations.aspx I changed them to their current values and everything is operating smoothly other than public folders. Internally on the EXCH provider autodiscover hands out the external hostname for public folders, I've set the internal and external url's for all the virtual directories and server value for the EXCH provider, in the xml for autodiscover it still hands out '<PublicFolderServer>servername.contoso.com</PublicFolderServer>', yet still hands out the proper internal hostname for mail. When I try to expand "All Public Folders" from any user, with any permission set, regardless of outlook client version, I see "Cannot expand the folder. Microsoft Exchange is not available. Either there are network problems or the exchange server is down for maintenance. (/o=ORGNAME/ou=Exchange Administrative Group (FYDIBOHF232SPDLT)/cn-Configuration/cn=Servers/cn=<SOMEGUID>@contoso.com)". The GUID is different depending on the database the user's mailbox store is in, this leads me to believe that the old hostname is still lingering somewhere. I installed CU2 last week and after the first reboot public folders were working, but 5 minutes later they were not. In an effort to get to resolve this I also found that one of the mailbox databases was not being indexed properly so I deleted the index, and the a full crawl of the DB was successful. I've completely nuked the entire PF structure a couple times now and I still get the same error no matter what. In my eyes this fix should be as simple as changing that value in the autodiscover.xml file, but it is not present. Is this populating the xml from the object model or referencing the service connection point? I have no autodiscover DNS records configured, only an mx record.
In the CAS logs I see:
rop::WrongServer+"Redirected: alternate server requested, suggested new server"
The other strange issue that has come out of the wood work in the last few days is rules are putting mail into completely random folders. This started to happen right around the same time that I re-crawled the mailbox databases.