Webinar with Varonis: Turn Conference Leads Into Pipeline | December 9 | 9am ET > REGISTER

Home / Guides / Office 365 Transport Rules (Create, Order, Test and Back Up)

Office 365 Transport Rules (Create, Order, Test and Back Up)

Learn where Office 365 transport rules live, how to create one, why rule order and test modes matter, and how to export rules before you change them.

Reading time: 13 min Author: Amotz Harari Updated: December 1, 2026
How to create Office 365 transport rules

Short answer

Short answer

Office 365 transport rules are Exchange Online mail flow rules that act on email in transit across your organization. You build them in the Exchange admin center under Mail flow > Rules, or with New-TransportRule in PowerShell. The one caution is scope, because a rule with no condition acts on every message.

Takeaways

  • A new rule saves disabled and can take 30 minutes or more to apply.
  • Priority 0 runs first, and one setting can stop every later rule.
  • Export your rules before a change, because Microsoft keeps no rule history.

A wrong rule can break mail flow for the whole organization, and there is no undo.

Microsoft’s mail flow rules overview warns that a delete action with no conditions could delete all inbound and outbound mail.

Signatures and disclaimers are a common use. The last 2 sections cover them, with Microsoft’s own limits.

Transport Rules Explained

What are Office 365 transport rules?

Office 365 transport rules are what Microsoft calls “mail flow rules (also known as transport rules)”: server-side rules in Exchange Online that act on messages “while they’re in transit, and not after the message is delivered to the mailbox.” Outlook inbox rules do a different job, inside one mailbox after delivery.

DimensionTransport rule (mail flow rule)Outlook inbox rule
Where it runsExchange Online, on the serverOne mailbox
Who creates itAn Exchange admin, for the organizationThe mailbox owner
When it actsWhile mail is in transitAfter delivery
ReachEvery message the rule matchesOne user’s mail

A transport rule runs on the server, so one rule changes mail for every matching user, and only an admin can edit it.

Some mail never meets a rule. Exchange Online skips its own system messages:

  • Exchange non-delivery reports (NDRs)
  • Arbitration mailbox messages
  • Journal reports

Mail flow rules also run before data loss prevention (DLP) rules. Per Microsoft’s best practices, they don’t re-check a message after DLP adds recipients.

New to Exchange Online itself? Start with what Microsoft Exchange and Exchange Online are.

Finding Mail Flow Rules

Where are transport rules in Office 365?

Transport rules in Office 365 live in the new Exchange admin center at admin.exchange.microsoft.com, under Mail flow > Rules, and the direct rules link opens the list. Creating or changing a rule needs the Organization Management role group, and Exchange Online PowerShell reaches the same rules through the TransportRule cmdlets.

To get there from the Microsoft 365 admin center:

  1. Select Show all in the left menu.
  2. Select Admin centers, then Exchange.
  3. In the Exchange admin center, open Mail flow > Rules.

Building a rule takes a named role, not just any admin account. Microsoft’s feature permissions tie mail flow rules to Organization Management.

View-Only Management can see the rules but not change them.

Picture an MSP engineer who opens a client’s rules page but can’t add a rule. The client’s admin has to grant Organization Management.

Creating a Transport Rule

How do I create a transport rule in Office 365?

Create a transport rule in Office 365 in the Exchange admin center: open Mail flow > Rules, select Add a rule, then Create a new rule or pick a template. Name it, set its conditions, actions and exceptions, choose its settings and select Finish. The rule saves disabled, so you review it before it runs.

Every rule has 4 parts, and the wizard fills them in this order:

  • Conditions: which messages the rule acts on.
  • Actions: what the rule does to those messages.
  • Exceptions: which matching messages the rule skips.
  • Properties: mode, priority, activation dates and severity.

Many guides name only the first 3. Properties are where many “rule not working” tickets start.

Follow these steps from Microsoft’s guide to managing mail flow rules:

  1. Go to Mail flow > Rules in the Exchange admin center.
  2. Select Add a rule, then Create a new rule, or pick a template.
  3. Enter a name that says what the rule does.
  4. Under Apply this rule if, pick a condition. Apply to all messages is itself a condition you select.
  5. Under Do the following, pick the action.
  6. Under Except if, add any exceptions, then select Next.
  7. Set the rule settings, such as mode and priority, then select Next.
  8. Review the rule and select Finish.

Keep 2 habits to save a rebuild:

  • No trailing spaces: Microsoft doesn’t allow them in a word or phrase you add to a condition or exception.
  • Copy, don’t restart: select a working rule, choose Duplicate, edit it, then select Make copy.

The same rule is one line in Exchange Online PowerShell. Microsoft’s own example tags mail from outside the organization sent to a sales group:

powershell
New-TransportRule -Name "Mark messages from the Internet to Sales DG" -FromScope NotInOrganization -SentTo "Sales Department" -PrependSubject "External message to Sales DG:"

Each parameter does one job:

  • -FromScope NotInOrganization is the first condition: senders outside your organization.
  • -SentTo "Sales Department" is a second condition, so both must match.
  • -PrependSubject is the action: it adds the prefix to the subject line.

Rule Order and Logic

In what order do Office 365 transport rules run?

Office 365 transport rules run in priority order, starting at priority 0, and older rules sit higher by default. Each enabled rule that matches acts on the message unless an earlier rule ends processing. Stop processing more rules blocks every later rule, and some actions end processing on their own.

Move a rule up or down in the Exchange admin center, or set its priority in PowerShell:

powershell
Set-TransportRule -Identity "Sender is a member of Marketing" -Priority "2"

Per Microsoft’s mail flow rules overview, 3 settings end processing early:

  • Delete the message without notifying anyone: processing ends for that message.
  • Forward the message: no further actions apply.
  • Stop processing more rules: every later rule is skipped.

Put a rule that ends processing below the rules that must still run on the same mail.

Inside one rule, the logic is fixed:

Rule partWhen a rule has severalHow they combine
Conditions2 or more conditionsAND: all must match
Condition values1 condition with several valuesOR: any value matches
Exceptions2 or more exceptionsOR: any one skips the rule
Actions2 or more actionsAND: all apply

So “from Sales or to Finance” across 2 conditions needs 2 rules, which is Microsoft’s own advice for an either-or match.

A new rule covers mail sent and received inside your organization until a condition scopes it.

Suppose you add an “External message” subject prefix with no sender scope. Internal mail gets the tag too.

A sender condition, such as -FromScope NotInOrganization in Microsoft’s example, keeps the tag on outside mail only.

Actions run from rejecting, deleting or redirecting a message to adding recipients, prefixing the subject or inserting a disclaimer (Microsoft’s action list).

Enabling Transport Rules

How long does an Office 365 transport rule take to start working?

An Office 365 transport rule starts working only after you enable it, and then it can take up to 30 minutes to apply. A rule created in the Exchange admin center saves disabled so you can review it. Turn it on with its toggle or Enable-TransportRule.

A common view is that a new rule starts working in about 10 to 15 minutes.

Microsoft’s overview gives up to 30 minutes, and its manage page says “30 minutes or more.”

Microsoft builds a safe rollout into the rule itself. Each rule runs in 1 of 3 modes:

  • Enforce: every action runs.
  • Test with Policy Tips: Policy Tips are sent, but no delivery action runs.
  • Test without Policy Tips: only the Generate incident report action runs.

Microsoft advises sending messages that should match and messages that shouldn’t. Matches show in the Exchange Transport Rule report under Reports > Mail flow.

The report leaves out rules with severity Not audit, and its data can lag up to 5 days.

These modes check rule logic: whether the rule catches the right messages. They don’t show how a signature looks in anyone’s email app.

Most “rule not working” tickets trace to one of these settings, checked in order:

  1. Disabled: an admin center rule stays off until you enable it.
  2. Too new: a new or changed rule can need 30 minutes or more.
  3. In a test mode: neither test mode takes delivery actions.
  4. Outranked: a higher-priority rule ended processing first.
  5. Scoped wrong: a condition or exception excludes your test message.
  6. Scheduled: a rule with an activation date stays enabled but isn’t processed before that date.

Suppose you save a rule at 9:00 and see nothing at 9:10. Check the toggle, then wait out the 30 minutes before editing.

Transport Rule Limits

How many transport rules can an Office 365 tenant have?

An Office 365 tenant can have up to 300 transport rules, on every plan Microsoft lists, from Business Basic to Enterprise E5 and F3. Each rule is capped at 8 KB, and pattern text across all rules shares 20 KB, so long keyword lists hit a ceiling before the rule count does.

LimitValueWhat it means for you
Transport rules per organization300The cap for every rule in the tenant, whatever its purpose
Size of one rule8 KBA long word list in one rule can hit this first
Text in all MatchesPatterns and ContainsWords conditions20 KB, all rules combinedKeyword lists in different rules share one budget
Recipients added by all rules100 per messageEvery rule that adds recipients draws on the same budget
Forwardee limit10The cap on forwardees Microsoft sets for rules
Redirections by transport rules1Rules can redirect a message only once

Source: Exchange Online limits, Microsoft Learn.

Encrypted mail limits what a rule can do. On S/MIME messages a rule reads only the envelope headers and can’t inspect or change the content.

Microsoft Purview Message Encryption and RMS-protected content need transport decryption first. That’s why a disclaimer rule needs a fallback action.

Backing Up Transport Rules

How do I view, back up or export Office 365 transport rules?

View Office 365 transport rules in the Exchange admin center or with Get-TransportRule, and back them up by exporting them with Export-TransportRuleCollection before you change anything. Microsoft doesn’t keep rule history, so a rule can’t be reverted to a previous state, and the export is your only way back.

powershell
# List every rule
Get-TransportRule
# Show each rule's status
Get-TransportRule | Format-Table Name,State
# Show each rule's order
Get-TransportRule | Format-List Name,Priority
# Export every rule to XML
Export-TransportRuleCollection

The 2 Format views answer the first questions in any rule ticket: is the rule on, and where does it sit in the order?

Run the export before each change and file the XML with the change record. Without it, a bad edit means rebuilding by hand.

Plan the restore now, before an incident. Microsoft says Import-TransportRuleCollection “will be deprecated,” and its manual import first removes all existing rules.

Signatures with Transport Rules

Can an Office 365 transport rule add an email signature?

Yes, an Office 365 transport rule can add an email signature, as a disclaimer rule. Microsoft’s signature setup page says “Organization-wide signatures are called disclaimers, regardless of what they include.” Build one with Add a rule > Apply disclaimers, then Apply a disclaimer to the message > append a disclaimer.

Per Microsoft’s disclaimer page (2024), the text takes HTML, inline CSS, images by IMG tag and 23 sender tokens, such as %%DisplayName%% and %%Title%%.

By default the rule also hits incoming mail. An outgoing-only signature needs the condition The recipient > is external/internal > Outside the organization.

The full build, with the token list, an HTML template and the duplicate exception, is in how to add a signature in Exchange.

For a legal footer, see deploying disclaimers in Office 365 company-wide.

The fallback action decides what a recipient gets when the rule can’t insert the text, for example on an encrypted message. Microsoft offers 3 options:

  • Wrap (the default): the original message arrives as an attachment.
  • Ignore: the message arrives without the text.
  • Reject: the message isn’t delivered, and the sender gets an NDR.

Microsoft’s disclaimer page warns against Wrap on inbound external mail, because it interferes with Safe Attachments scanning. Its signature walkthrough selects Wrap for outgoing mail.

Pick Ignore when delivery matters more than the text, and Reject when no message may leave without it.

Microsoft’s own page lists 4 things an organization-wide signature rule can’t do:

  1. No signature under the latest reply: it lands at the bottom of the whole thread.
  2. Not in Sent Items: users can’t see server-side signatures in their sent mail.
  3. No embedded images: images go in only as IMG tags.
  4. Empty fields drop their line: the rule skips a line whose variables it can’t fill.

A common view is that missing directory attributes leave blank placeholder text in a rule-built signature.

Microsoft says the rule skips the line instead, so the signature is only as complete as your directory.

Choosing a Signature Route

Is an Office 365 transport rule enough for a team signature, or do you need a managed signature?

An Office 365 transport rule is enough for one fixed company-wide disclaimer, but a team signature is better run as a managed, tested signature. A rule enforces its text on every matching message, which suits a legal footer. A designed team signature meets Microsoft’s own limits.

A common view is that mail flow rules are enough for company signatures, so a tool is unnecessary.

Microsoft’s page, after listing these limits, adds: “Some of these limitations can be overcome by using non-Microsoft tools.”

RouteVerdictFitsWhat you take on
Mail flow rule (Apply disclaimers)Fine for one fixed legal disclaimer. Not recommended for a designed team signatureA footer that rarely changesMicrosoft’s 4 limits, HTML that ships untested, and an admin edit for every change, with no history to revert
Per-user Outlook signaturesNot recommended past 1 personOne personEach person sets and keeps their own
WiseStamp signature managerRecommended for any teamTeams that need one tested, consistent signatureA one-time integration setup

The rule of thumb: the more professional and consistent a team’s signature must be, the more it needs a qualified, tested tool.

HTML pasted into a rule ships untested. WiseStamp tests every template and the signature code it installs across email clients and devices.

One IT lead we spoke with uses a rule only for “the banner below the signature.”

In that IT lead’s words: “They do the designing, we do the implementation.”

Per-user signatures miss the other way. One IT decision-maker wanted signatures “centrally managed by our IT team,” with no “installs on their local device.”

WiseStamp’s server-side route for Microsoft 365 signature management also runs on Exchange Online, so IT keeps the tenant side.

A Global Admin runs a one-time setup that adds connectors and transport rules. Nothing is installed on your servers.

One customer we spoke with asked first, “is the mail flowing through your servers?” Yes: in server-side mode, WiseStamp’s service adds the signature in transit.

WiseStamp’s server-side signature rules can target groups, replies and external recipients separately. Groups can also carry separate reply and forward signatures.

No server-side signature shows in Sent Items or the compose window, WiseStamp’s included.

One IT contact we spoke with saw people “put in their own signature,” not realizing one “was [added] after they sent the email.”

The Outlook Add-in adds the signature while composing, on web, Windows, Mac, iOS and Android. Hybrid mode adds server-side only when none is detected.

Compare server-side vs client-side email signatures.

Next Steps

How do you roll out a transport rule safely?

Roll out a transport rule safely: export first, test a narrow rule, then choose a signature route.

  1. Export every rule with Export-TransportRuleCollection.
  2. Build it narrow, and keep it out of Enforce until the report shows the right matches.
  3. For team signatures, see the managed route for Microsoft 365. After a one-time integration setup, a signature change is applied to every assigned employee from one place, with no per-user setup.
  4. MSPs: see the WiseStamp partners page.

FAQ

A message “blocked by mail flow rule” in Office 365 matched an Exchange Online transport rule whose action rejected or deleted it. An admin in the organization that owns the rule can find it in the Exchange Transport Rule report under Reports > Mail flow, unless the rule’s severity is Not audit.

Report details are in Microsoft’s guide to managing mail flow rules.

Turn off an Office 365 transport rule with its toggle in the Exchange admin center or with Disable-TransportRule, and delete it with Remove-TransportRule. Run Export-TransportRuleCollection first: Microsoft keeps no rule history, so a changed or deleted rule can’t be reverted.

Yes. An Office 365 disclaimer rule can prepend its text instead of appending it: choose Apply a disclaimer to the message > prepend a disclaimer, or set -ApplyHtmlDisclaimerLocation Prepend in PowerShell. The rule still needs a fallback action for messages it can’t change, such as encrypted mail.

Disclaimer wording and rollout are covered in how to deploy disclaimers in Office 365.