Mail Flow Rules (Exchange Transport Rules)

What are Mail Flow Rules?

Mail Flow Rules (also known as Exchange Transport Rules) are policies in Microsoft 365 that control how emails are processed as they travel through Exchange Online.

They allow administrators to inspect, modify, block, redirect, or apply actions to emails based on defined conditions.

👉 In simple terms: Mail Flow Rules automate email handling in your organization.

🚀 Community Edition Released!

Try the M365Corner Microsoft 365 Reporting Tool — your DIY pack with 20+ out-of-the-box M365 reports for Users, Groups, and Teams.

How do Mail Flow Rules Work?

Mail Flow Rules are applied during email transport (while messages are being sent or received).

They consist of:

  • Conditions → When the rule triggers
  • Actions → What happens to the email
  • Exceptions → When the rule is skipped

Flow:

  • Email enters Exchange Online
  • Rules are evaluated in order
  • Matching rule actions are applied

Key Features of Mail Flow Rules

  • Message Inspection – Analyze email content, headers, and attachments
  • Flexible Conditions & Actions – Build custom logic
  • Priority-Based Processing – Rules run in sequence
  • Security & Compliance Integration – Supports DLP and policies
  • Real-Time Processing – Applied instantly during mail flow

Use Cases for Mail Flow Rules

  • Email Redirection – Forward emails automatically
  • Blocking Emails – Restrict unwanted senders or content
  • Adding Disclaimers – Append legal text to emails
  • Data Loss Prevention (DLP) – Protect sensitive data
  • Internal Routing – Direct emails to teams

Accessing Mail Flow Rules Using Exchange Admin Center

  1. Login into exchange using: https://admin.exchange.microsoft.com
  2. Access Mail Flow → Rules.

Fetching Mail Flow Rules Using Exchange Online PowerShell

Get-TransportRule

Retrieves all configured Mail Flow Rules in Exchange Online.

Creating Mail Flow Rules Using Exchange Online PowerShell

âš ī¸ Note: Exchange Online PowerShell is required to create Mail Flow Rules using PowerShell.

Example:


New-TransportRule -Name "Redirect CEO Emails"`
-SentTo "samadmin@7xh7fj.onmicrosoft.com" `
-RedirectMessageTo "dexter@7xh7fj.onmicrosoft.com"
                                        

Frequently Asked Questions

  1. Are Mail Flow Rules the same as Transport Rules?
    Yes, Mail Flow Rules are the modern name for Exchange Transport Rules.
  2. Where are Mail Flow Rules configured?
    They can be configured in the Exchange Admin Center or via Exchange Online PowerShell.
  3. In what order are Mail Flow Rules processed?
    Rules are processed from top to bottom based on priority.
  4. Can Mail Flow Rules modify email content?
    Yes, they can add disclaimers, modify headers, or redirect messages.

Did You Know? Managing Microsoft 365 applications is even easier with automation. Try our Graph PowerShell scripts to automate tasks like generating reports, cleaning up inactive Teams, or assigning licenses efficiently.

Ready to get the most out of Microsoft 365 tools? Explore our free Microsoft 365 administration tools to simplify your administrative tasks and boost productivity.

© Created and Maintained by LEARNIT WELL SOLUTIONS. All Rights Reserved.