As promised in my previous post, here is an post which walks you through the creation of a profile which can be used to connect to both an Exchange 2013 Server as well as a legacy version of Exchange Server (2007, 2010). The reason why this is needed is because their is an explicit block in place that prevents profiles configured to use RPC over HTTP to interact with legacy versions of Exchange Server. Therefore, the standard mechanism of profile creation won't work. To get this working you will need to utilize a registry value named RpcHttpProxyMap. You can read more about this registry value and it's various settings in the MAPI guidance document published with the latest version of the MAPI/CDO download. The steps below will walk you through creating a profile that uses this value in addition to the properties configured in the profile. Although not a prerequisite, it may be helpful to review my previous posts about profile creation with MFCMAPI before walking through this one.
These steps require that the version of MAPI/CDO is at least 6.5.8309 and the latest version of MFCMAPI. These steps will not work with any version of Microsoft Outlook.
Important This section contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following Microsoft TechNet article: Backing Up and Restoring the Registry
The steps above will connect you to a mailbox residing on an Exchange 2013 Server. From there you can use MDB > Open other mailboxes > From GAL... to connect to a mailbox residing on a legacy version of Exchange Server. If you want to connect first to the mailbox on the legacy version of Exchange Server use the same steps but in step 17, use the target server's name for PR_PROFILE_UNRESOLVED_SERVER instead of the personalized server id. Additionally, you may need to specify PR_PROFILE_UI_STATE if RPC encryption is enabled on the target legacy Exchange Server. This is the default in Exchange 2010. Please see my previous post on profile creation for Exchange 2010 for setting the value of that property.
The personalized server id is the server name returned from Autodiscover. You can find this in a variety of ways. If you are using the SOAP based Autodiscover the property you are looking for is InternalRpcClientServer. If you are using the Plain Old XML (POX) based Autodiscover the property you are looking for is of type EXHTTP in the protocol node. The node name is Server. You can use Outlook to make an Autodiscover request on your behalf by right clicking the Outlook icon in the System Tray while holding down the CTRL button and choosing 'Test E-Mail Autoconfiguration'.
It is recommended that you add a suffix to the RpcHttpProxyMap which is unique. This avoids conflicts with other MAPI applications that may be running on the machine. I added "_MFCMAPI" to the value's name for this purpose.
The RpcHttpProxyMap value's data is case sensitive if using version 6.5.8309. Therefore, "contoso.com=http://mail.contoso.com,ntlm,ntlm,false" is not the same as "Contoso.com=http://mail.contoso.com",ntlm,ntlm,false. This was changed in 6.5.8320 and is no longer case sensitive.
Properties configured in the profile will always override the registry key. Therefore, when the properties in the profile are in conflict to the properties in the registry MAPI will use the properties in the profile.
Lastly, the version of MAPI/CDO was incorrectly stated on the download page as 8.3.8309 for 6.5.8309.