I administer a large number of Microsoft 365 email domains and I use the Message Trace function in the Admin section to troubleshoot a number of problems and test configuration settings.
Sometimes I’ll adjust a spam filter rule and I’ll want to keep watch on how the Message Transfer Agent, (MTA), handles incoming spam. I can test the new rule to make sure it doesn’t move legitimate emails to the Junk folder. Maybe I’ll need to see why a user’s email wasn’t delivered or what email domains have blacklisted my client’s domain. Most of that testing data is in the message trace search results.
To get to Message Trace go to the Admin section in your Microsoft 365 account where you’ll need to have domain admin rights. Moving on, you’ll click on Admin and then Exchange. You’ll see in the left side navigation “mail flow”. Click on that and then you’ll see “message trace” along the top.
Now click on “message trace” and you are presented with some options. If you just want to see a list of all the incoming and outgoing emails then click on “search”. Message trace will open up a new window and will show you the last 500 emails that were sent of received by the MTA.
If you want to see all the emails that were sent to Gmail users then you can click on “add recipient…”. Then next to “Check names”, enter *@gmail.com, then click add. Finally, click on search and now you’ll see all the email that was sent to Gmail users that are outside of your domain.