Thursday, 19 March 2015

Message Tracking in Exchange Server 2010

Message Tracking is one cool troubleshooting tool in message routing. Message Tracking keeps track of flow of messages into and out of an organization. This feature maintains daily log files which can be used to check the status of messages sent, received and those in queues to be delivered. We can also use Message tracking to monitor public folder usage.
By default, all Hub Transport, Mailbox servers and Edge Transport servers perform message tracking. We can enable or disable message tracking on per-server basis depending upon the requirements.
We can use below Power Shell cmdlets to enable or disable message tracking. The following example disables the message tracking feature.
Set-TransportServer -Identity "MailServer16" -MessageTrackingLogEnabled $false
Change Log File Path
By default, message tracking logs are stored in the %ExchangeInstallPath%\TransportRoles\Logs\MessageTracking directory.
We can change the default message tracking log path by running this command.
Set-TransportServer -Identity "MailServerXXX" -MessageTrackingLogPath "F:\Msg_Tracking"
Note When we change the location of the message tracking directory, Exchange Server does not copy any existing tracking logs from the old directory to the new one. We must manually copy the old logs to the new location if we want all the logs to be in the same location.
Setting Log file Size
By default, the maximum log file size is 10 megabytes (MB). We can change this behavior by setting the -MessageTrackingLogMaxFileSize parameter to the desired maximum file size. The following example sets the message log file size to 100 MB:
Set-TransportServer -Identity "MailServerXXX" -MessageTrackingLogMaxFileSize "100MB"
Configuring Subject Logging
By default, subject logging is enabled on all Hub Transport, Edge Transport, and Mailbox servers, which allows us to perform searches based on message subject lines, header information, sender, and recipient. We can disable this feature by setting -MessageTrackingLogSubjectLoggingEnabled parameter of the Set-TransportServer cmdlet to $false, as shown in the following example:
Set-TransportServer -Identity "MailServerXXX" -MessageTrackingLogSubjectLoggingEnabled $false

Configuring Maximum Log File Age

Exchange Server overwrites the oldest message tracking logs automatically when tracking logs reach a maximum age or when the maximum log directory size is reached. By default, the maximum age is 30 days and the maximum log directory size is 250 MB.
In this example, we will set the maximum log age to 60 days.(format will be DD.HH.MM.SS)
Set-TransportServer -Identity "MailServerXXX" -MessageTrackingLogMaxAge "60.00:00:00"
 You can set the maximum log directory size using the -MessageTrackingLogMaxDirectorySize parameter. As with the maximum log file size, the qualifiers are B, KB, MB, and GB. The following example sets the maximum log directory size to 1 GB:
Set-TransportServer -Identity "MailServerXXX" -MessageTrackingLogMaxDirectorySize "1GB"

No comments:

Post a Comment