Using the Sample Gateway

Microsoft Exchange Development Kit for Microsoft Exchange Server versions 4.0, 5.0, and 5.5

Karen Worth
Microsoft Corporation

Additional contributions from Arsenio Locsin,
Bronwyn Calsyn, and Michael Reeves

November 1999

Summary: This article shows how to build, install, and configure the sample gateway source code in the September 1999 edition of the Platform SDK. This article should be used with Microsoft Exchange Development Kit (EDK) documentation. (22 printed pages)

Contents

Introduction
Sample Gateway Components
Using the Sample Gateway
Troubleshooting the Sample Gateway
Answers to Frequently Asked Questions About the Sample Gateway
Additional References

Introduction

The Microsoft® Exchange Development Kit (EDK) Sample Gateway (SGW) is a group of source code files that compile into an application that transfers incoming and outgoing mail messages. The sample gateway demonstrates common gateway features, such as mail transfer from a foreign mail system into a Microsoft Exchange Server and mail transfer from an Exchange Server to another mail system. You can use the sample gateway to send messages between two servers using a shared file system as the underlying transport mechanism.

The gateway receives inbound messages as files. The gateway then opens these files and calls a message conversion dynamic-link library (DLL) to create messages from the information contained in the files. The gateway then writes these message files to an inbound Folder in the Exchange Server Private Information Store.

The gateway receives outbound messages as Messaging Application Programming Interface (MAPI) messages in the outbound folder in the Exchange Server Private Information Store. The gateway then converts and writes these message files to the out directory.

The sample gateway performs message translation and transfer functions, and generates notification messages as requested.

The source code files for the EDK sample gateway are available from the September 1999 edition of the Platform SDK.

Note   The Platform SDK available for download from the Microsoft Web site does not contain the source code files for the sample gateway.

After installing the Platform SDK, you can find the sample code files in the Platform SDK\samples\DbMsg\Exchange folder.

This article assumes you have the following:

The sample gateway has the following minimum requirements:

Sample Gateway Components

The sample gateway contains the following components:

MTS-IN and MTS-OUT folders—A mailbox with these two Message Transfer System (MTS) folders is created in the Information Store when the gateway is installed on an Exchange server. Incoming messages are placed in the MTS-IN folder for the Exchange server to process. The Exchange server, in turn, places outgoing messages in the MTS-OUT folder for the gateway to process. You can view the files in these folders using the Message Store Viewer (mdbvu32.exe) or the Queue Viewer utilities. The Message Store Viewer is an executable file in the mssdk\bin folder. The Queue Viewer source code is in the \mssdk\samples\DbMsg\Exchange\QueView folder. You have to build the source files into an executable file.

Administrator Extension (sgwadmin.dll)—Adds a property sheet to the Exchange Administrator so you can manage the gateway directory object. To configure the gateway, you must install an Admin-Extension object in the Exchange directory and copy the administrator extension DLL file (sgwadmin.dll) to a specific location on the server by using the installation program, extninst.exe.

You can use the Exchange Administrator to determine what administrator extension DLL is installed. Under the Configuration object, select Add-ins; an object is installed for the extension DLL. The properties for this object show the name of the DLL file. The location of the file is similar to:

<install point of the exchange server>\Add-ins\<gateway name>\<platform>

For example:

c:\exchsrvr\Add-ins\SGW\i386

Proxy Generator (proxygen.dll)—Each Microsoft Exchange Server recipient object has several proxy addresses, at least one for each foreign address type known to the system. A proxy generator DLL creates the proxy addresses for an addresses type, such as EDK. The EDK provides a proxy generator DLL file (proxygen.dll) and an installation program (addrinst.exe).

You can use the Exchange Administrator to see what proxy generators are installed. Under the Configuration object, select the Addressing object, select the E-mail Address Generator object, and then observe the objects for all the installed proxy generators. The properties of the object reveal the name of the DLL file. To find the file location, run the Exchange Administrator program in raw mode (Admin.exe /r) and select the proxy generator object. From the File menu, select Raw Properties. The Directory Name property contains the file location. The file is at the following location:

<install point of the exchange server>\Address\<contents of Directory Name>

For example:

c:\exchsrvr\Address\EDK\i386

Message Translator (ipm_in.dll and ipm_out.dll)—Converts incoming and outgoing messages to the MAPI message format and the message format of the foreign system. This conversion is done based on the message class of incoming and outgoing messages. RFC-822 messages are converted to MAPI messages using the file IPM_IN.DLL. The IPM_OUT.DLL is used to convert MAPI messages into RFC-822 messages.

These two message translator DLL files should be in a directory in the path, such as the winnt\system32 directory. These DLLs are also registered in the registry under the following key:

Hklm\software\classes\MAPI Conversions\ipm_in.dll\GetTrivialVector 

and

Hklm\software\classes\MAPI Conversions\ipm_out.dll\GetTrivialVector.

To install the message translator files, use the installation program, Xlatinst.exe.

Gateway Service (gwsample.exe)—Monitors, translates, and transfers incoming and outgoing messages. When the Microsoft Exchange Server receives a message bound for a foreign server, the Exchange server puts this message into the gateway's MTS-OUT folder. The gateway then maps the addresses of the message recipients to the format of the foreign system using the proxy generator. The gateway also translates the message content to a format that can be processed by the foreign system using the message translator. After this translation, the gateway writes the message out to the \out directory for the foreign system to pick up.

For messages from a foreign system, the gateway receives the message and maps the message addresses to the corresponding Exchange Server address using name resolution. The gateway translates the message content using the message translator and then delivers the message to the gateway's MTS-IN folder of the Exchange Server.

The Gateway Service is installed using the Gateway Service Installer program servinst.exe.

OUT directory—The gateway writes messages to be delivered to the foreign system into this directory.

IN directory—The gateway picks up messages from a foreign system in this directory. An incoming message folder is a place for the gateway to hold incoming messages prior to processing. Without an incoming message folder, the gateway must process all incoming messages immediately, causing performance or memory subsystem problems.

One-off Address Template—creates the following:

Using this template is not required, but is highly recommended. The EDK provides a utility (tmplinst.exe) to install a one-off address template.

You can use the Exchange Administrator to determine which one-off address templates are installed, as shown below in Figure 1.

Figure 1. The One-Off Address Template object in the Microsoft Exchange Administrator displays the One-Off Address Templates installed in the gateway.

To See the One-Off Address Templates:

  1. In the Administrator window, choose Addressing.

  2. Double-click One-Off Address Templates.

Using the Sample Gateway

This section demonstrates how to install and configure the sample gateway. To use the sample gateway, you need to do the following:

This section shows you how to:

Build the Source Code Files

You can build the sample gateway source code into DLL and executable files through the command line. You cannot build these files using the Visual C++ Integrated Design Environment.

This section assumes that you installed the Platform SDK files in the C:\Platform SDK folder. If you installed the Platform SDK in another folder, make the appropriate changes to the commands.

To build the source code files:

  1. Set the environment variable. From the command prompt, run the following batch files:
    C:\> vcvars32
    C:\> setenv c:\Platform SDK
    
  2. Build the libraries by running nmake /a in the PlatformSDK\samples\DbMsg\Exchange\Libsrc folder.

  3. Build the debug versions of the following files by running nmake /a in each of the specified folders of the Platform SDK\samples\DbMsg\Exchange\ folder:
    File Description Source Code Folder
    Addrinst.exe Proxy Generator Installer \Edkinstu\AddrInst
    Extninst.exe Administrator Extension Installer \Edkinstu\ExtnInst
    Gwinst.exe Gateway Object Installer \Edkinstu\GWInst
    Gwsample.exe Gateway Executable \GWSample
    Ipm_in.dll RFC-822 to MAPI Message Translator \IPM_In

Installing the Sample Gateway

This section shows you how to manually install the gateway sample. The sample gateway documentation in the Platform SDK says you can install the sample gateway by building and running the sample gateway installation program gwsetup.exe. However, the source code is not included in the Exchange Development kit, so you can only install the sample gateway using the manual method.

  1. Create the following directories, and copy the following files to the appropriate directory:
    Folder File
    C:\Exchsrvr\Address\EDK\i386 Proxygen.dll
    C:\Exchsrvr\Add-ins\SGW\i386 Sgwadmin.dll
    C:\Sgw\ Gwsample.exe
    C:\Sgw\In No files
    C:\Sgw\Out No files

  2. Copy the files Ipm_in.dll and Ipm_out.dll to your \Winnt\System32 folder.

  3. At the command prompt, execute the following commands:

    Tip   Create a batch file that executes these commands. You can modify this batch file to remove the gateway.

    C:\>Xlatinst.exe /dll=IPM_IN.DLL /CLASSES=ENVELOPE.IPM%REPORT.IPM /POINT=SAMPLEGW.INBOUND
    

    Note   If you use this command in a batch file, insert an additional % symbol when defining the CLASSES; that is,
    /CLASSES=ENVELOPE.IPM%%REPORT.IPM

    C:\>Xlatinst.exe /dll=IPM_OUT.DLL /CLASSES=ENVELOPE.IPM%REPORT.IPM /POINT=SAMPLEGW.OUTBOUND
    

    Note   If you use this command in a batch file, insert an additional % symbol when defining the CLASSES; that is,
    /CLASSES=ENVELOPE.IPM%%REPORT.IPM

    C:\>Addrinst.exe /sitedn=/o=Organization/ou=Site /name=edk /machine=i386 /type=edk /proxydll=\\lpeverett5\address\edk\i386\proxygen.dll /server=LPEverett5 /gwproxy=EDK:@Site.Organization.com
    
    C:\>Extninst.exe /sitedn=/o=Organization/ou=Site /display_name="SGW EDK SAMPLE GATEWAY EXTENSION" /machine=i386 /name=SGW /extdll=\\LPEverett5\ADD-INS\SGW\i386\sgwadmin.dll /server=Server
    
    C:\>Gwinst.exe /sitedn=/o=Organization/ou=Site /display_name=SGW /name=SGW:i386 /addrtype=edk /server= LPEverett5 /extname=sgw
    
    C:\>Servinst.exe /sitedn=/o=Organization/ou=Site /display_name=SGW /service=SGW /exe=c:\SGW\Gwsample.exe /server= LPEverett5 /objname=SGW:i386 /objtype=gateway /account=Domain\Service-Account /password=Password
    

Configuring and Starting the Sample Gateway

The sample gateway is configured in the Options tab of the Exchange Administrator. Configure the following properties:

Address Type: EDK
Display Name: System Administrator
E-mail Address: SysAdmin
Messages to Process: Check both Inbound and Outbound.

   Inbound Outbound
Threads 4 4
Messages Per Thread 1 1
Sleep per Message: 0 0
Polling Interval: NOTIFICATION NOTIFICATION
Directory C:\Sgw\In C:\Sgw\Out
Converter Samplegw.inbound Samplegw.outbound

To see the sample gateway properties:

  1. In the Administrator window, choose Connections.

  2. Double-click SGW.

  3. Select the Options tab, shown in Figure 2.

Figure 2. The Options tab of the Exchange Administrator displays the configuration of the sample gateway.

Address Type—Refers to address type of messages passing through the gateway. This should be set to EDK. This determines what encapsulation and what address type will be used when address resolution is performed on a Custom Recipient and when assigning return addresses on messages sent through the gateway. Changing this may cause adverse message routing.

System Administrator—Display name and e-mail address of the system administrator.

Messages to Process—Indicates whether the gateway will process inbound and outbound messages. A checked box indicates that the gateway will process that type of message. The remaining fields in the dialog box have two columns of values, one for inbound messages and one for outbound messages.

Threads—Number of threads used to process messages.

Messages Per Thread—Number of messages processed in each thread.

Sleep Per Message—The length of time it takes to process one message. If the gateway finishes processing a message before this interval has elapsed, it waits until the end of the interval before starting to process the next message.

Polling Interval—If this is set to NOTIFICATION, the gateway uses notifications to determine when to process the next message. For incoming messages, it uses the first change notification; Windows NT Server tells the gateway when there is a change in the incoming message directory. For output messages, it uses the MAPI notification mechanism to determine when messages arrive in the MTS-OUT folder. If this is set to a value greater than –1, the gateway waits that many milliseconds before trying to process another message.

Directory—Name of the directory from which the gateway reads incoming messages or to which it writes outgoing messages. The directory name must be preceded by a backslash (\) and include the full path. You can use universal naming convention (UNC) names here.

Converter—Pointers to the conversion DLLs for the inbound and outbound messages. This will be the Point value for the registry key for the converters. For example, the value for the Inbound Converter is as follows:

HKEY_LOCAL_MACHINE\Software\Classes\Conversions\ipm_in.dll\GetTrivialVector

After configuring the sample gateway, you can start the sample Gateway Service.

To start the sample Gateway Service:

  1. In Control Panel, double-click the Services icon.

  2. Select SGW, and then choose Start.

Troubleshooting the Sample Gateway

This section shows you different ways to troubleshoot your sample gateway.

Ways to Troubleshoot the Sample Gateway

Configure only one gateway to test incoming and outgoing messages by completing the following steps:

  1. Send a piece of mail using the Outlook client to a one-off address. For example, [EDK:noone@nowhere.com].

  2. Open the tmp file in the \out directory with a text editor, such as WordPad.

  3. Copy the address in the FROM: field of the message in the \out directory to the TO: field of the same message. For example, the message in the \OUT directory contains the address noone@nowhere.com in the TO: field and the address Me@MyComputer.Com in the FROM field. Copy the address Me@MyComputer.Com to the TO: Field.

  4. Delete the lines in the file that begin with "External-" and "Internal-".

  5. Save the file to the \IN directory.

The gateway will now process the mail and send it to the original sender's mailbox.

Run the sample gateway under the debugger, and step through the code to find the line causing the error.

To run the sample gateway under the debugger, you need to artificially run the gateway program as a console application rather than an NT service. You can run the sample gateway as a console application by linking the sample gateway to the library file, Winwrap.lib:

  1. Build the source code in the mssdk\Samples\DBmsg\Exchange\Libsrc\Winwrap folder into the library file winwrap.lib using the debug build configuration.

  2. Copy the file winwrap.lib to the Mssdk\lib folder.

  3. Open the sample gateway project in Visual C++.

  4. In the Link tab of the Project Settings, add Winwrap.lib.

  5. Using Regedit to locate the long name of the Gateway Service. This key name appears in the HKLM\System\CurrentControlSet\Services key.

  6. In the Project Setting of the Debug tab, set the program arguments to "notserv <Long Name of Service>." Replace <Long Name of Service> with the key you found in the previous step.

  7. Make sure that the message translator files IPM-OUT.dll and IPM_IN.dll are in your System32 directory.

  8. Build the sample gateway project.

  9. Set a break point and debug the program.

Look at the files after translation by the translator DLL files using the sample program, XLATDRIV.

Please see the article "XLATDRIV: Translating Messages" in the Platform SDK documentation for more information about this program.

Look at the message in the gateway's \IN directory before the gateway processes the message. Look at the message in the \OUT directory for the gateway after the gateway processes the message.

Add Message Tracking logging to the sample gateway.

The TRACK sample console application demonstrates how to use three functions to log tracking information to the file. The source code to this sample application is in the :\mssdk\samples\DbMsg\Exchange\LibSrc\EDKTrack folder.

For more information about this sample application, see the article "TRACK: Tracking and Auditing Messages" in MSDN.

Use the Track Message tool to debug applications that track the flow of messages.

The Track Message tool is part of the Microsoft Exchange Server Administrator program. You can use it to debug applications that track the flow of messages. This utility determines the origin and destination of messages as the messages are processed by your application.

To open the Track Message utility:

  1. From the Tools menu, select Track Message. See Figure 3.

  2. Enter LPEverett5 as the server, and then click OK.

Figure 3. The Track Message Tool tracks the flow of messages.

Log on to the gateway mailbox and look at the MTS-IN and MTS-OUT folders using an Administrator Extension DLL, QUEVIEW DLL, which you install using EXTINST.EXE. Please see the article "QUEVIEW: Listing Gateway Folders" on MSDN for a discussion on this topic.

Use the message store viewer (mdbvu32.exe) to view the contents of a mailbox or information store.

The message store viewer (MDBVU32.EXE) is a MAPI client application that helps you debug your application by providing a view of information in a mailbox or any other object in an information store. This application displays the following information:

The message store viewer can be used to view, set, and change properties of a mailbox or information store. The message store viewer shows what properties are available on each message, the format of the properties, and how you can use these properties. You can use this information to customize your gateway application.

You can also use the message store viewer to debug messages. If submitting a message causes a failure, save the message and look at all the message properties with the message store viewer, instead of writing code to dump the message's properties. See Figure 4.

Figure 4. The Message Store Viewer displays the properties of a message.

Look in the Windows NT Event Viewer Application log for events logged by the gateway.

Use the debug version of the Exchange SDK library.

The debug version of the Exchange SDK library, called ExchSDKd.LIB, includes a collection of macros and asserts that can be very useful when debugging a server application. Many calls, such as the ASSERTERROR and DEBUGPUBLIC macros, can be inserted in the code as it is written. They then provide debugging information as well as future data. The best way to become familiar with available calls is to study the ExchSDKd library and header file source code.

Troubleshooting the Proxy Generator DLL

Proxy generation DLLs are used to generate proxy addresses, which are addresses of foreign system users as expressed on Microsoft Exchange Server. Debugging proxy generation DLLs requires a few extra steps because the library is loaded dynamically only when needed. To trace a proxy generation DLL in the Microsoft Visual C++ debugger, you must load the calling program into Visual C++. All calls into the proxy generation DLL are made from the System Attendant service of Microsoft Exchange Server, which is implemented by MAD.EXE.

To use the calling program:

  1. On a computer running Microsoft Exchange Server, check that the System Attendant Service is running. In Control Panel, click Services, and then find Microsoft Exchange System Attendant. If Status is not started, click Start.

  2. Connect the debugger to this service. The process identifier of the System Attendant Service is found by searching for MAD.EXE in the table of running processes.

  3. Check Yes for OK not to have debugging information for this file.

  4. Start the Administrator program.

  5. At this point, you will not be able to set any breakpoints in your code because your DLL is not yet loaded. The System Attendant Service will only load your proxy generation DLL when the process requires the service. Because you are connecting to MAD.EXE when it is already running, rather than starting MAD.EXE in the debugger, specifying your proxy generation DLL in the Project Settings menu box under the Additional DLLs box will cause no action.

  6. Using the Administrator program, perform an action that will cause your proxy generation DLL to be called. For example, create a new mailbox and switch to its E-Mail Addresses page.

The Administrator program calls MAD.EXE. This loads your DLL and calls its initialization routines, as well as any routines relevant to the action you just performed.

After your proxy generation DLL is loaded, open its source and set the breakpoints.

Using the Administrator program, perform additional actions that will call your proxy generation DLL. Now the debugger will stop at your breakpoints.

If you must begin tracing at your initialization code, set a hard-coded breakpoint in that code. After your proxy generation DLL is loaded by performing one of the previously described actions, the hard-coded breakpoint will be hit. You can trace your code in the debugger from that point.

Troubleshooting the Administrator Extension

The following steps show how to debug and set a breakpoint in an Administrator extension DLL in Visual C++ Version 6.0.

To debug and set a breakpoint in an administration extension DLL:

  1. Start Visual C++.

  2. From the File menu, choose Open, and select the EXCHSRVR\BIN\ADMIN.EXE file.

  3. From the Project menu, choose Settings.

  4. On the Debug page, add the name and full path of your extension DLL in the Additional DLLs dialog box.

  5. Open your extension DLL source, and set the breakpoints.

  6. To start the Microsoft Exchange Server Administrator and begin debugging, choose Debug, then Go, or simply press the F5 key. Check Yes for OK not to have debugging information for this file.

  7. Use the Administrator program to open a directory object on which your extension DLL is installed.

The Administrator program calls your DLL. The debugger will now stop at any breakpoints you have set.

Error Messages

The following are some of the error messages that might appear when using the sample gateway. This section shows you how to prevent these error messages from displaying:

Pop-up 2140 "internal inconsistency"Caused by the gateway not being completely configured. Make sure that directory paths for the directories are complete and that all fields have data in the Options tab of the gateway properties. This error usually appears when you start the Gateway Service.

Event ID 7023 "The SGW service terminated with the following error: The security account database contains an internal inconsistency."Caused by the service not being configured completely. Make sure the gateway is completely configured in the Options tab of the gateway properties.

Event ID 7023 "The SGW Service terminated with the following error: The service did not start due to a logon failure."Caused by duplicate keys in the registry for the message converter files or if the converter files are not available.

To prevent this error message:

Start Regedit, and go to the HKey_Local_Machine\Software\Classes\Mapi Conversions key.

Make sure there are only two entries in MAPI Conversions key, as shown in Figure 5.

Figure 5. The MAPI Conversions key should only contain the ipm_in.dll and the ipm_out.dll keys.

In the Ipm_in.dll key, there should be one key called GetTrivialVector. The GetTrivialVector key should contain the following three values:

Classes: REG_MUTI_SZ: MESSAGE.IPM REPORT.IPM
OPTIONS: REG_SZ: 
Point:REG_SZ:SAMPLEGW.INBOUND

In the Ipm_out.dll key, there should be one key called GetTrivialVector. The GetTrivialVector key should contain the following three values:

Classes: REG_MUTI_SZ: MESSAGE.IPM REPORT.IPM
OPTIONS: REG_SZ: 
Point:REG_SZ:SAMPLEGW.OUTBOUND

Event ID: 9 "The description for Event ID ( 9 ) in Source ( GWSAMPLE ) could not be found. It contains the following insertion string(s): SAMPLEGW.OUTBOUND, REPORT.IPM.NOTE.NDR."—This occurs because the MAPI Conversion registry setting is set to envelope.ipm only, and a report needs to be processed. To resolve this error, modify the Classes key of the IPM_IN and IPM_out .dll to key in the registry to be: Message.IPM REPORT.IPM.

Event ID: 9 "The description for Event ID ( 9 ) in Source ( GWSAMPLE ) could not be found. It contains the following insertion string(s): SAMPLE.INBOUND, ENVELOPE.IPM."—This is caused by the connector with a blank Converter field in the Options tab of the gateway properties. Enter the appropriate text in the Converter field. See Configuring and Starting the Sample Gateway for more information.

Pop-up box 1069 "the service did not start due to a logon failure"caused by one or more of the following conditions:

Make sure that the startup account has the correct password and the appropriate rights. Using Regedit, verify that the HKey_Local_Machine\Software\Classes\Mapi Conversions registry key has only two entries.

Event ID: 1026 "An error occurred with the following call stack: ..."caused by the PR_MESSAGE_SUBMISSION_ID or MTSID property containing a slash (/), semi-colon (;), or quotation marks("). Make sure the gateway does not add these characters to the PR_MESSAGE_SUBMISSION_ID or MTSID property.

Removing the Sample Gateway

This section shows you how to remove the sample gateway from your Exchange Server. The section assumes you have installed and configured the sample gateway according to Installing the Sample Gateway.

To remove the sample gateway:

  1. In Services of Control Panel, stop the Gateway Service.

  2. In the Configuration \ Site addressing \ Site Addressing tab, clear EDK address, and click OK. Click Yes to remove the address from all mailboxes, select Yes to start a process to remove the EDK e-mail address from all the mailboxes.

  3. Remove the Proxy Generator using the Proxy Generator Installer program with the /delete option:
    addrinst.exe /sitedn=/o=Organization/ou=Site /name=edk /machine=i386 /type=edk/proxydll=\\LPEverett5\address\edk\i386\proxygen.dll /server=LPEverett5/gwproxy=EDK:@Site.Organization.com /delete
    
  4. Remove the Address Generator object from the Configuration container and EDK Address Type from the Site Addressing container, using the Administrator Extension Installer program with the /delete option:
    extnist.exe /sitedn=/o=Organization/ou=Site /display_name="SGW SAMPLE GATEWAY EXTENSION" /machine=i386 /name=SGW /extdll=\\ LPEverett5\ADD-INS\SGW\i386\sgwadmin.dll /server=LPEverett5 /delete
    
  5. Remove the EDK Sample GATEWAY Extension from the Configuration/Add-Ins container using the Gateway Object Installer program with the /delete option:
    gwinst.exe /sitedn=/o=Organization/ou=Site /display_name=SGW /name=SGW:i386 /addrtype=edk /server= LPEverett5 /extname=SGW /delete
    
  6. Once routing has been recalculated, remove the SGW object from the Connection container and EDK entry from the Configuration/Site Addressing/Routing tab, using the Gateway Service Installer program with the /delete option:
    servinst.exe /sitedn=/o=Organization/ou=Site /display_name=SGW /service=SGW /exe=c:\SGW\gwsample.exe /server= LPEverett5 /objname=SGW:i386 /objtype=gateway /account=Domain\ Service-Account /password=Password /delete
    
  7. Use Regedit to delete the HKLM\SOFTWARE\CLASSES\MAPIConversions\ipm_in.dll and ipm_out.dll keys.

    Note   Third-party gateways installed in your Exchange Server may also use these keys. If you have other gateways installed on this machine, leave these keys intact.

  8. Delete the following files and folders:

Answers to Frequently Asked Questions about the Sample Gateway

Can I use the sample gateway to transfer mail from my foreign system to the Internet using the Exchange Intersite Messaging Service (IMS)?

You can modify the sample gateway to transfer mail from a foreign system to the Internet using the Exchange IMS. The sample translator DLL, IPM_IN.DLL, addresses the mail messages with EDK-encapsulated addresses. For mail—sent from a client on the foreign mail system addressed to an Internet user—to be routed out to the Internet, the IPM_IN.DLL must be modified to strip the EDK encapsulation for Internet bound messages and to use Simple Mail Transfer Protocol (SMTP) encapsulation instead.

The following illustration in Figure 6 shows how the IMS interacts with the gateway.

Figure 6. You can use the Exchange Intersite Messaging Service (IMS) to transfer mail from a foreign system to the Internet.

Does the sample gateway use Message Transfer Envelopes (MTEs)?

Yes, the sample gateway wraps the message incoming from a foreign system in an MTE before writing the message to the MTS-IN folder. The message that the gateway picks up from the MTS-OUT folder is also wrapped in an MTE.

How can I pre-configure the gateway?

Currently, the sample does not allow you to pre-configure the gateway.

What message classes does the sample gateway handle?

All gateways must be able to handle the following message classes:

Why aren't messages destined to a down-stream server successfully delivered?

Make sure the MTE information exists and is complete, and the message has an PR_MTS_ID MAPI property.

Can my gateway post messages to Public Folders that are not replicated to the gateway server?

Your Gateway Service can post messages to Public folders that are not replicated to the Exchange server by implementing one of the following options:

  1. Create a folder on the gateway server for the gateway to post messages. Replicate this folder to the other servers.

  2. Configure the gateway to post messages to a Public Folder on another Exchange server. Replicate the Public folder to the gateway server.

  3. Use a normal mailbox account and profile to log into the Public Folder store, and post messages using this normal mailbox account.

Additional References

To gain a better understanding of the technologies presented here, please consult the following resources found on MSDN:

--------------------------------------------

The information contained in this document represents the current view of Microsoft Corporation on the issues discussed as of the date of publication. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information presented after the date of publication.

This article is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT.

Microsoft is a registered trademark of Microsoft Corporation.

Other product or company names mentioned herein may be the trademarks of their respective owners.

Microsoft Corporation · One Microsoft Way · Redmond, WA 98052-6399 · USA