Knowledge Base

How to check if emails are correctly routed through the CodeTwo service in Microsoft 365

Problem:

You would like to check if the email you sent was correctly routed through the CodeTwo Email Azure Service.

Solution:

The first step in checking if the email was routed through our service is sending a test message. Such a message can be sent using your own account or from another user account, as discussed in this article. Make sure that:

  • this account belongs to the senders scope defined when configuring Exchange Online connectors (as discussed here),
  • it is included in at least one active (turned-on) server-side signature rule,
  • the conditions defined on the Senders, Recipients and Keywords tabs in that rule are met when the test message is sent (see this article to learn more about signature rule conditions).

Then, once you send a test message, there are two methods to check if your message was routed correctly:

Info

Client-side email signatures are added directly in Outlook. This means that messages which receive client-side signatures are never routed through the CodeTwo Email Azure Service. The solution discussed in this article does not apply to such messages.

How to check if an email was routed through the CodeTwo service by using the message trace tool

To check if an email was routed through the CodeTwo service, you can generate a message trace report and interpret the information found in the report.

Follow the links below to learn:

How to create a message trace report in the Microsoft 365 admin center

  1. Open the Office 365 Security & Compliance center and go to Mail flow > Message trace (Fig. 1.).

Configuring a message trace query in the Microsoft 365 admin center.
Fig. 1. Configuring a message trace query in the Microsoft 365 admin center.

  1. Click Start a trace to prepare a new message trace query.
  2. Use the By these people field to select the account you used to send the test message.
  3. Set the time period covered by the report. Make sure it includes the date when the test message was sent.
  4. In the Choose report type section, select Summary report to generate a simple report.
  5. Click Search to run a message trace and generate a report.

How to create a message trace report in the Exchange admin center (new version)

  1. Open the Exchange admin center and go to Mail flow > Message trace (Fig. 2.).

Preparing a message trace query in the new version of the Exchange admin center.
Fig. 2. Preparing a message trace query in the new version of the Exchange admin center.

  1. Click Start a trace to start configuring a new message trace query.
  2. Use the Senders field to only include the user account from which the test message was sent.
  3. Limit the period covered by the message trace report to only include the time when the test message was sent.
  4. In the Choose report type section, select Summary report.
  5. Click Search to run a message trace and generate a report.

How to create a message trace report in the Exchange admin center (classic version)

  1. Open the Exchange admin center and go to mail flow > message trace (Fig. 3.).

Preparing a message trace query in the classic version of the Exchange admin center.
Fig. 3. Preparing a message trace query in the classic version of the Exchange admin center.

  1. Select a past period in which the test message was sent.
  2. Click the add sender button to select the account you used to send the test message.
  3. Click Search to run a message trace and generate a report.

How to interpret the information in the message trace report

In this example we will look at a message trace report generated in the Microsoft 365 Security & Compliance center. If your test email was routed through the CodeTwo service, it will appear twice on the Message trace search results list (Fig. 4.).

Locating your test message in the message trace report.
Fig. 4. Locating your test message in the message trace report.

This happens because a message is first sent to the CodeTwo Email Azure Service via the outbound connector (this is indicated by the first result in the report). Then, after being routed to our service, the message is received back in Exchange Online via the inbound connector and sent to the intended recipient (this is indicated by the second result in the report).

Click on the first result (the message with an earlier date and time of sending) to view message trace details, as shown in Fig. 5.

Details of a message routed to the CodeTwo Email Azure Service.
Fig. 5. Details of a message routed to the CodeTwo Email Azure Service.

If the message was sent to our service, the name of the CodeTwo Outbound Connector will be listed in the Connector name field. Also, the address in the Destination smart host field will refer to CodeTwo. This confirms that it was sent to the CodeTwo Email Azure Service.

Info

If you have configured connectors automatically, the name of the connector will be CodeTwo Outbound Connector (followed by an individual number). If you have configured your connectors manually, the name may be different. However, it is recommended to follow our naming convention to make it clear what the function of the connector is.

If you are using smart host (mail relay) services in your environment, the trace report may look differently. Read this article to learn more about configuring smart host services.

When you open the second message trace result that refers to the same message (the one with the later date and time of sending, as shown in Fig. 4. above), you will find a confirmation that the message was sent to its intended recipient (Fig. 6.).

Details of a message routed back from the CodeTwo Email Azure Service and sent to the recipient.
Fig. 6. Details of a message routed back from the CodeTwo Email Azure Service and sent to the recipient.

How to check if an email was routed through the CodeTwo service by using the information found in the message header

To check if a message was routed through the CodeTwo Email Azure Service, you need to obtain the test message you sent, saved as an MSG or EML file. If you sent this message to an external recipient, request that person to provide you with a copy of the message. Once you get it, you can find the necessary information in the message header.

Follow the links below to learn:

Info

It is not sufficient if the recipient sends a reply to your message. If that is the case, the header will not contain the information you require to verify if the message was correctly routed to the CodeTwo service. Make sure the recipient sends you a file containing the original message.

How to save an email message as a file in Outlook

To save a received email as a file, follow the steps below:

  1. Open Outlook.
  2. Double click the message to open it in a new window.
  3. Go to File > Save as.
  4. Select the MSG file type, choose location and click Save (Fig. 7.).

Saving an email message as a file in Outlook.
Fig. 7. Saving an email message as a file in Outlook.

Info

Not all email clients have the option to save a message as a file. One such example is Outlook on the web (OWA). Make sure that the recipient of your test message will be able to provide you with the file you need.

How to interpret the information available in the message header

  1. Open the message in Outlook. If you received an EML file, you can also use Notepad. Learn more
  2. Go to File > Properties to open the Properties window.
  3. In the Internet header field, find the following phrase:
X-CodeTwoProcessed: true

If this item is present in the header, the message has been routed to the CodeTwo Email Azure Service (Fig. 8.).

The message header displayed in Outlook.
Fig. 8. The message header displayed in Outlook.

Opening an EML file in Notepad

  1. Right-click on the file, click Open with and select Notepad from the list of apps.
  2. Search for the following phrase in the file:
X-CodeTwoProcessed: true
  1. If found, the message has been routed to the CodeTwo Email Azure Service.

See also:

If you encounter any problems and you would like CodeTwo to check in detail if the messages are routed correctly, you can prepare an extended message trace and contact our Customer Support team.

Was this information useful?