SteelHead™ Deployment Guide - Protocols : Microsoft Exchange Email Optimization : MAPI Client and Server Communication
  
MAPI Client and Server Communication
The Exchange server includes an Endpoint Mapper (EPM) that listens on TCP port 135. The Outlook client connects to this port and is assigned random TCP server ports to communicate with the Exchange server using the MAPI protocol. These MAPI connections are used to send and receive emails, calendaring, address lookup, and so on. You can configure the Exchange server to use a fixed TCP port for the MAPI connections.
The conversation between the Outlook and the Exchange server is quite complex. The following is a basic overview for the Exchange server communication:
The Outlook client contacts the directory service and DNS to establish the universal resource identifier (URI) for the Exchange server.
The Outlook client uses the URI to connect to the EPM server, and then it logs in to the Exchange server.
The Outlook client performs remote operations (ROPs) to open (that is, create and write) a new email message, saves the changes, and creates and adds an attachment, if needed.
Using Name Service Provider Interface (NSPI), the Outlook client resolves the name of a recipient.
The Outlook client submits the message to the Exchange server for sending.
For information about Exchange server communication, go to http://msdn.microsoft.com/en-us/library/cc307725%28EXCHG.80%29.aspx.
Other conversations between Outlook and the Exchange server include opening folders for reading or searching, deleting items, and synchronizing folders. Synchronizing folders is required to download and read emails from the Exchange server to the Outlook inbox. Figure 2‑1 shows the synchronization process. The incremental change synchronization (ICS) state is how the client knows what new items to download from the Exchange server.
Figure 2‑1. Outlook Client and Exchange Server Synchronization
Source: http://microsoft.com (Sep. 2, 2010)
SteelHead MAPI optimization is based on the streamlining of ROPs.
Auto-Discovery and MAPI Connections
RiOS intercepts and optimizes the EPM conversation between the Outlook client and Exchange server on TCP port 135. For Outlook client connections that are configured for correct addressing, the client-side SteelHead alters the port that the EPM service sends to the Outlook client for MAPI connections (default is port 7830). For port or full transparency addressing modes, no changes are made to the reported MAPI port, and the Outlook client connects to whichever port EPM assigns to MAPI. RiOS intercepts and optimizes subsequent connections made to the MAPI port and performs MAPI-specific optimization on them.
If the Outlook client connections to the Exchange server are intercepted and optimized, MAPI-specific optimized connections are not used when the client-side SteelHead has an in-path rule to pass-through traffic on TCP port 135 (or the server-side SteelHead has a peering rule to pass-through traffic on TCP port 135).
After RiOS learns the MAPI port for an Exchange server, RiOS no longer goes through the auto-discovery process for connections to the Exchange server IP address and learned MAPI port. Although this gives some performance benefits to new MAPI connections (especially in large latency WANs), it also means that configuring pass-through or other types of in-path rules might not have the immediate desired impact on traffic.
Always use the in-path probe-mapi-data CLI command to perform auto-discovery for MAPI connections, and to allow in-path rules to have immediate impact, even on Outlook clients that are currently optimized.
When using fixed-target rules to optimize MAPI traffic, configure the client-side SteelHead to optimize traffic where the destination IP address is the Exchange server, and where the destination port is 7830 (or whatever port is configured on the client-side SteelHead for MAPI optimization). If you want optimization for NSPI connections, a fixed-target rule in which the destination IP address is the Exchange server and where the destination port is 7840 (or whatever port is configured on the client-side SteelHead for NSPI optimization).