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. Under normal circumstances, this will also create the connector's user account.
  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

Exchange 2000 event sinks such as Event Listener run out-of-process and so must have some form of authentication before they can execute. Therefore you must create a user account with permissions to execute the event sink. This document refers to this account by the general name Exchange_User. In most circumstances this account will also serve as the connector's user account.

  1. Create a user account using Windows system administration tools. If the user is going to be part of a domain (usually the case), the user account must be added using Microsoft Active Directory. Otherwise, the user account must be created using the computer's Local Users and Groups program.
  2. Open the Exchange System Manager. You use this to set the new accounts permissions.
  3. Navigate through the server tree until you reach your server. For example, you might need to click through an administrative group and a server group.
  4. Right click on your server. A pop-up menu appears.
  5. Click Properties
  6. Click the Security tab.
  7. In the Name dialog box, click Add and then select a user from the list that appears.
  8. Select Full Control for the permission level.
  9. Click Okay.

Refer to the Microsoft Knowledge Base article 262054 (XADM: How to Get Service Account Access to All Mailboxes in Exchange 2000) for more information.

Note:
It may take a few hours for the change to take effect. If you wish the change to take place immediately, you may reboot your Exchange Server.

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

Event Listener requires a configuration file called BIA_Exchange.ini. This file contains configuration properties used by Event Listener; Table 6 describes the properties you need to edit or set. Usernames are specified here so that Event Listener can filter out events caused by itself, thereby avoiding the "ping-pong" effect.

Table 6. Event Listener configuration properties

Property Description Default value
CwEventID
Identifies the last event ID used. zero (0)
CWEventUser Specifies the User logon name for the Exchange_User account. The Event Listener sends its notifications to this account's mailbox. CwEvent
CwAgentUsername
Specifies the full name of the connector's account. In most cases this will be the same as Exchange_User, but it is possible to have two separate accounts, as long as permissions on both accounts have been set to have access to all mailboxes. CwAgent
CwAgentUserGUID
Specifies the GUID of the connector's account. In most cases this account will be the same as Exchange_User. N/A
CwEventUsername
Specifies the full name of the Exchange_User account. 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, 2004