What Are Mail Flow Rules in Exchange Online?
In any organization, email is a primary form of communication. But with great volume comes great responsibility—managing that email flow to ensure important messages are delivered while blocking spam or potential threats is crucial. Imagine a company where all emails from a trusted supplier are mistakenly marked as spam, or worse, a phishing email sneaks into employees’ inboxes.
This is where Mail Flow Rules (also known as Transport Rules) in Microsoft Exchange Online come in. These rules allow administrators to automate how email messages are processed as they pass through the Exchange system. With the right mail flow rules in place, organizations can enforce policies, prevent data leakage, and enhance security—ensuring that all communication is managed effectively.
Difference Between Outlook Rules and Mail Flow Rules
| Feature | Outlook Rules | Mail Flow Rules |
|---|---|---|
| Scope | User-specific, operates within Outlook | Organization-wide, operates on Exchange |
| Execution Location | Client-side or server-side | Always server-side |
| Control | Managed by individual users | Managed by Exchange administrators |
| Complexity | Limited to user’s mailbox actions | Highly customizable with advanced options |
Key Takeaway:
While Outlook Rules are personal and allow users to organize their own mailboxes, Mail Flow Rules are designed to manage and secure email traffic across the entire organization.
How Do Mail Flow Rules Work?
Mail flow rules operate based on a combination of conditions, exceptions, and actions:
- Conditions: Criteria that determine which messages the rule should apply to (e.g., sender’s domain, recipient’s address, specific keywords).
- Exceptions: Define situations where the rule should not apply (e.g., specific users or addresses).
- Actions: What happens when the rule is triggered (e.g., block the message, add a disclaimer, or modify the message properties).
These rules are processed in order of priority, starting from the lowest number. Administrators can adjust the rule’s priority to control its sequence of execution.
Step-by-Step Guide to Configuring Mail Flow Rules
1. Access the Exchange Admin Center (EAC)
- Log in to the Microsoft 365 admin portal.
- Navigate to Admin Centers > Exchange.
2. Create a New Rule
- In the EAC, go to Mail Flow > Rules.
- Click + and select Create a new rule.
3. Define Rule Properties
- Name: Provide a descriptive name for the rule.
- Apply this rule if: Define the condition(s).
- Do the following: Specify the action(s).
- Except if: Add exceptions if needed.
- Mode: Set to “Enforce,” “Audit,” or “Test.”
4. Set Priority and Save
- Adjust the priority if necessary.
- Save the rule.
How to Create a Whitelisted Domain Mail Flow Rule
A whitelisted domain rule ensures that emails from specific domains bypass filtering.
Steps:
- Follow steps to create a new rule.
- Under Apply this rule if, choose The sender’s domain is and specify the domain(s).
- Under Do the following, select Modify the message properties > Set the spam confidence level (SCL) > -1 (whitelisted).
- Add the Exception in the Except If Section (If needed).
- Save the rule and click Next.

Key Properties:
- Conditions: Sender’s domain.
- Actions: Adjust spam confidence level.
- Mode: Enforce.

Review and Finish:
- Review the Rule Properties and click on the Finish.

How to Create a Blocklisted Domain Mail Flow Rule
A blocklisted domain rule prevents emails from specific domains from reaching your organization.
Steps:
- Follow steps to create a new rule.
- Under Apply this rule if, choose The sender’s domain is and specify the domain(s).
- Under Do the following, select Delete the message > Delete the message without notifying anyone.
- Add the Exception in the Except If Section (If needed).
- Save the rule and Click on the Next.

Key Properties:
- Conditions: Sender’s domain.
- Actions: Delete or reject message.
- Exceptions: Specify trusted senders if needed.

Review and Finish:
- Review the Rule Properties and click on the Finish.

These are just Exchange Online mail flow rules to help you understand the rule structure. However, you can also whitelist and block domains from the Microsoft defender portal. Check out the article to learn how to do that. – Microsoft.Security
FAQs
- What is the difference between transport rules and DLP policies?
Transport rules manage email flow across the organization, while Data Loss Prevention (DLP) policies protect sensitive information. - Can mail flow rules be applied to external senders?
Yes, mail flow rules can target both internal and external senders. - How do I test a mail flow rule?
Set the rule’s mode to “Test with Policy Tips” or “Test without Policy Tips” to evaluate its impact without enforcing it. - Can I prioritize mail flow rules?
Yes, you can assign a priority number to mail flow rules to control the execution order. - What are the differences between Outlook rules and mail flow rules?
Outlook rules are personal and operate on individual mailboxes. They are processed after mail reaches the mailbox.
Mail flow rules are organization-wide, managed by administrators, and processed before the message reaches the mailbox.
Conclusion
Mail flow rules in Exchange Online offer powerful capabilities for organizations to control email traffic, enforce compliance, and protect sensitive data. By setting up these rules properly, administrators can streamline communication, prevent unauthorized messages, and safeguard the organization’s digital environment.
Explore More from MS Cloud Explorers
- How to Send Encrypted Email in Outlook: A Step-by-Step Guide for Beginners
- How to Run Extended Message Trace in Microsoft 365: A step-by-step guide.
- Microsoft Sensitivity Labels Explained: Boost Security and Compliance in Office 365
- The Ultimate Guide to Exchange Email Online Archive for Efficient Email Management
Enjoyed the article?
We’d love to hear your thoughts—share your comments below!
For more insights, guides, and updates from the Microsoft ecosystem, be sure to subscribe to our newsletter and follow us on LinkedIn. Stay connected and never miss out on the latest tips and news!








2 comments on “Mail Flow Rules in Exchange Online: A Comprehensive Guide”