An organization-wide Exchange Online rule, also called a transport rule, that checks messages in transit against conditions and exceptions and applies actions before delivery.
Title graphic: Mail flow rule (Concept)
Description
A mail flow rule, also known as a transport rule, is an organization-wide rule in Exchange Online. It inspects messages as they pass through the organization and, when certain conditions match, applies an action before the message is delivered. The M365.FM episode "Mail Flow Rules - Simply Explained" describes this as a layer of rules that every email in a company passes through, sitting between the send button and the inbox, usually without users ever seeing it.
According to the Microsoft Learn documentation, a rule consists of conditions, actions and optional exceptions. The conditions define which messages the rule applies to, and the exceptions carve out messages that should be left alone. The actions describe what happens to a matching message. Examples named in the documentation include prepending text to the subject, forwarding a message for approval, sending a policy tip to the sender and generating an incident report. The episode frames the logic of a rule around three questions that every rule asks, followed by what happens when a rule fires.
Beyond conditions, actions and exceptions, a rule has several settings. The rule mode can be set to enforce the rule or to test it, with or without policy tips. A severity value is available, but it only filters reports and does not change how the rule behaves. A time window can limit when the rule is active, and a setting can stop the processing of further rules. Another choice determines whether the sender address is matched in the message header, in the envelope or in both. Rules are processed in priority order, and the rule at the top of the list is evaluated first, so the order of rules matters when several of them could apply to the same message.
Administrators can manage mail flow rules in the Exchange admin center or with Exchange Online PowerShell. The documentation notes that rules created in the admin center start out disabled, so a new rule has to be enabled before it takes effect. The documentation includes an example that tags external mail sent to a distribution group, which shows a typical use: marking or handling messages based on where they come from and where they are going.
The episode covers the jobs people commonly give these rules, the limits that are rarely mentioned up front, and the mistakes beginners make. It also places mail flow rules within the wider context of Microsoft 365 and Azure. A recurring theme in both the episode and the documentation is testing. The documentation advises testing each rule and the combination of rules thoroughly, and points out that changes can take a while to apply and that report data can lag. The episode likewise includes a section on testing a rule before it affects real mail, which fits the availability of test modes in the rule settings.
In practice, decisions around mail flow rules include how specific the conditions should be, which exceptions are needed, where a rule belongs in the priority order, and whether it should first run in a test mode before being enforced. Because a rule acts on messages in transit across the whole organization, a poorly scoped or badly ordered rule can affect more mail than intended, which is why the sources stress testing the rule on its own and in combination with the other rules already in place.
Overview compiled with AI from M365.FM episodes and the facts on this page. You can improve it with the edit button below.
Learn how Microsoft 365 mail flow rules work, how to set conditions and actions, avoid common pitfalls, and test transport rules safely in Exchange Online. Every email in your company is being checked by rules you've never seen. They're called mail flow…
Questions marked with AI were written with AI from the facts on this page.
What is a mail flow rule? (AI)
A mail flow rule, also called a transport rule, is an organization-wide Exchange Online rule that checks messages in transit against conditions and exceptions and applies actions before delivery.
In what order are mail flow rules processed? (AI)
Rules are processed in priority order, with the top rule evaluated first. A setting can also stop the processing of further rules.
How are mail flow rules created and tested? (AI)
They can be managed in the Exchange admin center or with Exchange Online PowerShell, and rules created in the admin center start out disabled. The documentation describes test modes, with or without policy tips, and advises testing each rule and the combination of rules thoroughly.
What is a mail flow rule in Microsoft 365?
A mail flow rule is an instruction that watches email while it is moving and takes an action on the messages that match. Microsoft also calls it a transport rule. · From the episode: Mail Flow Rules - Simply Explained
What can a mail flow rule do?
It can add a signature, add a warning on outside mail, lock a message down with encryption, or stop it before it arrives. · From the episode: Mail Flow Rules - Simply Explained
What three questions does every mail flow rule ask?
Every rule asks what to catch, what to skip and what to do. In other words, it sets the conditions that match a message, the exceptions that leave it alone and the action taken on matching mail. · From the episode: Mail Flow Rules - Simply Explained
How should you test a mail flow rule?
Test a rule before it affects real mail, since a rule that fires on the wrong messages can alter or stop email unexpectedly. The episode treats testing as its own step, alongside the limits that trip up even seasoned admins. · From the episode: Mail Flow Rules - Simply Explained
Short info above, community knowledge below: add practical tips, examples or corrections. New contributions are reviewed first; trusted members publish directly.
Experts and companies for this topic
Nobody has listed this topic yet. Add it to your profile.