Export (0) Print
Expand All

How to Configure Message Tracking

 

Applies to: Exchange Server 2007 SP3, Exchange Server 2007 SP2, Exchange Server 2007 SP1, Exchange Server 2007

Topic Last Modified: 2009-09-23

This topic explains how to use the Exchange Management Console and the Exchange Management Shell to configure message tracking in Microsoft Exchange Server 2007.

noteNote:
Any message tracking settings that are configurable by using the Exchange Management Console are available only in Microsoft Exchange Server 2007 Service Pack 1 (SP1). All message tracking settings are configurable by using the Exchange Management Shell in Exchange 2007 SP1 and in the release to manufacturing (RTM) version of Microsoft Exchange Server 2007.

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.

To perform the following procedures, the account you use must be delegated the following:

  • Exchange Organization Administrator role

To perform the following procedures on a computer that has the Edge Transport server role installed, you must log on by using an account that is a member of the local Administrators group on that computer.

For more information about permissions, delegating roles, and the rights that are required to administer Exchange 2007, see Permission Considerations.

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.

By default, message tracking is enabled on all Exchange 2007 computers that have the Hub Transport, Mailbox, or Edge Transport server roles installed.

noteNote:
You can enable or disable message tracking by using the Exchange Management Console only in Exchange 2007 SP1.

  1. Open the Exchange Management Console. 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 is 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 is directly under the server name.

  2. In the Properties page, click the Log Settings tab.

  3. 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.

  4. Click Apply to save changes and remain in the Properties page, or click OK to save changes and exit the Properties page.

  • Run the following command:

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

    For example, to disable message tracking on an Exchange 2007 computer that is named Exchange01, run the following command:

    Set-TransportServer Exchange01 -MessageTrackingLogEnabled $false
    

  • Run the following command:

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

    For example, to disable message tracking on an Exchange 2007 computer that is named Mailbox01, run the following command:

    Set-MailboxServer Mailbox01 -MessageTrackingLogEnabled $false
    

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.

noteNote:
You can configure the location of the message tracking logs by using the Exchange Management Console only in Exchange 2007 SP1.

  1. Open the Exchange Management Console. 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 is 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 is directly under the server name.

  2. In the Properties page, click the Log Settings tab.

  3. In the Message tracking log section, click Browse next to Message tracking log path.

  4. 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 new 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.

  5. Click Apply to save changes and remain in the Properties page, or click OK to save changes and exit the Properties page.

  • Run the following command:

    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"
    

  • Run the following command:

    Set-MailboxServer <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 Mailbox01, run the following command:

    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.

By default, the maximum size for each message tracking log file is 10 MB. When a message tracking log file reaches its maximum size, Exchange 2007 opens a new message tracking log file. This process continues until either of the following conditions is true:

  • The message tracking log directory reaches its specified maximum size. For more information about how to change the maximum size of the message tracking log directory, see "Configuring the Maximum Size of the Message Tracking Log Directory" later in this topic.

  • A message tracking log file reaches its specified maximum age. For more information about how to change the maximum age for a message tracking log file, see "Configuring the Maximum Age for the Message Tracking Log" later in this topic.

After the maximum size or age limit is reached, circular logging deletes the oldest message tracking log files.

noteNote:
By default, the transport logging process has a logging level value of 0 (Lowest). If you want Microsoft Exchange to write an event log entry when circular logging removes a log file, you must change the logging level value of the transport logging process to 5 (Maximum) or 7 (Expert). For more information, see How to Change Logging Levels for Exchange Processes.

  • Run the following command:

    Set-TransportServer <Identity> -MessageTrackingLogMaxFileSize <FileSize>
    

    For example, to set the maximum size of a message tracking log file to 20 MB on an Exchange 2007 computer that is named Exchange01, run the following command:

    Set-TransportServer Exchange01 -MessageTrackingLogMaxFileSize 20MB
    

  • Run the following command:

    Set-MailboxServer <Identity> -MessageTrackingLogMaxFileSize <FileSize>
    

    For example, to set the maximum size of a message tracking log file to 20 MB on an Exchange 2007 computer that is named Mailbox01, run the following command:

    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)

Unqualified values are treated as bytes. The value of the MessageTrackingLogMaxFileSize parameter must be less than or equal to the value of the MessageTrackingLogMaxDirectorySize parameter. The valid input range for either parameter is 1 to 9223372036854775807 bytes.

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 of the following conditions is true:

  • A message tracking log file reaches its specified maximum age.

  • The message tracking log directory reaches its specified maximum size.

    importantImportant:
    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 do not follow the name prefix convention are not 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 is not the specified maximum size because the message tracking log files that are 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.

  • Run the following command:

    Set-TransportServer <Identity> -MessageTrackingLogMaxDirectorySize <DirectorySize>
    

    For example, to set the maximum size of the message tracking log directory to 400 MB on an Exchange 2007 computer that is named Exchange01, run the following command:

    Set-TransportServer Exchange01 -MessageTrackingLogMaxDirectorySize 400MB
    

  • Run the following command:

    Set-MailboxServer <Identity> -MessageTrackingLogMaxDirectorySize <DirectorySize>
    

    For example, to set the maximum size of the message tracking log directory to 400 MB on an Exchange 2007 computer that is named Mailbox01, run the following command:

    Set-TransportServer Mailbox01 -MessageTrackingLogMaxDirectorySize 400MB
    

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

  • B (bytes)

  • KB (kilobytes)

  • MB (megabytes)

  • GB (gigabytes)

  • TB (terabytes)

Unqualified values are treated as bytes. The value of the MessageTrackingLogMaxFileSize parameter must be less than or equal to the value of the MessageTrackingLogMaxDirectorySize parameter. The valid input range for either parameter is 1 to 9223372036854775807 bytes.

By default, the maximum age for any message tracking log file is 30 days. Circular logging deletes the oldest message tracking log files if either of the following conditions is true:

  • The message tracking log directory reaches its specified maximum size.

  • A message tracking log file reaches its specified maximum age.

noteNote:
By default, the transport logging process has a logging level value of 0 (Lowest). If you want Microsoft Exchange to write an event log entry when circular logging removes a log file, you must change the logging level value of the transport logging process to 5 (Maximum) or 7 (Expert). For more information, see How to Change Logging Levels for Exchange Processes.

  • Run the following command:

    Set-TransportServer <Identity> -MessageTrackingLogMaxAge <Age>
    

    For example, if you want to change the maximum age of a message tracking log file to 45 days on an Exchange 2007 computer that is named Exchange01, run the following command:

    Set-TransportServer Exchange01 -MessageTrackingLogMaxAge 45.00:00:00
    

  • Run the following command:

    Set-MailboxServer <Identity> -MessageTrackingLogMaxAge <Age>
    

    For example, if you want to change the maximum age of a message tracking log file to 45 days on an Exchange 2007 computer that is named Mailbox01, run the following command:

    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 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.

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, make sure that you verify your organization's policy about revealing subject line information.

  • Run the following command:

    Set-TransportServer <Identity> -MessageTrackingLogSubjectLoggingEnabled <$true|$false>
    

    For example, if you want to disable message subject tracking on an Exchange 2007 computer that is named Exchange01, run the following command:

    Set-TransportServer Exchange01 -MessageTrackingLogSubjectLoggingEnabled $false
    

  • Run the following command:

    Set-MailboxServer <Identity> -MessageTrackingLogSubjectLoggingEnabled <$true|$false>
    

    For example, if you want to disable message subject tracking on an Exchange 2007 computer that is named Mailbox01, run the following command:

    Set-MailboxServer Mailbox01 -MessageTrackingLogSubjectLoggingEnabled $false
    

For detailed syntax and parameter information, see Set-TransportServer and Set-MailboxServer.

For more information about message tracking, see Managing Message Tracking.

 
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft