Saturday, May 5, 2007

Message Tracking logs Exchange 2007

How to Configure Message Tracking logs in Exchange 2007, I have copied the EMS code as it is from TechNet website.

Open the Exchange management Shell, for some reason I feel like I need more room When management shell opens up which points to the Desktop of the users who logged in, so I am typing CD /. And pressing Enter taking me to the C (root), typing CLS quickly is clearing my window.

Let's set the transaction logs to 15 days

[PS] C:\>Set-TransportServer -Identity exc07 -MessageTrackingLogEnabled:$true

WARNING: The command completed successfully but no settings of 'EXC07' have been modified. Now

[PS] C:\>Set-TransportServer -Identity exc07 -MessageTrackingLogMaxAge 15.00:00:00


To specify an age value, enter it as a time span, as follows: dd.hh:mm:ss where d = days, h = hours, m = minutes, and s = seconds. The valid input range for this parameter is 00:00:00 to 24855.03:14:07. Setting the value of the MessageTrackingLogMaxAge parameter to 00:00:00 prevents the automatic removal of message tracking log of files because of their age.

Message tracking records the Simple Mail Transfer Protocol (SMTP) transport activity of all messages that are transferred to and from an Exchange 2007 computer that has the Hub Transport, Mailbox, or Edge Transport server role installed. You can use message tracking logs for message forensics, mail flow analysis, reporting, and troubleshooting

TechNet home Exchange 2007

To modify the message tracking settings on a server that has both the Mailbox server role and the Hub Transport server role installed, use the Set-MailboxServer cmdlet or the Set-TransportServer cmdlet.

Below is the command for disabling or enabling message tracking on Hun transport Edge Transport server

Set-TransportServer <Identity> -MessageTrackingLogEnabled <$true $false>

Set-TransportServer Exchange01 -MessageTrackingLogEnabled:$false

MailBox Server

Set-MailboxServer <Identity> -MessageTrackingLogEnabled <$true $false>

Set-MailboxServer Mailbox01 -MessageTrackingLogEnabled:$false


Configuring the Location of Message Tracking Logs

By default, the message tracking logs are stored in the C:\Program Files\Microsoft\Exchange Server\TransportRoles\Logs\MessageTracking directory. The directory must be local to the Exchange 2007 computer. In a single copy cluster (SCC) environment, move the message tracking log directory to a physical disk resource that is located on the shared storage resource. This enables searches of message tracking logs to continue to function if a failover occurs.

Edge Transport server

Set-TransportServer <Identity> -MessageTrackingLogPath <LocalFilePath>

For example, to change the location of the message tracking log to C:\Message tracking on an Exchange 2007 computer that is named Exchange01, run the following command:

Set-TransportServer Exchange01 -MessageTrackingLogPath "C:\Message Tracking"

Set-MailboxServer Mailbox01 -MessageTrackingLogPath "C:\Message Tracking"


If you set the value of the MessageTrackingLogPath parameter to $null, you effectively disable message tracking. However, if you set the value of the MessageTrackingLogPath parameter to $null when the value of the MessageTrackingLogEnabled attribute is $true, you will generate event log errors. The preferred method to disable message tracking is to use the MessageTrackingLogEnabled parameter with the Set-TransportServer cmdlet or the Set-MailboxServer cmdlet.

When you change the location of the message tracking log directory, this change does not copy any existing log files from the old directory to the new directory. The new message tracking log directory is active almost immediately after the configuration change, but any existing log files are left in the old directory.

The following permissions are required on the message tracking log directory:

  • Administrator: Full Control
  • System: Full Control
  • Network Service: Read, Write, and Delete Subfolders and Files

By default, the Exchange Transport service uses the security credentials of the Network Service user account to create the new message tracking log directory and apply the correct permissions. If the new message tracking log directory does not already exist, and the Network Service account has the rights that are required to create folders and apply permissions at the new location, the new message tracking log directory is created and the correct permissions are applied to the new directory. If the new message tracking log directory already exists, the existing folder permissions are not checked. Whenever you move the message tracking log directory by using the MessageTrackingLogPath parameter with the Set-TransportServer cmdlet or the Set-MailboxServer cmdlet, it is always a good idea to verify the new message tracking log directory and to verify that the new directory has the correct permissions applied to it. If your change to the message tracking log directory is not successful, you can create the new message tracking log directory and apply the correct permissions to it before you use the MessageTrackingLogPath parameter with the Set-TransportServer cmdlet or the Set-MailboxServer cmdlet.


Set-TransportServer <Identity> -MessageTrackingLogMaxFileSize <FileSize>

Set-TransportServer Exchange01 -MessageTrackingLogMaxFileSize 20MB

Set-MailboxServer <Identity> -MessageTrackingLogMaxFileSize <FileSize>

Set-MailboxServer Mailbox01 -MessageTrackingLogMaxFileSize 20MB

When you enter a value for the MessageTrackingLogMaxFileSize parameter, qualify the value with one of the following units:

  • B (bytes)
  • KB (kilobytes)
  • MB (megabytes)
  • GB (gigabytes)
  • TB (terabytes)

Oz Ozugurlu

No comments: