Knowledge Base

How to fix problems with message headers in Office 365

Problem:

You experience the following problems or errors when you send messages in Office 365:

  • Headers too large
  • action not taken, too long header.

Solution:

You might have encountered a recent Office 365 service health issue in which EOP is unable to strip the X-Microsoft-Exchange-Diagnostics-untrusted header from your messages. This leads to oversized message headers and thus prevents messages from being delivered. The issue, referred to by Microsoft as EX107354, is not related to our software. Microsoft is currently working on the fix.

Until the problem is solved by MS, we recommend using a simple workaround as a temporary fix. You need to create a new transport rule that will remove the X-Microsoft-Exchange-Diagnostics-untrusted header from emails. Follow the steps below.

  1. Go to your Microsoft 365 admin center (Office 365 admin center) and access the Exchange admin center (Fig. 1.).

Accessing Exchange admin center.
Fig. 1. Accessing Exchange admin center.

  1. Select Mail flow > Rules from the left menu, click the New (+) button, and choose Create a new rule... from the drop-down menu (Fig. 2.).

Adding a new transport rule in EAC.
Fig. 2. Adding a new transport rule in EAC.

  1. A new window will open. Name your rule (e.g. Remove the X-Microsoft-Exchange-Diagnostics-untrusted header) and click More options... to turn on additional options. Configure the rule so that it looks exactly like the one shown in Fig. 3.:
  • add a new condition by selecting A message header... includes any of these words. Type the name of the header (X-CodeTwoProcessed) and the text value that needs to be included (True);
  • add a new action: choose Modify the message properties... remove a message header and type the name of the header (X-Microsoft-Exchange-Diagnostics-untrusted). Leave the other fields as they are and save the rule.

617-3
Fig. 3. Correct configuration of the transport rule.

  1. The rule will be saved at the bottom of the rules list, with the lowest priority. If you have several transport rules, move the new rule up via the arrow button, so that it is directly below the CodeTwo transport rule. By default, the CodeTwo rule has 0 priority – in this case your new rule should have a priority of 1, as shown in Fig. 4. You can also edit the rule and change the priority manually.

Priority of transport rules.
Fig. 4. Priority of transport rules.

  1. You need to wait until the changes propagate – this might take even a few hours, but should solve the problem.

Was this information useful?