Configure Message Tracking
Applies to: Exchange Server 2010 SP3, Exchange Server 2010 SP2
Message tracking records the SMTP transport activity of all messages transferred to and from a computer running Exchange 2010 that has the Hub Transport, Edge Transport, or Mailbox server role installed. You can use message tracking logs for message forensics, mail flow analysis, reporting, and troubleshooting.
Looking for other management tasks related to transport logs? Check out Managing Transport Logs.
Enable or disable message tracking
You need to be assigned permissions before you can perform this procedure. To see what permissions you need, see the "Hub Transport server" or "Edge Transport server" entries in the Transport Permissions topic and the "Mailbox server configuration" entry in the Mailbox Permissions topic.
Note
You can't use the EMC to enable or disable message tracking on Mailbox servers.
You can enable or disable message tracking on Hub Transport, Edge Transport, and Mailbox servers. By default, message tracking is enabled on all Exchange 2010 computers that have the Hub Transport, Edge Transport, or Mailbox server roles installed.
Use the EMC to enable or disable message tracking on transport servers
Perform one of the following steps:
On a computer that has the Edge Transport server role installed, select Edge Transport, and then in the action pane, click the Properties link that's directly under the server name.
On a computer that has the Hub Transport server role installed, in the console tree, expand Server Configuration, and select Hub Transport. In the action pane, click the Properties link that's directly under the server name.
On the Properties page, click the Log Settings tab.
In the Message tracking log section, perform one of the following steps:
Select Enable message tracking log to enable message tracking.
Clear Enable message tracking log to disable message tracking.
Click Apply to save changes and remain on the Properties page, or click OK to save changes and exit the Properties page.
Use the Shell to enable or disable message tracking on transport servers
This example disables message tracking on the Exchange 2010 computer Exchange01.
Set-TransportServer Exchange01 -MessageTrackingLogEnabled:$false
For detailed syntax and parameter information, see Set-TransportServer.
Use the Shell to enable or disable message tracking on Mailbox servers
This example disables message tracking on the Exchange 2010 computer Mailbox01.
Set-MailboxServer Mailbox01 -MessageTrackingLogEnabled:$false
For detailed syntax and parameter information, see Set-MailboxServer.
Configure the location of message tracking logs
You need to be assigned permissions before you can perform this procedure. To see what permissions you need, see the "Hub Transport server" or "Edge Transport server" entries in the Transport Permissions topic and the "Mailbox server configuration" entry in the Mailbox Permissions topic.
Note
You can't use the EMC to configure the location of message tracking logs on Mailbox servers.
By default, the message tracking logs are stored in the C:\Program Files\Microsoft\Exchange Server\V14\TransportRoles\Logs\MessageTracking directory. The directory must be local to the Exchange 2010 computer.
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
, event log errors are generated. The preferred method to disable message tracking is to use the MessageTrackingLogEnabled parameter with the Set-TransportServer cmdlet or the Set-MailboxServer cmdlet.
Use the EMC to change the location of message tracking logs on transport servers
Perform one of the following steps:
On a computer that has the Edge Transport server role installed, select Edge Transport, and then in the action pane, click the Properties link that's directly under the server name.
On a computer that has the Hub Transport server role installed, in the console tree, expand Server Configuration, and select Hub Transport. In the action pane, click the Properties link that's directly under the server name.
On the Properties page, click the Log Settings tab.
In the Message tracking log section, click Browse next to Message tracking log path.
In the Browse for folder window, browse to the new location where you want to store the message tracking log files. If you want to create a folder, select a parent folder, click Make New Folder, and then type the name of the new folder. After you make your folder selection, click OK to close the Browse for folder window.
Click Apply to save changes and remain on the Properties page, or click OK to save changes and exit the Properties page.
Use the Shell to change the location of message tracking logs on transport servers
To change the location of the message tracking logs on transport servers, use the following syntax.
Set-TransportServer <Identity> -MessageTrackingLogPath <LocalFilePath>
This example changes the location of the message tracking log to C:\Message Tracking on the Exchange 2010 computer Exchange01.
Set-TransportServer Exchange01 -MessageTrackingLogPath "C:\Message Tracking"
For detailed syntax and parameter information, see Set-TransportServer.
Use the Shell to change the location of message tracking logs on Mailbox servers
To change the location of message tracking logs on Mailbox servers, use the following syntax.
Set-MailboxServer <Identity> -MessageTrackingLogPath <LocalFilePath>
This example changes the location of the message tracking log to C:\Message Tracking on the Exchange 2010 computer Mailbox01.
Set-MailboxServer Mailbox01 -MessageTrackingLogPath "C:\Message Tracking"
For detailed syntax and parameter information, see Set-MailboxServer.
Configure the size of each message tracking log file
You need to be assigned permissions before you can perform this procedure. To see what permissions you need, see the "Hub Transport server" or "Edge Transport server" entries in the Transport Permissions topic and the "Mailbox server configuration" entry in the Mailbox Permissions topic.
Note
You can't use the EMC to configure the size of each message tracking log file.
By default, the maximum size for each message tracking log file is 10 megabytes (MB). When a message tracking log file reaches its maximum size, Exchange 2010 opens a new message tracking log file. This process continues until either the message tracking log directory reaches its specified maximum size or a message tracking log file reaches its specified maximum age. After the maximum size or age limit is reached, circular logging deletes the oldest message tracking log files.
Use the Shell to change the maximum size of each message tracking log file on transport servers
To change the maximum size of each message tracking log file on transport servers, use the following syntax.
Set-TransportServer <Identity> -MessageTrackingLogMaxFileSize <FileSize>
This example sets the maximum size of a message tracking log file to 20 MB on the Exchange 2010 computer Exchange01.
Set-TransportServer Exchange01 -MessageTrackingLogMaxFileSize 20MB
For detailed syntax and parameter information, see Set-TransportServer.
Use the Shell to change the maximum size of each message tracking log file on Mailbox servers
To change the maximum size of each message tracking log file on Mailbox servers, use the following syntax.
Set-MailboxServer <Identity> -MessageTrackingLogMaxFileSize <FileSize>
This example sets the maximum size of a message tracking log file to 20 MB on the Exchange 2010 computer Mailbox01.
Set-MailboxServer Mailbox01 -MessageTrackingLogMaxFileSize 20MB
For detailed syntax and parameter information, see Set-MailboxServer.
Configure the size of the message tracking log directory
You need to be assigned permissions before you can perform this procedure. To see what permissions you need, see the "Hub Transport server" or "Edge Transport server" entries in the Transport Permissions topic and the "Mailbox server configuration" entry in the Mailbox Permissions topic.
Note
You can't use the EMC to configure the size of the message tracking log directory.
By default, the maximum size for the whole message tracking log directory is 250 MB. Circular logging deletes the oldest message tracking log files when either a message tracking log file reaches its specified maximum age, or the message tracking log directory reaches its specified maximum size.
Important
The maximum size of the message tracking log directory is calculated as the total size of all log files that have the same name prefix. Other files that don't follow the name prefix convention aren't counted in the total directory size calculation. Renaming old log files or copying other files into the message tracking log directory could cause the directory to exceed its specified maximum size.
When the Hub Transport server role and the Mailbox server role are installed on the same server, the maximum size of the message tracking log directory isn't the specified maximum size because the message tracking log files generated by the different server roles have different name prefixes.
Message tracking log files for the Hub Transport server role or Edge Transport server role begin with the name prefix MSGTRK. Message tracking log files for the Mailbox server role begin with the name prefix MSGTRKM. When the Hub Transport server role and the Mailbox server role are installed on the same server, the maximum size of the message tracking log directory is two times the specified value.
Use the Shell to change the maximum size of the message tracking log directory on transport servers
To change the maximum size of the message tracking log directory on transport servers, use the following syntax.
Set-TransportServer <Identity> -MessageTrackingLogMaxDirectorySize <DirectorySize>
This example sets the maximum size of the message tracking log directory to 400 MB on the Exchange 2010 computer Exchange01.
Set-TransportServer Exchange01 -MessageTrackingLogMaxDirectorySize 400MB
For detailed syntax and parameter information, see Set-TransportServer.
Use the Shell to change the maximum size of the message tracking log directory on Mailbox servers
To change the maximum size of the message tracking log directory on Mailbox servers, use the following syntax.
Set-MailboxServer <Identity> -MessageTrackingLogMaxDirectorySize <DirectorySize>
This example sets the maximum size of the message tracking log directory to 400 MB on the Exchange 2010 computer Mailbox01.
Set-TransportServer Mailbox01 -MessageTrackingLogMaxDirectorySize 400MB
For detailed syntax and parameter information, see Set-MailboxServer.
Configure the age of message tracking logs
You need to be assigned permissions before you can perform this procedure. To see what permissions you need, see the "Hub Transport server" or "Edge Transport server" entries in the Transport Permissions topic and the "Mailbox server configuration" entry in the Mailbox Permissions topic.
Note
You can't use the EMC to configure the age of message tracking logs.
By default, the maximum age for any message tracking log file is 30 days. Circular logging deletes the oldest message tracking log files if the message tracking log directory reaches its specified maximum size or a message tracking log file reaches its specified maximum age.
Use the Shell to change the maximum age of message tracking logs on transport servers
To change the maximum age of message tracking logs on transport servers, use the following syntax.
Set-TransportServer <Identity> -MessageTrackingLogMaxAge <Age>
This example changes the maximum age of a message tracking log file to 45 days on the Exchange 2010 computer Exchange01.
Set-TransportServer Exchange01 -MessageTrackingLogMaxAge 45.00:00:00
For detailed syntax and parameter information, see Set-TransportServer.
Use the Shell to change the maximum age of message tracking logs on Mailbox servers
To change the maximum age of message tracking logs on Mailbox servers, use the following syntax.
Set-MailboxServer <Identity> -MessageTrackingLogMaxAge <Age>
This example changes the maximum age of a message tracking log file to 45 days on the Exchange 2010 computer Mailbox01.
Set-MailboxServer Mailbox01 -MessageTrackingLogMaxAge 45.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 through 24855.03:14:07. Setting the value of the MessageTrackingLogMaxAge parameter to 00:00:00
prevents the automatic removal of message tracking log files because of their age.
For detailed syntax and parameter information, see Set-MailboxServer.
Configure message subject logging in message tracking logs
You need to be assigned permissions before you can perform this procedure. To see what permissions you need, see the "Hub Transport server" or "Edge Transport server" entries in the Transport Permissions topic and the "Mailbox server configuration" entry in the Mailbox Permissions topic.
Note
You can't use the EMC to configure message subject logging in message tracking logs.
By default, the subject line of an SMTP e-mail message is stored in the message tracking log. However, you may want to disable message subject logging to comply with increased security or privacy requirements. Before you enable or disable message subject logging, verify your organization's policy about revealing subject line information.
Use the Shell to enable or disable message subject logging in message tracking logs on transport servers
To enable or disable message subject logging in message tracking logs on transport servers, use the following syntax.
Set-TransportServer <Identity> -MessageTrackingLogSubjectLoggingEnabled <$true|$false>
This example disables message subject tracking on the Exchange 2010 computer Exchange01.
Set-TransportServer Exchange01 -MessageTrackingLogSubjectLoggingEnabled $false
For detailed syntax and parameter information, see Set-TransportServer.
Use the Shell to enable or disable message subject logging in message tracking logs on Mailbox servers
To enable or disable message subject logging in message tracking logs on Mailbox servers, use the following syntax.
Set-MailboxServer <Identity> -MessageTrackingLogSubjectLoggingEnabled <$true|$false>
This example disables message subject tracking on the Exchange 2010 computer Mailbox01.
Set-MailboxServer Mailbox01 -MessageTrackingLogSubjectLoggingEnabled $false
For detailed syntax and parameter information, see Set-MailboxServer.
© 2010 Microsoft Corporation. All rights reserved.