MAPIClientLibraries 2.0 API Documentation

- Main Page
- Related Pages
- Data Structures
- Files
- Examples

Opening Exchange to a wider world

## OpenChange Project Goals

The OpenChange Project aims to provide a portable Open Source implementation of Microsoft Exchange Server and Exchange protocols. Exchange is a groupware server designed to work with Microsoft Outlook, and providing features such as a messaging server, shared calendars, contact databases, public folders, notes and tasks.

The OpenChange project has three goals:

- To provide a library for interoperability with Exchange protocols, and to assist implementors to use this to create groupware that interoperates with both Exchange and other OpenChange-based software.

- To provide an alternative to Microsoft Exchange Server which uses native Exchange protocols and provides exactly equivalent functionality when viewed from Microsoft Outlook clients.

- To develop a body of knowledge about the most popular groupware protocols in use commercially today in order to promote development of a documented and unencumbered standard, with all the benefits that standards bring.

## MAPI Overview

MAPI is the glue between Exchange and Outlook, but a common misconception is to consider it as a network protocol. MAPI, an acronym for Messaging Application Programming Interface, refers to a proprietary set of function call interfaces developed by Microsoft before Microsoft Exchange existed. By purchasing licenses to Microsoft's proprietary and Windows-only MAPI libraries, anyone can create message services that communicate using these functions. A mail server implemented in this way is what Microsoft calls a MAPI Service Provider. Any protocol could be used as a transport for these MAPI communications.

When Microsoft Exchange 5.5 was developed in 1997, the decision was taken to create a proprietary transport protocol for MAPI which closely matches the MAPI calling interface. This protocol is called ExchangeRPC and used in Outlook-Exchange communications. ExchangeRPC is the only transport OpenChange supports, and in practice is the only transport of interest today. Most of the world is being forced to use Microsoft Exchange servers, so that defines the transport that matters.

When OpenChange team members first looked at the network network traffic these generated by calling MAPI functions on Windows operating systems, we noticed blobs of data first either compressed or obfuscated, then encapsulated by an RPC transport protocol function (EMSMDB) and finally pushed on the wire. Transporting memory-image blobs on the wire is not good protocol design, however for a number of reasons the result now works quite reliably.

## Looking at a MAPI Conversation

A high-level view of a MAPI conversation follows. We also introduce important terminology:

- MAPI applications call MAPI providers, using the API to pass data (eg a mail message body) or MAPI conversation requests and responses (eg 'search for this address').
- MAPI providers pack the client or server MAPI information in a blob. There are only two really important providers, one for data destined for what is somewhat strangely termed the Message Store (although it handles more than just messages), and the other for data to be sent to the Address Book. These are called the EMSMDB and EMSABP providers, respectively.
- ExchangeRPC protocol is used to transport the MAPI information over the wire, encapsulating inside it one of two MAPI-specific protocols: the EMSMDB Message Store Protocol, or the NSPI Addressbook Protocol.
- The store provider on the server side associated with the protocol used (either EMSMDB or EMSABP) extracts the MAPI blob from RPC protocol functions, analyzes its content and performs operations embedded within it.

| This content is licensed under the Creative Commons Attribution ShareAlike License v. 3.0: http://creativecommons.org/licenses/by-sa/3.0/