PROXYGEN: Generating a Proxy Address

PROXYGEN is a DLL that generates a proxy address of type EDK for the sample gateway. It creates the address from a combination of site and recipient attributes as determined by the site level proxy.

PROXYGEN demonstrates the use of the following functions:

RcInitProxies_edk_RcInitProxies

RcGenerateProxy_edk_RcGenerateProxy

RcValidateProxy_edk_RcValidateProxy

FreeProxy_edk_FreeProxy

To use it, you must first install the EDK address type by running the sample gateway setup program.

    To build PROXYGEN
  1. Change to the \BKOFFICE\SAMPLES\EXCHANGE\PROXYGEN directory.
  2. Type NMAKE.

When you modify an existing proxy address, Microsoft Exchange Server automatically calls the proxy generation DLL to validate the changes. If the modified address contains invalid characters or other errors, Microsoft Exchange Server displays an error message and the DLL writes an error message to the Windows NT Application event log. The RcValidateProxy routine in PROXYGEN verifies that a manually entered proxy is valid.

The PROXYGEN DLL demonstrates several features for creating and modifying proxy addresses. You can use these features or similar ones in your gateway. For complete information, see the PROXYGEN sample code. The following is a summary of PROXYGEN features:

%s Substitute the user's surname.
%g Substitute the user's given name.
%d Substitute the user's display name.
%m Substitute the user's mailbox (alias) name.
%% Substitute a single %.
%r Substitute characters within a format string. See the following paragraph for details.

In all the substitutions listed in the table, spaces and illegal characters will be removed from the field before the substitution is made. If there is no format field, the site proxy address format is equivalent to:

EDK: %m@domain

Use the %r symbol to specify replacing one character with another in subsequent substitutions in the format string. For example, the format

%g%r ch1 ch2 %s

means that all instances of the character ch1 will be replaced by ch2 in all surnames as the proxy addresses are generated. In this case, since the %r symbol follows %g, given names are inserted in the proxy address with no character replacements.

You can use the path that is set up for PROXYGEN to test your own proxy generation DLL. The Address Types property page in the Microsoft Exchange Server Administrator program shows the display name and path of the proxy generation DLL. For testing, you can edit the proxy address path to point to your own proxy generation DLL. This way you can check if the DLL is generating the correct proxy address without having to install a new address type.

If you use this method, however, your DLL must produce addresses that begin with "EDK."