How to find the Message-ID of an email and use it to track messages in Exchange and Office 365
You would like to find the Message-ID of an email and use this ID to track emails in Exchange Server and Office 365 (Exchange Online).
- About Message-ID
- How to find the Message-ID of an email
- How to track emails in Exchange Server via Message-ID
- How to track emails in Office 365 (Exchange Online) via Message-ID
Message-ID (also known as Internet message ID or Client ID) is an identifier of emails. It is generated by the sending mail system. This identifier is not always unique - there might be multiple copies of the same message in more than one folder (or mailbox), and all of them might have the same Message-ID. For example, after sending a single email, it can have two copies: one located in the recipient's Inbox and the other one in the sender’s Sent Items folder. Both copies have the same Message-ID. This might be a source of confusion when looking at a long list of Exchange-wide search results.
Message-ID consists of a long string of characters (unique identifier of this message on the mail server) ending with the FQDN of the mail server (e.g. [email protected]). Message-ID of an email can be found in the message header. When using CodeTwo software, you can also find this identifier in the software's log files.
To find the Message-ID of an email in Outlook 2007, right-click an email on the list and choose Message Options from the shortcut menu. A new window will open. You will find the Message-ID identifier in the Internet headers section (you might need to scroll down to find it, or you can copy the section's content to any text editor and use the editor's search options).
To find the Message-ID in Outlook 2010 and later, you need to:
- Open an email in a new window (you can do it by double-clicking any message on your email list).
- Go to the File menu and on the Info tab click the Properties button (Fig. 1.).
- The Message-ID property is displayed in the Internet headers section (Fig. 2.). The easiest way to find it is to copy the whole section's content (right-click the section and choose Select All, then Copy), paste it into any text editor and use the editor's search functionality to look for Message-ID.
To find the Message-ID in Outlook on the web (OWA):
- Open an email, click the ellipsis (...) button in the upper-right corner of the reading pane and choose View > View message details (Fig. 3.).
- A new window opens. It contains your message header. You can find the Message-ID of your email by using the Ctrl+F keyboard shortcut (Fig. 4.).
Make sure to find the right identifier (Message-ID), as shown in Fig. 4. Do not confuse it with the X-MS-Exchange-Organization-Network-Message-Id property that might also appear in the message header.
The described solution requires Microsoft Exchange Server 2007 or newer.
When you know a Message-ID, you can track all emails with that particular Message-ID and get various information on the flow of these emails (e.g. their delivery status). All this information is included in the message tracking log. To generate an HTML message tracking log, you need to execute the following cmdlet in the Exchange Management Shell (EMS):
Get-MessageTrackingLog -MessageId "MESSAGE_ID" | ConvertTo-Html > C:\report1.html
To save the results to a custom location, change the path after the > character.
If you expect a long results list, it might be a good idea to export the result to a CSV file instead of the HTML version, by using the following cmdlet:
Get-MessageTrackingLog -MessageId "MESSAGE_ID" | ConvertTo-Csv > C:\report1.csv
In some cases, you might need to apply additional filters (e.g. time) to narrow down the results. In the example below, additional Time and Sender filters are applied:
Get-MessageTrackingLog -messageID: [email protected] -Start "2015/09/14 01:03:12 PM" -Sender: [email protected] | convertTo-html > c:\report2.html
- Start determines the start point of Exchange Server message processing,
- End is the end point of Exchange Server message processing,
- Sender is the SMTP address of the mailbox.
You can find more information on the cmdlet syntax in this Microsoft article.
To track emails in Office 365, you can:
- generate a message trace in Exchange admin center, as described in our article;
- use the Get-MessageTrace cmdlet in PowerShell (learn more on Microsoft's website)
and provide Message-ID to narrow down the trace results.
|Related products:||General (Microsoft 365, Exchange & more)|