Pages

09 December 2013

Configure Protocol logging

By default protocol logging is not enabled on your send and receive connectors.
It is a pretty good idea to turn it on, at least on your internet send and receive connectors.

You could also turn it on on all your send and receive connectors, if there's no data sent over those connectors there will be nothing logged.

Disk space is the main criteria to implement protocol logging, and even that can be configured to your desires.
  • You can configure the maximum number of days the logs are maintained.
  • You can configure the maximum directory size.
  • You can configure the maximum file size.
  • You can configure the log file path.
In the logging you will find valuable information about what happens to your messages when they are sent to other email systems.

Configure Protocol Logging

Exchange 2010
Applies to: Exchange Server 2010 SP3, Exchange Server 2010 SP2

Protocol logging records the SMTP conversations that occur between e-mail servers as part of message delivery. These SMTP conversations occur on Send connectors and Receive connectors configured on servers running Microsoft Exchange Server 2010 that have the Hub Transport server role or the Edge Transport server role installed. You can use protocol logging to diagnose mail flow problems.
By default, protocol logging is disabled on all Send connectors and Receive connectors. Protocol logging is enabled or disabled on a per-connector basis. Other protocol logging options are set on a per-connector type basis for the whole server. All the Receive connectors on a Hub Transport server or an Edge Transport server share the same protocol log files and protocol log options. These protocol log files and protocol log options are separate from the Send connector protocol log files and protocol log options that are on the same server. By default, Exchange 2010 uses circular logging to limit the protocol logs based on file size and file age to help control the hard disk space used by the protocol log files.
Looking for other management tasks related to transport logs? Check out Managing Transport Logs.
CautionCaution:
Don't perform this procedure on an Edge Transport server that has been subscribed to the Exchange organization by using EdgeSync. Instead, make the changes on the Hub Transport server. The changes are then replicated to the Edge Transport server next time EdgeSync synchronization occurs.
You need to be assigned permissions before you can perform this procedure. To see what permissions you need, see the "Receive connectors" and "Send connectors" entries in the Transport Permissions topic.
  1. Perform one of the following steps:
    • To modify an existing Receive connector on an Edge Transport server, in the console tree, select Edge Transport, and then in the work pane, click the Receive Connectors tab.
    • To modify an existing Receive connector on a Hub Transport server, expand Server Configuration in the console tree, and select Hub Transport. In the result pane, select the server that has the Receive connector that you want to modify, and then click the Receive Connectors tab.
  2. In the work pane, select the Receive connector to modify.
  3. Under the name of the Receive connector in the action pane, click Properties to open the Properties page.
  4. Click the General tab and use the drop-down box next to Protocol logging level to enable or disable protocol logging. None disables protocol logging, and Verbose enables protocol logging.
  5. After you make your protocol logging selection, click Apply to save changes and remain on the Properties page, or click OK to save changes and exit the Properties page.
The procedure is similar for Send connectors. To access Send connectors, you navigate to Organization Configuration > Hub Transport.
This example enables protocol logging for the Receive connector Connection from Contoso.com.
Set-ReceiveConnector "Connection from Contoso.com" -ProtocolLoggingLevel Verbose
The procedure is similar for Send connectors. For Send connectors, you use the Set-SendConnector cmdlet.
For detailed syntax and parameter information, see Set-ReceiveConnector or Set-SendConnector.
You need to be assigned permissions before you can perform this procedure. To see what permissions you need, see the "Hub Transport server" entry in the Transport Permissions topic.
noteNote:
You can't use the EMC to enable or disable protocol logging for the intra-organization Send connector.
A special Send connector named the intra-organization Send connector exists on every Hub Transport server. This connector is implicitly created, invisible, and requires no management. The intra-organization Send connector is used to relay messages to the following destinations:
  • To other Hub Transport servers in the Exchange organization
  • To Exchange Server 2003 servers in the Exchange organization
  • To Edge Transport servers in the Exchange organization
By default, protocol logging for the intra-organization Send connector is disabled. You can enable or disable protocol logging for the intra-organization Send connector by using the Set-TransportServer cmdlet.
This example enables protocol logging on the intra-organization Send connector on a Hub Transport server.
Set-TransportServer "Exchange01" -IntraOrgConnectorProtocolLoggingLevel Verbose
For detailed syntax and parameter information, see Set-TransportServer.
You need to be assigned permissions before you can perform this procedure. To see what permissions you need, see the "Hub Transport server" and "Edge Transport server" entries in the Transport Permissions topic.
By default, the Receive connector protocol log files are located at C:\Program Files\Microsoft\Exchange Server\V14\TransportRoles\Logs\ProtocolLog\SmtpReceive, and the Send connector protocol log files are located at C:\Program Files\Microsoft\Exchange Server\V14\TransportRoles\Logs\ProtocolLog\SmtpSend. The directory must be local to the Exchange 2010 computer.
  1. 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.
  2. On the Properties page, click the Log Settings tab.
  3. In the Protocol log section, click Browse next to Receive connector protocol log file path.
  4. In the Browse for folder window, browse to the new location where you want to store the Receive connector protocol 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.
  5. Click Apply to save changes and remain on the Properties page, or click OK to save changes and exit the Properties page.
This example sets the Receive connector protocol log directory to C:\Receive SMTP Log on the Exchange 2010 computer Exchange01.
Set-TransportServer Exchange01 -ReceiveProtocolLogPath "C:\Receive SMTP Log"
For detailed syntax and parameter information, see Set-TransportServer.
  1. 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.
  2. On the Properties page, click the Log Settings tab.
  3. In the Protocol log section, click Browse next to Send connector protocol log file path.
  4. In the Browse for folder window, browse to the new location where you want to store the Send connector protocol 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.
  5. Click Apply to save changes and remain on the Properties page, or click OK to save changes and exit the Properties page.
This example sets the Send connector protocol log directory to C:\Send SMTP Log on the Exchange 2010 computer Exchange01.
Set-TransportServer Exchange01 -SendProtocolLogPath "C:\Send SMTP Log"
Setting the value of the SendProtocolLogPath parameter or ReceiveProtocolLogPath parameter to $null disables protocol logging for all Send connectors or all Receive connectors on the server. However, setting either of these parameters to $null when protocol logging is enabled for any Send connector, including the intra-organization Send connector, or Receive connector on the server generates event log errors. The preferred method of disabling protocol logging is to use the Set-SendConnector or Set-ReceiveConnector cmdlets to set the ProtocolLoggingLevel parameter to None. Also, you can use the Set-TransportServer cmdlet to set the IntraOrgProtocolLoggingLevel parameter to None.
For detailed syntax and parameter information, see Set-TransportServer.
You need to be assigned permissions before you can perform this procedure. To see what permissions you need, see the "Hub Transport server" and "Edge Transport server" entries in the Transport Permissions topic.
noteNote:
You can't use the EMC to configure the maximum size of each protocol log file.
By default, the maximum size for each protocol log file is 10 MB. All Receive connectors on the server share the same protocol log files, and all Send connectors on the server share the same protocol log files. When a protocol log file reaches its maximum size, Exchange 2010 opens a new protocol log file. This process continues until either of the following conditions is true:
  • The protocol log directory reaches its specified maximum size. For more information about how to change the maximum size of the protocol log directory, see "Configure the maximum size of the protocol log directory" later in this topic.
  • A protocol log file reaches its specified maximum age. For more information about how to change the maximum age of a protocol log file, see "Configure the maximum age of the protocol log files" later in this topic.
After the maximum size or age limit is reached, circular logging deletes the oldest protocol log files.
This example sets the maximum size of Receive connector protocol log files to 20 MB on the Exchange 2010 computer Exchange01.
Set-TransportServer Exchange01 -ReceiveProtocolLogMaxFileSize 20MB
This example sets the maximum size of Send connector protocol log files to 20 MB on the Exchange 2010 computer Exchange01.
Set-TransportServer Exchange01 -SendProtocolLogMaxFileSize 20MB
For detailed syntax and parameter information, see Set-TransportServer.
You need to be assigned permissions before you can perform this procedure. To see what permissions you need, see the "Hub Transport server" and "Edge Transport server" entries in the Transport Permissions topic.
noteNote:
You can't use the EMC to configure the maximum size of the protocol log directory.
By default, the maximum size for the protocol log directory is 250 MB. All Receive connectors on the server share the same protocol log directory, and all Send connectors on the server share the same protocol log directory. Circular logging deletes the oldest protocol log files when either of the following conditions is true:
  • The protocol log directory reaches its specified maximum size.
  • A protocol log file reaches its specified maximum age.
This example sets the maximum size of the Receive connector protocol log directory to 400 MB on the Exchange 2010 computer Exchange01.
Set-TransportServer Exchange01 -ReceiveProtocolLogMaxDirectorySize 400MB
This example sets the maximum size of the Send connector protocol log directory to 400 MB on the Exchange 2010 computer Exchange01.
Set-TransportServer Exchange01 -SendProtocolLogMaxDirectorySize 400MB
For detailed syntax and parameter information, see Set-TransportServer.
You need to be assigned permissions before you can perform this procedure. To see what permissions you need, see the "Hub Transport server" and "Edge Transport server" entries in the Transport Permissions topic.
noteNote:
You can't use the EMC to configure the maximum age of the protocol log files.
By default, the maximum age for any protocol log file is 30 days. All Receive connectors on the server share the same protocol log files, and all Send connectors on the server share the same protocol log files. Circular logging deletes the oldest protocol log files if either of the following conditions is true:
  • The protocol log directory reaches its specified maximum size.
  • A protocol log file reaches its specified maximum age.
This example sets the age limit of the Receive connector protocol log files to 45 days on the Exchange 2010 computer Exchange01.
Set-TransportServer Exchange01 -ReceiveProtocolLogMaxAge 45.00:00:00
This example sets the age limit of the Send connector protocol log files to 45 days on the Exchange 2010 computer Exchange01.
Set-TransportServer Exchange01 -SendProtocolLogMaxAge 45.00:00:00
To specify an age value, enter the value as a time span: dd.hh:mm:ss, where d = days, h = hours, m = minutes, and s = seconds. The valid input range for this parameter is from 00:00:00 through 24855.03:14:07. Setting the value of the ReceiveProtocolLogMaxAge parameter or the SendProtocolLogMaxAge parameter to 00:00:00 prevents the automatic removal of protocol log files because of their age.
For detailed syntax and parameter information, see Set-TransportServer.
 © 2010 Microsoft Corporation. All rights reserved.
 

No comments:

Post a Comment