Lets take a look at troubleshooting a Hybrid Exchange Server being used for SMTP Relay.  We will ensure logging is enabled, review the relay log locations, and use the exchange management shell to find the relevant logs.

Enable logging on Exchange Connectors:

To troubleshoot effectively, we will need protocol logging enabled.  We need to make sure the connectors are set to the ‘Verbose’ logging level.

  1. Connect to the exchange server and launch Exchange Admin Center.
  2. Select mail flow and go to the receive connectors tab.
  3. Open the receive connector and ensure Protocol logging level is set to Verbose.
  4. Repeat these steps for your send connectors if needed.

Enable logging on Exchange Connectors Using PowerShell:

Log Location:

The default location of the SMTP logs can be found here:

C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\MessageTracking

If you changed the default install location or are not using Exchange 2019, use this path:

%ExchangeInstallPath%TransportRoles\Logs\MessageTracking

View Logs Using Exchange Management Shell:

You can manually look through the txt files in the log location above, however, it is more efficient to utilize the Exchange Management Shell for this task.

  1. Launch the Exchange Management Shell.
  2. Use the Get-MessageTrackingLog command to pull your logs.  Great ways to do this is by utilize the recipients, subject, or times.
  3. Example using date and times.
  4. Example using recipients and subject.

Send Test Message to SMTP Relay with PowerShell:

To send a test message to the relay use the Send-MailMessage cmdlet.