Applies to: Exchange Server 2013
Topic Last Modified: 2013-02-18
Protocol logging records the SMTP conversations that occur on Send Connectors and Receive connectors as part of message delivery.
What do you need to know before you begin?
- 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.
-
Caution: 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.
Tip: |
---|
Having problems? Ask for help in the Exchange forums. Visit the forums at: Exchange Server, Exchange Online, or Exchange Online Protection |
What do you want to do?
Use the EAC to configure protocol logging
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:
- In the EAC, navigate to Mail flow > Send
connectors or Mail flow > Receive
connectors.
- Select the connector you want to configure, and then click
Edit .
- 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.
- None Protocol logging disabled on the
connector.
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:
- In the EAC, navigate to Servers > Servers.
- Select the Mailbox server you want to configure, and then click
Edit .
- On the server properties page, click Transport logs.
- 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.
- 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.
How do you know this worked?
To verify that you have successfully used the EAC to configure the protocol log settings, do the following:
- Browse to the location you specified for the Send connector or
the Receive connector protocol logs.
- 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.
Use the Shell to enable or disable protocol logging on a Send connector or a Receive connector
To enable or disable protocol logging on a Send connector or a Receive connector, run the following command:
Copy Code | |
---|---|
<Set-SendConnector |Set-ReceiveConnector> <ConnectorIdentity> -ProtocolLoggingLevel <Verbose | None> |
This example enables protocol logging for the Receive connector named Connection from Contoso.com.
Copy Code | |
---|---|
Set-ReceiveConnector "Connection from Contoso.com" -ProtocolLoggingLevel Verbose |
How do you know this worked?
To verify that you have successfully enabled or disabled protocol logging, do the following:
- In the Shell, run the following command:
Copy Code <Get-SendConnector |Get-ReceiveConnector> | Format-List Name,ProtocolLoggingLevel
- Verify the values displayed are the values you configured.
Use the Shell to enable or disable protocol logging on the intra-organization Send connector
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:
Copy Code | |
---|---|
<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.
Copy Code | |
---|---|
Set-TransportService Mailbox01 -IntraOrgConnectorProtocolLoggingLevel Verbose |
How do you know this worked?
To verify that you have successfully enabled or disabled protocol logging on the intra-org Send connector, do the following:
- In the Shell, run the following command:
Copy Code <Get-TransportService | Get-FrontEndTransportService> <ServerIdentity> | Format-List IntraOrgConnectorProtocolLoggingLevel
- Verify the value displayed is the value you configured.
Use the Shell to enable or disable protocol logging on the mailbox delivery Send connector
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:
Copy Code | |
---|---|
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.
Copy Code | |
---|---|
Set-MailboxTransportService Mailbox01 -MailboxDeliveryConnectorProtocolLoggingLevel Verbose |
How do you know this worked?
To verify that you have successfully enabled or disabled protocol logging on the mailbox delivery connector, do the following:
- In the Shell, run the following command:
Copy Code Get-MailboxTransportService <ServerIdentity> | Format-List MailboxDeliveryConnectorProtocolLoggingLevel
- Verify the value displayed is the value you configured.
Use the Shell to configure protocol logging settings
To configure the protocol log settings, run the following command:
Copy Code | |
---|---|
<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.
Copy Code | |
---|---|
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 |
Note: |
---|
|
How do you know this worked?
To verify that you have successfully configured the protocol log settings, do the following:
- In the Shell, run the following command:
Copy Code <Get-TransportService | Get-MailboxTransportService | Get-FrontEndTransportService> <ServerIdentity> | Format-List SendConnectorProtocolLog*,ReceiveConnectorProtocolLog*
- Verify the values displayed are the values you configured.