Platform SDK: Exchange Server

Designing a Gateway

This quick start procedure examines the issues involved when designing a gateway. For complete gateway information, see the Gateway Programmer's Reference.

Design Tasks

  1. Determine the type of address mapping the gateway will need to perform. In other words, for incoming messages, what kind of foreign-system addresses will be mapped to (and for outgoing messages, from) the native EX address type of Microsoft Exchange Server. At this stage, the gateway may also need to generate nondelivery reports (NDR) if the destination address on an incoming message matches no valid recipient in the directory, or if the destination address on an outgoing messages contains no valid proxy address for an external recipient.
  2. Determine what message translation tasks are needed. First, this means knowing what types of messages (IPM, IPN, NDR, DR) will need to be translated. Second, how are the attributes on incoming messages mapped to MAPI properites? For example, incoming messages in SMTP format contain certain header fields; you would need to determine what MAPI properties to store them in. The gateway may need to generate an NDR if message translation cannot be performed, or performed incompletely.
  3. Decide whether this gateway will used for backboning Microsoft Exchange Server messages. If so, will the gateway need to preserve rich text? Will it use TNEF encapsulation? For more information on TNEF, see the MAPI Programmer's Reference.
  4. Design a strategy to have the gateway preserve trace information. Trace information is necessary so that message looping can be stopped. For more information, see Gateway Trace Information.
  5. As with all server applications, design the gateway to perform efficiently. For more information, see Application Performance.
  6. Decide on a threading model for the gateway. For more information, see Using MAPI in Multithreaded Applications.

About Sample Source Code

See Sample Gateway and Applications. Also see the sample code in the section called GWSAMPLE.