Platform SDK: Exchange Server

Installing the Sample Gateway

You can install the sample gateway either by using the GWSETUP.EXE program to automatically install all the gateway components, or by installing individual gateway components. See Installation Programs for information on how to install components. The GWSETUP.EXE executable is provided in binary form only.

To Installing the Sample Gateway Manually

Essential Steps

  1. Create the necessary directories to the proxy generating DLL and performance monitoring DLL. For this example, you will need a directory below the Address directory called EDK. For example,
    md c:\exchsrvr\address\EDK

    Then copy the corresponding DLLs to the new directory. In this case, copy the proxy DLL, and the performance DLL to this directory.

    copy c:\mssdk\samples\dbmsg\exchange\proxygen\release\proxygen.dll
         c:\exchsrvr\address\EDK\i386
    copy c:\mssdk\samples\dbmsg\exchange\libsrc\gwperf\Release\gwperf.dll
         c:\exchsrvr\address\EDK\i386
  2. Create the necessary directory to hold the administration program extension for the new gateway and then copy the DLL into it. For example,
    mkdir c:\exchsrvr\add-ins\sqw1\i386copy c:\mssdk\samples\dbmsg\exchange\sgwadmin\Release\sgwadmin.dll c:\exchsrvr\add-ins\sqw1\i386
  3. Create the shared directory used for sending and receiving messages, then copy the gateway executable to the services directory:
    mkdir c:\services\INmkdir c:\services\OUTcopy c:\mssdk\Samples\dbmsg\exchange\gwsample\Release\gwsample.exe c:\services net share services=c:\services /unlimited 
  4. Create the binary configuration file for the sample gateway using the CFGCODE sample executable. In this case, we'll use the gwsample.ini file that is located in the GWSAMPLE sample directory and save the binary data into a file called c:\gateway.dat.
    cfgcode.exe c:\mssdk\Samples\dbmsg\exchange\gwsample\gwsample.ini c:\gateway.dat /section=SGWData /Name=SGW1
  5. Install the message conversion DLLs for the gateway:
    xlatinst.exe /DLL=IPM_IN.DLL /CLASSES=ENVELOPE.IPM /OPTIONS=reg_sz /POINT=SAMPLEGW.INBOUNDxlatinst.exe /DLL=IPM_OUT.DLL /CLASSES=ENVELOPE.IPM /OPTIONS=reg_sz /POINT=SAMPLEGW.OUTBOUND

    Note that the DLLs IPM_OUT.DLL and IPM_IN.DLL are assumed to be in your current path.

  6. Install the address type for the sample gateway. Note that you must change the server names and directory path information to match your system. This example assumes the name of the server is TESTMACHINE and that the directory path information is o=TestOrganization and ou=TestSite.
    addrinst.exe /SITEDN=/o=TestOrganization/ou=TestSite /NAME=EDK /MACHINE=i386
        /TYPE=EDK
        /PROXYDLL=\\TESTSERVER\address\EDK\i386\proxygen.dll /SERVER=TESTSERVER
        /GWPROXY=EDK:%m@TestSite.TestOrganization.com
  7. Install the administrator program extension for the gateway:
    extninst.exe /SITEDN=/o=TestOrganization/ou=TestSite /DISPLAY_NAME="SGW1 EDK Sample Gateway Extension" /MACHINE=i386 /NAME=SGW1 /EXTDLL=\\TESTSERVER\add-ins\SGW1\i386\sgwadmin.dll /SERVER=TESTSERVER 
  8. Install the gateway object itself. This step uses the file c:\gateway.dat created with the earlier CFGCODE.exe step.
    gwinst.exe /SITEDN=/o=TestOrganization/ou=TestSite /DISPLAY_NAME=SGW1 /NAME=SGW1 /ADDRTYPE=EDK /SERVER=TESTSERVER /EXTDATA=c:\gateway.dat 

    The gwinst.exe source code can be found in the EdkInstu samples directory, normally c:\mssdk\samples\dbmsg\exchange\edkinstu\gwinst.

  9. Install the gateway service. This step requires specification of an account name (and its password) under which to run the service.
    servinst.exe /SITEDN=/o=TestOrganization/ou=TestSite /DISPLAY_NAME=SGW1 /SERVICE=SGW1 /EXE=c:\services\gwsample.exe /SERVER=TESTSERVER /OBJNAME=SGW1 /OBJTYPE=gateway /ACCOUNT=username /PASSWORD=password

Non-Essential Steps

You can perform the steps below to install optional things such as the performance monitoring DLL, the QUEVIEW sample application, and the "EDK" address template extension. These steps are as follows:

  1. Install the MAPI profile:
    profinst.exe /SERVICE=SGW1 /name=SGW1 /type=GATEWAY 
  2. Install the queue view extension
    mkdir c:\exchsrvr\add-ins\QUEVIEW\i386copy c:\mssdk\samples\dbmsg\exchange\samples\queview\Release\queview.dll c:\exchsrvr\add-ins\QUEVIEW\i386extninst.exe /SITEDN=/o=TestOrganization/ou=TestSite /DISPLAY_NAME="Queue View Extension Sample" /MACHINE=i386 /NAME=QUEVIEW /EXTDLL=\\TESTSERVER\add-ins\QUEVIEW\i386\queview.dll /SERVER=TESTSERVER 

The steps listed above are discussed in the section Writing a Setup Program.

You can verify that the gateway object is installed by looking in the Connections container inside the Microsoft Exchange Administrator program for the gateway name. This is the Display_Name entered in step 7 above. If the gateway name is not there, click Refresh on the Window menu in the Administrator program. The name should then appear.

The gateway setup program GWSETUP.EXE proceeds in a similar fashion to the manual installation instructions in the preceding section:

These functions are discussed in Writing the Setup Program.

To install the sample gateway using GWSETUP

  1. Select Sample Gateway Setup in the Microsoft Exchange Server SDK program group

– Or –

Change to the command prompt and run GWSETUP.EXE from the c:\mssdk\bin directory.

  1. Click Continue.
  2. Click Install.
  3. In the Choose Server dialog box, enter the name of the computer running Microsoft Exchange Server on which you want to install the gateway, and click Continue.
  4. In the Choose Site dialog box, select the site name for the gateway (for example, /o=Microsoft/ou=site) and click Continue.
  5. In the Directory Display Name field of the Install dialog box, type the name of the gateway to be used by the Microsoft Exchange Server Administrator program (for example, samplegw).
  6. In the Service Display Name field, enter the name to be displayed for the gateway when it is listed as a service. This name can be the same as the Directory Display Name.
  7. For Service Account, enter the Windows NT Server account that has been created for the gateway. The account must have "Log On as Service" rights. This should be specified as domain\account (for example, operations\gwuser).
  8. For Service Password, enter the password for the Windows NT Server account.
  9. For Service Directory, enter the directory for the gateway executable file, including the drive name. (C:\GW is the default directory.)
  10. Click Continue.

The setup program performs the following tasks:

You can verify that the gateway object is installed by looking in the Connections container inside the Microsoft Exchange Administrator program for the gateway name. This is the Directory Display Name entered in step 6 above. If the gateway name is not there, click Refresh on the Window menu in the Administrator program. The name should then appear.

The sample gateway uses the account and password information entered in steps 8 and 9 above. After the gateway service is installed, its associated account information can be changed through the Windows NT service control manager.