Enabling Message Tracking

Enabling Message Tracking


You want to enable Message Tracking on an Exchange Server 2003 computer.


Using a graphical user interface
  1. Prepare a directory on the local hard drive (preferably on a separate physical disk from the Exchange stores) to accept the tracking log directory.

  2. Open the Exchange System Manager (ESM) snap-in.

  3. In the lefthand pane, browse to the server for which you wish to enable message tracking.

  4. Right-click the Server object and select Properties.

  5. On the General tab, place a check mark next to "Enable message tracking" and "Remove log files." Enter the number of days you wish to retain the logfiles for and click Apply.

  6. Click OK once you've read the warning message.

  7. Ensure that the process has created a share called %servername%.log and that the share is accessible to those users whose responsibilities involve running message traces.

Using a command-line interface
	> adfind -config b "<cn=ServerName>,cn=Servers,cn=<Administrative Group Name,
	cn=Administrative Groups,cn=<Exchange Organization>,cn=Microsoft
	Exchange,cn=Services" dsq | admod messageTrackingEnabled::TRUE
	msExchTrkLogCleaningInterval::<Cleanup Interval in Days>

Once you have enabled these two settings in Active Directory, you should modify the following registry key on the Exchange server in question to prevent the Message Tracking Logs from being stored in the same directory as the Information Store:

	LogDirectory - REG_SZ:<PathToLoggingDirectory>

	' This code enables  
Message Tracking for an Exchange Server.
	strConnectionDN = "<Server Name><ParentDN>"
	strLogPath = "<LogFilePath>" ' e.g. D:\Program Files\ExchangSrvr\Logs
	strCleanupInterval = "<CleanupInterval>" ' From 1  99
	                                         ' Set to 0 to retain indefinitely

	Const HKEY_LOCAL_MACHINE = &H80000002 ' For configuring the Registry
	strComputer = "<ComputerName>" ' Use "." for the local computer
	strKeyPath = "SYSTEM\CurrentControlSet\Services\" & _
	strValueName = "LogDirectory"
	strValue = "<PathToLoggingDirectory>"
	' ------ END CONFIGURATION ---------

	' First configure the relevant AD attributes

	Set objServer = GetObject ("LDAP://" & strConnectionDN)

	objServer.Put "messageTrackingEnabled", "TRUE"
	objServer.Put "msExchTrkLogCleaningInterval", strCleanupInterval

	' Now configure the relevant Registry key

	Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
	    strComputer & "\root\default:StdRegProv")
	oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue


Message Tracking Logs are an invaluable aid to troubleshooting message delivery in any Exchange Server environment. A message can be tracked from submission to the Information Store all the way through to its departure out of the Exchange environment. As long as the administrator doing the tracking has the rights to and can resolve the NetBIOS name of each server along the message path, the administrator will be able to see how a particular message traveled through the network and how long it took to go through each server.

You can also configure Message Tracking using a System Policy, which will allow you to apply the same setting to multiple servers.

See Also

MS KB 246856 (How to Enable Message Tracking in Exchange 2000 Server and in Exchange Server 2003)

 Python   SQL   Java   php   Perl 
 game development   web development   internet   *nix   graphics   hardware 
 telecommunications   C++ 
 Flash   Active Directory   Windows