Search
Windows Server

Monitoring Exchange Server 2010 : Monitoring Mail Flow (part 1) - Configuring Message Tracking

Published 6 min readBy Programming4us Editorial Team
One of the most important things you need to monitor in your Exchange organization is how well messages are flowing through your email system. Message queues are probably inevitable in a busy Exchange environment, but are the correct messages in the appropriate queues, are they staying in queues for too long, are queues being retried when appropriate, and how do you track messages that appear to have been lost or stuck in the system?

In this lesson, you will look at how you configure message tracking and message tracking log files. You will look at how you view, retry, and delete message queues. The lesson covers back-pressure thresholds and whether NDRs are sent when specific types of messages (for example, suspected spam messages) are deleted.

1. Configuring Message Tracking

Message tracking tracks all messages transferred to and from an Exchange Server 2010 Hub Transport, Edge Transport, or Mailbox server. Message tracking logs assist in mail flow analysis, reporting, and troubleshooting. By default, message tracking is enabled on all Exchange Server 2010 Hub Transport, Edge Transport, or Mailbox servers. You can use the EMS and (for a limited number of settings) the EMC to configure message tracking. Note that this section discusses message tracking configuration. How you track messages and view message tracking reports is covered later in this lesson.


Note:

LIMITATION TO USING THE EMC

You can use the EMC to configure some message tracking settings on a Hub Transport or Edge Transport server. You cannot use the EMC to configure message tracking on a Mailbox server that does not also have the Hub Transport role installed. Also, you cannot use the EMC to configure the maximum size or age of message tracking log files or the maximum size of the message tracking log file directory. You cannot use the EMC to configure message subject logging in message tracking logs.


1.1. Enabling or Disabling Message Tracking and Changing the Log Path

To use the EMC to enable or disable message tracking on a Hub Transport server, carry out the following procedure:

  1. Open the EMC and expand the Console tree.

  2. In the Console tree, select Hub Transport under Server Configuration.

  3. In the Action pane, click Properties directly under the server name.

  4. In the Properties dialog box, click the Log Settings tab, as shown in Figure 1.

    Figure 1. The Log Settings tab of the server Properties dialog box


  5. In the Message Tracking Log section, you can select or clear the Enable Message Tracking Log check box to enable or disable message tracking. If message tracking is enabled, you can, if required, change the default path to the message tracking log. Note that you cannot use the EMC to change the path to the message tracking log on Mailbox servers that do not also have the Hub Transport role installed.

  6. Click OK to save your changes and close the Properties dialog box.

To use the EMS to enable or disable message tracking and to change the path to the message tracking log, you enter a command based on the Set-TransportServerSet-MailboxServer cmdlet. For example, the following command disables message tracking on the Exchange Server 2010 Hub Transport server VAN-EX1: or

Set-TransportServer -Identity VAN-EX1 -MessageTrackingLogEnabled:$false

The following command enables message tracking on the Exchange Server 2010 Mailbox server VAN-EX2:

Set-MailboxServer -Identity VAN-EX2 -MessageTrackingLogEnabled:$true

The following command changes the path to the message tracking log on Hub Transport server VAN-EX1 to C:\Logfiles\MessageTracking:

Set-TransportServer -Identity VAN-EX1 -MessageTrackingLogPath C:\Logfiles\
MessageTracking

The following command changes the path to the message tracking log on Mailbox server VAN-EX2 to C:\Logfiles\Tracking\MessageLogs:

Set-TransportServer -Identity VAN-EX2 -MessageTrackingLogPath C:\Logfiles\Tracking\
MessageLogs


1.2. Configuring the Size and Age of Message Tracking Log Files

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 Server 2010 opens a new message tracking log file. This continues until the message tracking log directory reaches its specified maximum size (by default 250 MB) or until a message tracking log file reaches its specified maximum age (by default 30 days). In either of these cases, Exchange Server 2010 deletes the oldest message tracking log file.

You can use the EMS (but not the EMC) to change the maximum size of each message tracking log file, the maximum age of each message tracking log file, and the maximum size for the entire message tracking log directory on Hub Transport, Edge Transport, and Mailbox servers.

The following command changes the maximum size of each message tracking log file on the Hub Transport server VAN-EX1 to 15MB (the same command would work on an Edge Transport server):

Set-TransportServer -Identity VAN-EX1 -MessageTrackingLogMaxFileSize 15MB

The following command changes the maximum age of each message tracking log file on the Hub Transport server VAN-EX1 to 35 days (as before, the same command would work on an Edge Transport server):

Set-TransportServer -Identity VAN-EX1 -MessageTrackingLogMaxAge 35.00:00:00

The following command changes the maximum size of the message tracking log file directory on the Hub Transport server VAN-EX1 to 300 MB (again the same command would work on an Edge Transport server):

Set-TransportServer -Identity VAN-EX1 -MessageTrackingLogMaxDirectorySize 300MB


The commands to configure maximum log size and age and the maximum size of the message tracking log file directory on a Mailbox server are similar, except that the Set-MailboxServer cmdlet is used. Note that if an Exchange Server 2010 server holds both the Mailbox and the Hub Transport roles, the effective maximum size of its message tracking log file directory is twice the size that is specified because message tracking log files for the mailbox and the transport functions have different prefixes. File prefixes are discussed later in this lesson.

The following command changes the maximum size of each message tracking log file on the Mailbox server VAN-EX2 to 20 MB:

Set-MailboxServer -Identity VAN-EX2 -MessageTrackingLogMaxFileSize 20MB

The following command changes the maximum age of each message tracking log on the Mailbox server VAN-EX2 to 40 days:

Set-MailboxServer -Identity VAN-EX2 -MessageTrackingLogMaxAge 40.00:00:00

The following command changes the maximum size of the message tracking log file directory on the Mailbox server VAN-EX2 to 350 MB:

Set-MailboxServer -Identity VAN-EX2 -MessageTrackingLogMaxDirectorySize 350MB
 


1.3. Configuring Message Subject Logging in Message Tracking Logs

By default, the subject line of a Simple Mail Transfer Protocol (SMTP) email message is stored in the message tracking log. However, you may want to disable message subject logging to comply with security or privacy requirements. Before you enable or disable message subject logging, you need to verify your organization’s policy about revealing subject-line information. As with previous message tracking configurations, you use the Set-TransportServer and Set-MailboxServer EMS cmdlets to enable or disable message subject logging on Hub Transport and Edge Transport servers and on Mailbox servers, respectively.

For example, the following command disables message subject logging in message tracking logs on the Hub Transport server VAN-EX1:

Set-TransportServer -Identity VAN-EX1 -MessageTrackingLogSubjectLoggingEnabled $false

The following command enables message subject logging in message tracking logs on the Mailbox server VAN-EX2:
Set-MailboxServer -Identity VAN-EX2 -MessageTrackingLogSubjectLoggingEnabled $true