skip to Main Content

Exchange receive connector logging

How to enable SMTP logging in Exchange Server 2013/2016/2019? We want to check the receive connector logging, but where do we find the logging path location? In this article, you will learn more about Exchange receive connector logging.

Introduction

Protocol logging records the SMTP conversations between messaging servers and between Exchange services in the transport pipeline as part of message delivery.

The following receive connectors roles are available:

  • Front End Transport
  • Hub Transport

In this article, we will look into the receive connector logging. Read the article Exchange send connector logging if you want to know more about that.

Get Exchange receive connector

Log into Exchange admin center and navigate to mail flow > receive connectors. Select the Exchange Server if you have more than one Exchange Server installed.

We have the default five receive connectors on the Exchange Server and an SMTP relay receive connector.

Exchange receive connector logging ecp

Get the information in a better view. Run Exchange Management Shell as administrator. Use the Get-ReceiveConnector cmdlet.

[PS] C:\>Get-ReceiveConnector | ft Identity,Enabled,TransportRole,Protocol*,Bindings

Identity                                    Enabled     TransportRole ProtocolLoggingLevel Bindings
--------                                    -------     ------------- -------------------- --------
EX01-2016\Default EX01-2016                    True      HubTransport              Verbose {0.0.0.0:2525, [::]:2525}
EX01-2016\Client Proxy EX01-2016               True      HubTransport              Verbose {[::]:465, 0.0.0.0:465}
EX01-2016\Default Frontend EX01-2016           True FrontendTransport              Verbose {[::]:25, 0.0.0.0:25}
EX01-2016\Outbound Proxy Frontend EX01-2016    True FrontendTransport              Verbose {[::]:717, 0.0.0.0:717}
EX01-2016\Client Frontend EX01-2016            True FrontendTransport              Verbose {[::]:587, 0.0.0.0:587}
EX02-2016\Default EX02-2016                    True      HubTransport                 None {0.0.0.0:2525, [::]:2525}
EX02-2016\Client Proxy EX02-2016               True      HubTransport                 None {[::]:465, 0.0.0.0:465}
EX02-2016\Default Frontend EX02-2016           True FrontendTransport              Verbose {[::]:25, 0.0.0.0:25}
EX02-2016\Outbound Proxy Frontend EX02-2016    True FrontendTransport              Verbose {[::]:717, 0.0.0.0:717}
EX02-2016\Client Frontend EX02-2016            True FrontendTransport                 None {[::]:587, 0.0.0.0:587}
EX01-2016\SMTP relay                           True FrontendTransport              Verbose {0.0.0.0:25}

Let’s filter receive connectors on Exchange Server EX01-2016.

[PS] C:\>Get-ReceiveConnector -Server "EX01-2016" | ft Identity,Enabled,TransportRole,Protocol*,Bindings

Identity                                    Enabled     TransportRole ProtocolLoggingLevel Bindings
--------                                    -------     ------------- -------------------- --------
EX01-2016\Default EX01-2016                    True      HubTransport              Verbose {0.0.0.0:2525, [::]:2525}
EX01-2016\Client Proxy EX01-2016               True      HubTransport              Verbose {[::]:465, 0.0.0.0:465}
EX01-2016\Default Frontend EX01-2016           True FrontendTransport              Verbose {[::]:25, 0.0.0.0:25}
EX01-2016\Outbound Proxy Frontend EX01-2016    True FrontendTransport              Verbose {[::]:717, 0.0.0.0:717}
EX01-2016\Client Frontend EX01-2016            True FrontendTransport              Verbose {[::]:587, 0.0.0.0:587}
EX01-2016\SMTP relay                           True FrontendTransport              Verbose {0.0.0.0:25}

Enable Exchange receiver connector logging

Click on the receive connector in the list view. In this example, we will select the Exchange SMTP relay receive connector. Click in the details pane on the On link to enable SMTP logging.

Exchange receive connector logging off

The details pane will show Logging – On.

Exchange receive connector logging on

Enable the receive connector logging in Exchange Management Shell.

[PS] C:\>Get-ReceiveConnector -Identity "EX01-2016\SMTP relay" | Set-ReceiveConnector -ProtocolLogging Verbose

Enable all Exchange receive connector logs on Exchange Server EX01-2016.

[PS] C:\>Get-ReceiveConnector -Server "EX01-2016" | Set-ReceiveConnector -ProtocolLogging Verbose

Exchange receive connector log location

We can find Exchange receive connector location and the maximum days to store the logs only with Exchange Management Shell. It’s not possible to find the receive logs path in Exchange admin center.

Front End Transport Service

Get the Front End Transport service logging path. Run the cmdlet Get-FrontendTransportService.

[PS] C:\>Get-FrontendTransportService -Identity "EX01-2016" | fl Name,Identity,Receive*


Name                               : EX01-2016
Identity                           : Frontend
ReceiveProtocolLogMaxAge           : 30.00:00:00
ReceiveProtocolLogMaxDirectorySize : 250 MB (262,144,000 bytes)
ReceiveProtocolLogMaxFileSize      : 10 MB (10,485,760 bytes)
ReceiveProtocolLogPath             : C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\FrontEnd\ProtocolLog\SmtpReceive

Hub Transport service

Get the Hub Transport service logging path. Run the cmdlet Get-TransportService.

[PS] C:\>Get-TransportService -Identity "EX01-2016" | fl Identity,Receive*


Identity                           : EX01-2016
ReceiveProtocolLogMaxAge           : 30.00:00:00
ReceiveProtocolLogMaxDirectorySize : 250 MB (262,144,000 bytes)
ReceiveProtocolLogMaxFileSize      : 10 MB (10,485,760 bytes)
ReceiveProtocolLogPath             : C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\Hub\ProtocolLog\SmtpReceive

Check Exchange receive connector logs

Copy the ReceiveProtocolLogPath in the above output and paste it in Windows Explorer.

These are the Front End Transport service logs.

Exchange receive connector logging frontend logs

This is how the Hub Transport service logs look in our example. It only shows one log file because we enabled it right now.

Exchange receive connector logging hub logs

Disable receive connector logging

Disable receive connector logs on the SMTP relay receive connector.

[PS] C:\>Get-ReceiveConnector -Identity "EX01-2016\SMTP relay" | Set-ReceiveConnector -ProtocolLogging None

Disable all Exchange receive connector logs on Exchange Server EX01-2016.

[PS] C:\>Get-ReceiveConnector -Server "EX01-2016" | Set-ReceiveConnector -ProtocolLogging None

That’s it!

Read more: Export remote IP addresses from Exchange receive connector »

Conclusion

In this article, you learned about Exchange receive connector logging. Enable the logging for all the Exchange receive connectors. It’s great when you want to troubleshoot mail flow and message tracking. By default, the directory will not take more than 250MB in size, and you can always expand the logging size.

Did you enjoy this article? You may also like Copy receive connector to another Exchange Server. Don’t forget to follow us and share this article.

ALI TAJRAN

ALI TAJRAN

ALI TAJRAN is a passionate IT Architect, IT Consultant, and Microsoft Certified Trainer. He started Information Technology at a very young age, and his goal is to teach and inspire others. Read more »

This Post Has 0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top