Security Policy Errors

Investigate Exchange Emails Quarantined Before Mail Flow Rules Run

Amos GikundaAmos Gikunda Nov 20, 2026 868 views

Question details

Determine why Exchange messages are quarantined before the expected mail flow rule appears to apply.

Investigate Exchange Emails Quarantined Before Mail Flow Rules Run
Product
Microsoft Exchange Online and Microsoft Defender for Office 365
Device & OS
not provided
Scenario
An administrator wants a mail flow rule to match messages from specific senders or domains and investigate why those messages reach quarantine instead.
Observed behavior
Affected messages are quarantined, and the expected mail flow rule does not appear to run.
Before you start

Identify an affected message, its sender, recipient, and approximate delivery time. Sign in with permissions to view message traces, mail flow rules, quarantine details, and anti-spam policies.

Solution 1Recommended

Compare message headers with the Exchange mail flow rule

Use this approach to determine whether the rule is checking a different sender field from the one present in the message.

1
Inspect the quarantined message

In the Microsoft Defender portal, go to Email & collaboration > Review > Quarantine. Select an affected message and view its details and message headers.

2
Compare sender fields

In the full headers, compare the From, Sender, and Reply-To values. Note whether the Sender header is present and which address or domain the rule is intended to match.

3
Review the rule condition

In the Exchange admin center, open Mail flow > Rules and select the relevant rule. Compare its sender or message-header condition with the values you found in the message headers.

4
Test a Sender-header match

If the Sender header contains the intended value, test a rule using the condition that matches a message header against text patterns. Specify Sender as the header and enter a pattern for the intended address or domain. Use a test mode if available.

5
Check the result

Open Mail flow > Message trace in the Exchange admin center and search for the affected sender, recipient, and time range. Review the trace details and available rule reports for evidence of the rule's evaluation.

Compare message headers with the Exchange mail flow rule
Matching multiple patterns: In a regular expression, use the pipe character (|) for OR. Check and test the complete expression so that each alternative matches only the intended addresses or domains.
Free Microsoft Office alternative

Work with Office documents in WPS Office

WPS Office is a free, lightweight alternative for working with documents, spreadsheets, and presentations. Its familiar interface and Office format compatibility make it easy to move existing files, although it does not resolve Exchange quarantine or mail flow policy issues.

Document quarantine investigations and policy findings in a familiar word processorOpen and edit common Microsoft Office formats, including DOCX, XLSX, and PPTXUse a lightweight suite for documents, spreadsheets, and presentationsMove existing Office files into a familiar, easy-to-use workspace
microsoft office alternative - wps office

Frequently Asked Questions

Why might a sender-based rule fail to match a quarantined message?

The rule may be checking a sender value different from the one you expect, or a security policy may have quarantined the message. Compare the From, Sender, and Reply-To headers with the condition under Exchange admin center > Mail flow > Rules.

Where can I find the reason a message was quarantined?

In the Microsoft Defender portal, go to Email & collaboration > Review > Quarantine. Select the message and inspect its quarantine reason and available policy details.

How do I check what happened to a message in Exchange?

Open Exchange admin center > Mail flow > Message trace. Search using the sender, recipient, and relevant time range, then open the result to inspect its recorded events and delivery status.

How do I match either of two sender patterns in a rule?

When using a condition that accepts regular expressions, separate alternatives with a pipe character (|). Test the complete expression against the intended values before relying on it.

Will adding a sender to a safe sender list prevent all quarantine actions?

Not necessarily. The result depends on the list, policy, and security verdict. Test any permitted change with a controlled message and review the resulting quarantine details and message trace.