Configuration tasks required for Event Listener

The Event Listener component is an event sink that is installed as a COM+ component to Exchange Server. You must perform the following configuration tasks on the machine running Exchange Server:

  1. Create a user account for running event sinks and assign it the appropriate permissions. See Setting up a user account and permissions for event sinks.
  2. Register the Event Listener executable (BIA_Exchange.dll) on the Exchange Server machine. See Registering Event Listener.
  3. Create a COM+ application for Exchange Server and add the Event Listener component to it. See Creating a COM+ application.
  4. Modify the Event Listener configuration file. See Modifying the configuration file.
  5. Enable the Windows Event Viewer to display Event Listener messages. See Configuring the Windows Event Viewer for use with Event Listener.

Setting up a user account and permissions for event sinks

An Exchange Server event sink requires authentication before it can execute. Therefore, you must specify a Windows user account with permissions to execute the event sink. This document refers to this account by the general name Exchange_User.

Refer to the Microsoft Knowledge Base article 262054 (XADM: How to Get Service Account Access to All Mailboxes in Exchange 2000) for detailed information on creating the Windows user account.

Registering Event Listener

The Event Listener component must be registered on the Exchange Server machine with the Regsvr32 utility, as follows:

  1. Click Start --> Run. The Windows Run dialog box is displayed.
  2. In the Open field, type the following:
    regsvr32 installation_directory\BIA_Exchange.dll
    

    where installation_directory specifies the location in which you installed the BIA_Exchange.dll file (for example, C:\Program Files\Exchsrvr\bin).

    Windows displays a dialog box to confirm the successful registration of the Event Listener file.

Creating a COM+ application

Perform the following steps to create a COM+ application on your Exchange Server machine. This COM+ application is needed to run the Event Listener event sink.

  1. Click Start --> Programs --> Administrative Tools --> Component Services. The Component Services dialog box is displayed.
  2. Expand the Component Services tree by clicking the plus sign (+) next to it.
  3. Right-click the COM+ Applications folder under Component Services, and then click New --> Application. The COM Application Installation Wizard launches.
  4. Click Next on the Welcome dialog box. The Install or Create a New Application dialog box is displayed.
  5. Click Create an empty application. The Create Empty Application dialog box is displayed.
  6. Type BIA_Exchange in the Enter a name for the new application field.
  7. In the Activation type box, click Server application, and then click Next. The Set Application Identity dialog box is displayed.
  8. In the Account box, click This user, and then click Browse. The Select User or Group dialog box is displayed.
  9. Select the name of the Exchange user you set up in Setting up a user account and permissions for event sinks, and then click OK. The user name is inserted in the User field.
  10. In the Password field, type the password for the Exchange user.
  11. Retype the password in the Confirm password field, and then click Next.
  12. Click Finish to create the application and exit the wizard. The COM+ Applications folder now contains a BIA_Exchange application folder, with corresponding Components and Roles subdirectories underneath.

Adding Event Listener to the COM+ application

After you have created the new COM+ application, you must add the Event Listener component to it, as follows:

  1. Navigate to the BIA_Exchange application folder in the Component Services dialog box.
  2. Right-click the Components folder, and then click New. The COM Application Installation Wizard launches.
  3. Click Next on the Welcome dialog box. The Install or Create a New Application dialog box is displayed.
  4. Click Install new component(s), and then click Next. The Install new components dialog box opens.
  5. In the Files to install window, click Add.
  6. Browse for the BIA_Exchange.dll file you installed on the machine, and then click OK. The wizard analyzes the file and lists the Events component in the Components found window.
  7. Click Next, and then click Finish to exit the wizard. The BIA_Exchange.Events.1 component is placed in the BIA_Exchange application's Components folder.

Modifying the configuration file

The Event Listener requires a configuration file called BIA_Exchange.ini. This file contains configuration properties used by the Event Listener; Table 5 describes the properties you can need to edit or set.


Table 5. Event Listener configuration properties

Property Description Default value
CwEventID Identifies the last event ID used. zero (0)
CwEventUser Specifies the alias name of the Event Listener user. All events are stored in this user's Inbox. CwEvent
CwAgentUsername Specifies the full name of the user account associated with the connector. The Event Listener ignores events caused by this user. CwAgent
CwAgentUserGUID Specifies the GUID of the user account associated with the connector (for example, {31A42120 - 49B8 - 4B8F - A135 - 915C1AFF2BEC}). The Event Listener ignores events caused by this user. N/A
CwEventUsername Specifies the full name of the Event Listener user. The Event Listener ignores all events caused by this user. CwEvent
EventsTraceLevel Specifies the level of trace messages for the Event Listener. 0 (no tracing)

Make the following modifications to the file:

Configuring the Windows Event Viewer for use with Event Listener

The Event Listener logs its error and trace messages to the Windows Event Viewer. You must manually edit the Windows Registry to enable the Windows Event Viewer to find and properly display Event Listener messages.

Caution

Incorrectly editing the Windows Registry can cause problems with your machine. Use caution when editing the Registry. If you are unfamiliar with the Registry, seek assistance from a Windows system administrator.

Perform the following steps to update the Windows Registry:

  1. If the Windows Event Viewer is open, close it now.
  2. Click Start --> Run, and type regedit in the Run dialog box. The Windows Registry opens.
  3. Navigate to and highlight the key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\ Services\Eventlog\Application.
  4. Right-click to bring up the context menu, and then click New --> Key. A new key is added to the Registry under the Application key.
  5. Name the key BIA_Exchange.
  6. Right-click in the right pane of the Windows Registry to bring up the context menu. Click New --> String Value. A new entry is added.
  7. Name the new entry EventMessageFile.
  8. Double-click the EventMessageFile entry to open the Edit String dialog box.
  9. In the Value data field, specify the full path name for the BIA_Exchange.dll file (for example, ProductDir \connectors\Exchange\dependencies\eventListener\BIA_Exchange.dll), and then click OK.
  10. Right-click in the right pane of the Windows Registry to bring up the context menu. Click New --> DWORD Value. A new entry is added to the key.
  11. Name the new entry TypesSupported.
  12. Double-click the TypesSupported entry to open the Edit DWORD Value dialog box.
  13. Type 7 in the Value data field, and leave the default base (Hexadecimal) selected. Click OK.
  14. Click Registry --> Exit to close the Windows Registry.

Copyright IBM Corp. 1997, 2003