Export (0) Print
Expand All

Configure Protocol Logging

 

Applies to: Exchange Server 2013

Topic Last Modified: 2013-03-15

Protocol logging records the SMTP conversations that occur on Send Connectors and Receive connectors as part of message delivery.

  • Estimated time to complete: 15 minutes
  • You need to be assigned permissions before you can perform this procedure or procedures. To see what permissions you need, see the "Transport Service", "Front End Transport service", "Mailbox Transport service", "Receive connectors" and "Send connectors" entries in the Mail Flow Permissions topic.
  • You can use the Exchange admin center (EAC) to enable or disable protocol logging for Send connectors and Receive connectors in the Transport service on Mailbox servers, and for Receive connectors in the Front End Transport service on Client Access servers. You can also use the EAC to configure the protocol log paths for the Transport service only. For all other protocol logging options, you need to use the Shell.
  • Protocol logging is enabled or disabled on each individual connector. All the Receive connectors on the Exchange server share the same protocol log files and protocol log options. These protocol log settings are separate from the Send connector protocol log files and protocol log options that are on the same server.
  • 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 in the Transport service on the Mailbox server. The changes are then replicated to the Edge Transport server next time EdgeSync synchronization occurs.
  • For information about keyboard shortcuts that may apply to the procedures in this topic, see Keyboard Shortcuts in the Exchange Admin Center.
tipTip:
Having problems? Ask for help in the Exchange forums. Visit the forums at: Exchange Server, Exchange Online, or Exchange Online Protection

To use the EAC to enable or disable protocol logging on a Send connector or a Receive connector in the Transport service on a Mailbox server, or on a Receive connector in the Front End Transport service on a Client Access server, do the following:

  1. In the EAC, navigate to Mail flow > Send connectors or Mail flow > Receive connectors.
  2. Select the connector you want to configure, and then click Edit Edit Icon.
  3. On the General tab in the Protocol logging level section, select one of the following options:
    • None   Protocol logging disabled on the connector.
    • Verbose   Protocol logging is enabled on the connector.
    When you are finished, click Save.

To use the EAC to configure the protocol log paths for the Send connectors and Receive connectors in the Transport service on a Mailbox server, do the following:

  1. In the EAC, navigate to Servers > Servers.
  2. Select the Mailbox server you want to configure, and then click Edit Edit Icon.
  3. On the server properties page, click Transport logs.
  4. In the Protocol log section, change any of the following settings:
    • Send protocol log path   The value you specify must be on the local Exchange server. If the folder doesn't exist, it will be created for you when you click Save.
    • Receive protocol log path   The value you specify must be on the local Exchange server. If the folder doesn't exist, it will be created for you when you click Save.
    When you are finished, click Save.

To verify that you have successfully used the EAC to configure the protocol log settings, do the following:

  1. Browse to the location you specified for the Send connector or the Receive connector protocol logs.
  2. If you enabled protocol logging, verify a log file is created. If you disabled protocol logging, verify the latest log file is no longer being updated.

To enable or disable protocol logging on a Send connector or a Receive connector, run the following command:

<Set-SendConnector |Set-ReceiveConnector> <ConnectorIdentity> -ProtocolLoggingLevel <Verbose | None>

This example enables protocol logging for the Receive connector named Connection from Contoso.com.

Set-ReceiveConnector "Connection from Contoso.com" -ProtocolLoggingLevel Verbose

To verify that you have successfully enabled or disabled protocol logging, do the following:

  1. In the Shell, run the following command:
    <Get-SendConnector |Get-ReceiveConnector> | Format-List Name,ProtocolLoggingLevel
    
  2. Verify the values displayed are the values you configured.

To enable or disable protocol logging on the implicit and invisible intra-organization Send connector that exists in the Transport service on a Mailbox server and in the Front End Transport service on a Client Access server, run the following command:

<Set-TransportService | Set-FrontEndTransportService> -IntraOrgConnectorProtocolLoggingLevel <Verbose | None>

This example enables protocol logging on the intra-organization Send connector in the Transport service on a Mailbox server named Mailbox01.

Set-TransportService Mailbox01 -IntraOrgConnectorProtocolLoggingLevel Verbose

To verify that you have successfully enabled or disabled protocol logging on the intra-org Send connector, do the following:

  1. In the Shell, run the following command:
    <Get-TransportService | Get-FrontEndTransportService> <ServerIdentity> | Format-List IntraOrgConnectorProtocolLoggingLevel
    
  2. Verify the value displayed is the value you configured.

To enable or disable protocol logging on the implicit and invisible mailbox delivery Send connector that exists in the Mailbox Transport service on a Mailbox server, run the following command:

Set-MailboxTransportService -MailboxDeliveryConnectorProtocolLoggingLevel <Verbose | None>

This example enables protocol logging on the mailbox delivery Receive connector in the Mailbox Transport service on a Mailbox server named Mailbox01.

Set-MailboxTransportService Mailbox01 -MailboxDeliveryConnectorProtocolLoggingLevel Verbose

To verify that you have successfully enabled or disabled protocol logging on the mailbox delivery connector, do the following:

  1. In the Shell, run the following command:
    Get-MailboxTransportService <ServerIdentity> | Format-List MailboxDeliveryConnectorProtocolLoggingLevel
    
  2. Verify the value displayed is the value you configured.

To configure the protocol log settings, run the following command:

<Set-TransportService | Set-MailboxTransportService | Set-FrontEndTransportService> <ServerIdentity> -ReceiveProtocolLogPath <LocalFilePath> -SendProtocolLogPath <LocalFilePath> -ReceiveProtocolLogMaxFileSize <Size> -SendProtocolLogMaxFileSize <Size> -ReceiveProtocolLogMaxDirectorySize <Size> -SendProtocolLogMaxDirectorySize <Size> -ReceiveProtocolLogMaxAge <dd.hh:mm:ss> -SendProtocolLogMaxAge <dd.hh:mm:ss>

This example sets the following protocol log settings in the Transport service on the Mailbox server named Mailbox01:

  • Sets the location of all Receive connector protocol logs to D:\Hub Receive SMTP Log and all Send connector protocol logs to D:\Hub Send SMTP Log. Note that if the folder doesn't exist, it will be created for you.
  • Sets the maximum size of a Receive connector protocol log file and a Send connector protocol log file to 20 MB.
  • Sets the maximum size of the Receive connector protocol log folder and the Send connector protocol log folder to 400 MB.
  • Sets the maximum age of a Receive connector protocol log file and a Send Connector protocol log file to 45 days.
Set-TransportService Mailbox01 -ReceiveProtocolLogPath "D:\Hub Receive SMTP Log" -SendProtocolLogPath "D:\Hub Send SMTP Log" -ReceiveProtocolLogMaxFileSize 20MB -SendProtocolLogMaxFileSize 20MB -ReceiveProtocolLogMaxDirectorySize 400MB -SendProtocolLogMaxDirectorySize 400MB -ReceiveProtocolLogMaxAge 45.00:00:00 -SendProtocolLogMaxAge 45.00:00:00
noteNote:
  • To configure the protocol log settings in the Mailbox Transport service on a Mailbox server, use the Set-MailboxTransportService cmdlet. To configure the protocol log settings in the Front End Transport service on a Client Access server, use the Set-FrontEndTransportService cmdlet.
  • Setting the SendProtocolLogPath or ReceiveProtocolLogPath parameters to the value $null effectively 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 other connectors on the server, including the intra-organization Send connector or the mailbox delivery Send connector, event log errors are generated.
  • Setting the ReceiveProtocolLogMaxAge or SendProtocolLogMaxAge parameters to the value 00:00:00 prevents the automatic removal of protocol log files because of their age.

To verify that you have successfully configured the protocol log settings, do the following:

  1. In the Shell, run the following command:
    <Get-TransportService | Get-MailboxTransportService | Get-FrontEndTransportService> <ServerIdentity> | Format-List SendConnectorProtocolLog*,ReceiveConnectorProtocolLog*
    
  2. Verify the values displayed are the values you configured.
 
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft