Microsoft released several Security Updates (SUs) for Microsoft Exchange Server to address vulnerabilities. Due to…
Exchange send connector logging
How to enable SMTP logging in Exchange Server 2013/2016/2019? We want to check the send connector logging, but where do we find the logging path location? In this article, you will learn more about Exchange send connector logging.
Table of contents
Introduction
Protocol logging records the SMTP conversations between messaging servers and between Exchange services in the transport pipeline as part of message delivery.
In the previous article, we discussed the Exchange receive connector logging. This time we will look into the Exchange send connector logging.
Get Exchange send connector
Sign in to Exchange admin center and navigate to mail flow > send connectors.
Note: When you create a send connector, it will be available for the whole Exchange organization. That’s why you don’t see the select Exchange Server option.
We have two send connectors on the Exchange Server:
- Internet email
- Outbound to Office 365 (created with the Hybrid Configuration Wizard)
Get the information in a better view. Run Exchange Management Shell as administrator. Use the Get-SendConnector cmdlet.
[PS] C:\>Get-SendConnector | ft Identity,Enabled,Protocol*
Identity Enabled ProtocolLoggingLevel
-------- ------- --------------------
Internet email True None
Outbound to Office 365 - 5af53ad5-4ce1-4406-bf3f-b8c796cf17b8 True None
Enable Exchange send connector logging
Click on the send connector in the list view. In this example, we will select the Exchange Internet email send connector. Click in the details pane on the On link to enable SMTP logging.
The details pane will show Logging – On.
Enable the send connector logging in Exchange Management Shell.
[PS] C:\>Get-SendConnector "Internet email" | Set-SendConnector -ProtocolLogging Verbose
Enable all Exchange send connector logs on Exchange Server.
[PS] C:\>Get-SendConnector | Set-SendConnector -ProtocolLogging Verbose
Exchange send connector log location
We can find Exchange send connector location and the maximum days to store the logs only with Exchange Management Shell. It’s not possible to find the send logs path in Exchange admin center.
Run Get-TransportService cmdlet to find the send connector log location path. In our example, we see two Exchange Servers as output because two Exchange Servers are running in the organization.
[PS] C:\>Get-TransportService | fl Identity,Send*
Identity : EX01-2016
SendProtocolLogMaxAge : 30.00:00:00
SendProtocolLogMaxDirectorySize : 250 MB (262,144,000 bytes)
SendProtocolLogMaxFileSize : 10 MB (10,485,760 bytes)
SendProtocolLogPath : C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\Hub\ProtocolLog\SmtpSend
Identity : EX02-2016
SendProtocolLogMaxAge : 30.00:00:00
SendProtocolLogMaxDirectorySize : 250 MB (262,144,000 bytes)
SendProtocolLogMaxFileSize : 10 MB (10,485,760 bytes)
SendProtocolLogPath : C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\Hub\ProtocolLog\SmtpSend
Check Exchange send connector logs
Copy the SendProtocolLogPath in the above output and paste it in Windows Explorer.
Note: If you have more than one Exchange Server added as source server for high availability, you need to check the path on all these Exchange Servers.
In this example, the SMTP send protocol logs are shown only on Exchange Server EX02-2016. The same log path is empty on Exchange Server EX01-2016 because we did enable logging just yet, and no mail flow is sent through that Exchange Server yet.
Open the log file, and you can verify the send messages. In this example, Amanda Morgan sent an email from the EXOIP organization to John Doe which is an external Gmail address.
Disable send connector logging
Disable send connector logs on the Internet email send connector.
[PS] C:\>Get-SendConnector -Identity "Internet email" | Set-SendConnector -ProtocolLogging None
Disable all Exchange send connector logs on Exchange Server.
[PS] C:\>Get-SendConnector | Set-SendConnector -ProtocolLogging None
That’s it!
Read more: Search message tracking logs in Exchange »
Conclusion
In this article, you learned about Exchange send connector logging. Enable the logging for all the Exchange send 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 Change DAG witness server and witness directory. Don’t forget to follow us and share this article.
terimakasih infonya keren banget
Salam Ali,
There is any tool like gui ? We can use for find transport logs.
You can use the Exchange Server message tracking GUI.