How to Configure SMTP Protocol Logging in Exchange Server 2016, 2019 & SE (EAC & PowerShell Guide)

SMTP Protocol Logging records the exact line-by-line SMTP conversations (EHLO, STARTTLS, AUTH, MAIL FROM, RCPT TO, DATA, and 250/451/550 response codes) that occur between messaging servers and across Exchange transport services. When troubleshooting TLS negotiation failures, 550 5.7.1 Unable to relay errors, or hybrid mail flow drops in Exchange Server 2016, Exchange Server 2019, and Exchange Server Subscription Edition (SE), enabling Verbose protocol logging is essential.

In this guide, we show how to enable protocol logging on Send Connectors, Receive Connectors, and the internal Intra-Organization Send Connector, and how to customize log paths, retention, and circular logging limits via both the Exchange Admin Center (EAC) and Exchange Management Shell (EMS).


Architecture: Exchange Transport Services & Protocol Logging Scope

Exchange Server Transport Pipeline & Protocol Log Control Points
Front End Transport
Set-FrontendTransportService
  • Stateless proxy on TCP 25 / 587 / 717
  • Default Frontend <Server> enabled by default
  • Logs stored under \FrontEnd\ProtocolLog\
Hub Transport Service
Set-TransportService
  • Categorizes & routes all mail (TCP 2525)
  • Controls Organization Send Connectors
  • Logs stored under \Hub\ProtocolLog\
Mailbox Transport
Set-MailboxTransportService
  • Submission & Delivery to local .edb store
  • Configured via -MailboxSubmission... / -MailboxDelivery...
  • Logs stored under \Mailbox\ProtocolLog\

While you can toggle protocol logging one connector at a time in the EAC, PowerShell lets you audit and enable Verbose logging across Send Connectors, Receive Connectors, and the hidden Intra-Organization Send Connector instantly:

POWERSHELL
# 1. Audit Current ProtocolLoggingLevel Across All Send & Receive Connectors
Write-Host "=== Send Connectors ===" -ForegroundColor Cyan
Get-SendConnector | Select-Object Name, AddressSpaces, Enabled, ProtocolLoggingLevel | Format-Table -AutoSize

Write-Host "=== Receive Connectors ===" -ForegroundColor Cyan
Get-ReceiveConnector | Select-Object Identity, Bindings, Enabled, ProtocolLoggingLevel | Format-Table -AutoSize

# 2. Enable Verbose Protocol Logging on a Specific Outbound Send Connector
Set-SendConnector -Identity "Outbound to Office 365" -ProtocolLoggingLevel Verbose

# 3. Enable Verbose Protocol Logging on All Receive Connectors on a Specific Server
Get-ReceiveConnector -Server "EXCH-SE-01" | Set-ReceiveConnector -ProtocolLoggingLevel Verbose

# 4. Enable Verbose Protocol Logging on the Hidden Intra-Organization Send Connector
Set-TransportConfig -IntraOrgConnectorProtocolLoggingLevel Verbose

# 5. Enable Verbose Protocol Logging on the Implicit Front End Send Connector
Set-FrontendTransportService -Identity "EXCH-SE-01" -IntraOrgConnectorProtocolLoggingLevel Verbose
PowerShell Set-SendConnector ProtocolLoggingLevel Verbose

Method 2: Configure Protocol Log Paths, Max Size & Retention in PowerShell

In enterprise environments, you should move protocol logs off the OS C:\ drive to a dedicated logging volume (e.g., L:\ExchangeLogs\) and tune the circular logging limits (MaxFileSize, MaxDirectorySize, and MaxAge):

ParameterDefault ValueDescription
***ProtocolLogPath**%ExchangeInstallPath%TransportRoles\Logs\...Local folder path where SEND.log and RECV.log files are written
**ProtocolLogMaxFileSize10 MBMaximum size of a single .log file before rolling over to -2.log
ProtocolLogMaxDirectorySize250 MBMaximum total size of the log folder before circular logging deletes the oldest files
*ProtocolLogMaxAge30.00:00:00 (30 days)Maximum retention period before log files are purged
POWERSHELL
$Server = "EXCH-SE-01"

# Relocate Hub Transport Send & Receive Protocol Logs and increase directory quota to 2 GB
Set-TransportService -Identity $Server `
    -SendProtocolLogPath "L:\ExchangeLogs\Hub\ProtocolLog\SmtpSend" `
    -ReceiveProtocolLogPath "L:\ExchangeLogs\Hub\ProtocolLog\SmtpReceive" `
    -SendProtocolLogMaxFileSize MB `
    -ReceiveProtocolLogMaxFileSize MB `
    -SendProtocolLogMaxDirectorySize GB `
    -ReceiveProtocolLogMaxDirectorySize GB `
    -SendProtocolLogMaxAge 45.00:00:00 `
    -ReceiveProtocolLogMaxAge 45.00:00:00

# Relocate Front End Transport Send & Receive Protocol Logs
Set-FrontendTransportService -Identity $Server `
    -SendProtocolLogPath "L:\ExchangeLogs\FrontEnd\ProtocolLog\SmtpSend" `
    -ReceiveProtocolLogPath "L:\ExchangeLogs\FrontEnd\ProtocolLog\SmtpReceive" `
    -SendProtocolLogMaxDirectorySize GB `
    -ReceiveProtocolLogMaxDirectorySize GB

Method 3: Use the Exchange Admin Center (EAC) GUI

A. Enable Protocol Logging on a Connector in EAC

  1. Open the Exchange Admin Center (EAC) and navigate to:

- Mail flow -> Send connectors, or - Mail flow -> Receive connectors

  1. Select the connector you want to configure and click Edit (pencil icon).
EAC Edit Connector
  1. On the General tab, under Protocol logging level, select Verbose (or None to disable) and click Save.

B. Change the Protocol Log Folder Location in EAC

  1. In the EAC, navigate to Servers -> Servers, select your Mailbox server, and click Edit.
EAC Edit Server
  1. Click Transport logs, update the Send protocol log path and Receive protocol log path, and click Save**.
EAC Transport Logs Path