Exchange SMTP Logs

Roger Roger 6,591 Reputation points
2024-12-16T12:41:02.4833333+00:00

Hi All, I am using an Exchange 2016 hybrid environment. One of my applications is using an internal relay (i.e., on-prem relay). The application is triggering emails, but users are not receiving them. The users are in exchange online. Which logs do I need to check to determine where the email has hit Exchange? I have the server IP where the application is hosted, as well as the sender ID and recipient ID. Please guide me

Microsoft Exchange Online
Exchange Server
Exchange Server
A family of Microsoft client/server messaging and collaboration software.
1,384 questions
Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
4,655 questions
Exchange Server Management
Exchange Server Management
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Management: The act or process of organizing, handling, directing or controlling something.
7,726 questions
Microsoft Exchange Hybrid Management
Microsoft Exchange Hybrid Management
Microsoft Exchange: Microsoft messaging and collaboration software.Hybrid Management: Organizing, handling, directing or controlling hybrid deployments.
2,177 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Andy David - MVP 151K Reputation points MVP
    2024-12-16T12:52:23.33+00:00

    Start with the message tracking logs in the on-prem Exchange Server

    https://learn.microsoft.com/en-us/exchange/mail-flow/transport-logs/search-message-tracking-logs?view=exchserver-2019

    IF you dont see the messages being routed to Exchange Online there, then enable and check the SMTP protocol logs on the receive connector on the on-prem Exch Servers and see if the messages are being rejected there:

    https://learn.microsoft.com/en-us/exchange/mail-flow/connectors/configure-protocol-logging?view=exchserver-2019

    0 comments No comments

  2. Jake Zhang-MSFT 7,775 Reputation points Microsoft Vendor
    2024-12-17T02:58:23.74+00:00

    Hi @Roger Roger ,

    Welcome to the Microsoft Q&A platform!

    To troubleshoot email delivery issues in an Exchange 2016 hybrid environment, you can follow these steps to check the relevant logs and trace the email flow:

    1. Use the Get-MessageTrackingLog cmdlet to search for the emails. This log will help you trace the path of the email through your Exchange environment.
    Get-MessageTrackingLog -Server <YourServerName> -Sender <SenderEmail> -Recipients <RecipientEmail> -Start "12/16/2024 00:00:00" -End "12/17/2024 23:59:59"
    

    This will show you if the email was received by the Exchange server and its subsequent status.

    1. Check the SMTP protocol logs on your on-premises Exchange server. These logs can provide detailed information about the SMTP transactions between your application and the Exchange server.

    The logs are typically located in the C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\ProtocolLog\SmtpSend directory.

    1. Since your application is using an internal relay, IIS logs can also be useful. These logs can be found in the C:\inetpub\logs\LogFiles directory.

    Look for entries corresponding to the IP address of your application server.

    1. In a hybrid environment, you should also check the hybrid mail flow logs to ensure that the emails are being correctly routed to Exchange Online. You can use the Get-HybridMailflow cmdlet to check the status of the hybrid mail flow.

    By checking these logs, you should be able to determine where the email is getting stuck and take appropriate action to resolve the issue.


    Please feel free to contact me for any updates. And if this helps, don't forget to mark it as an answer.

    Best,

    Jake Zhang


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.