How to create a Transport Rule in Exchange Online

How to create a Transport Rule in Exchange Online

Introduction

In your M365 tenant you might need to configure a special behavior for your mail flow, or stamp certain email properties on some emails, or define a rule for specific cases (ie. emails from John). This is where an admin, or consultant, or a specialist with skills around Microsoft Exchange comes in.

How to configure

Prerequisites: Exchange Administrator or Global Administrator permissions.

First you need to know exactly what you need in terms of behavior, then figure out if Transport Rules can cover that need, and then you may proceed and try to configure something.

NOTE! There is also the concept of an Inbox rule which are rules a user can define via its own Outlook or OWA, or an admin can define for the user via PowerShell. These 2 different types of rules somewhat overlap in capabilities, especially when the action concerns the user/redirecting/forwarding/ccing/bccing someone, but generally speaking, the Exchange Transport Rules that we are talking about today are far more powerful, much more capable and are regarded as "server side rules"

There are thousands of possible combinations with Exchange Transport Rules, but it's not a guarantee that any specific scenario can be covered by ETRs. Here are some common scenarios of what ETRs can do (actions):

  • Forward the message for approval
  • Redirect the message to (some other user/group)
  • Block the message (with or without a DSN message sent in return)
  • Add recipients (CC, BCC)
  • Modify the message Properties (add/remove a Message Header, or lower/increase the SCL - Spam confidence level of a message)
  • Modify the message security (TLS, OME etc.)
  • Prepend the subject with (You can Add [External] to emails comming from outside, so users are cautious with these)
  • Generate incident report and send it to..
  • Notify the recipient with a message

And there are filtering options as many as the actions, and also Exceptions, and you can also combine multiple of these using + which means using the AND operator. That's why I was saying earlier that there are literally thousands of combinations available.

We'll grab a simple example today, say when an email is received by Razvan from an external sender, to have someone else added to CC.
Head over to admin.exchange.microsoft.com which is the EAC (Exchange Admin Center). Go to Mail Flow -> Rules -> Add a rule -> Create a new rule

Create new rule.png

Give it a name, and start configuring the rule.
Apply this rule if - The sender - Is External (you can be very specific, or use the domain, or search for certain words in the address of the sender):

Sender is external.png

Do the following: Add recipients -> To the CC Box

2025-07-31_15-59.png

You can define exceptions based on all of the options you had when filtering for the emails:
2025-07-31_16-01.png

Hit Next, and then you'll have some options to either Enforce, Test, have a custom activation time for it, very importantly stop processing other rules which is an option that can be really useful. In our case we'll Enforce it immediately, but still, the rule will not be enabled. You need to enable it manually for it to start applying. Select it and click on enabled.

2025-07-31_16-04_1.png

A general recommendation is to wait 10-15 mins for it to fully apply/propagate, although most of the times it's instantaneous.

In the meanwhile I'll let you know that Exchange Transport Rules can also be configured, checked or tweaked via PowerShell using Get/Set-TransportRule cmdlets:

2025-07-31_16-17.png

Cool, now let's test our transport rule. I'll send an email from an external address. And shortly after we see the message is received and indeed it has Ioana CCed on it:
2025-07-31_16-23.png

Conclusion

Transport Rules can be really powerfull. There are scenarios where you can route emails using connectors in conjunction with TRs to have certain emails follow a certain path or arrive at a certain destination. It is clear that you can achieve a lot of customization goals in terms of Mail Flow with Transport Rules. Go ahead and check them out, and if you need help around Exchange Online, or other Microsoft Cloud topics, be sure to reach out. Thank you, and see you next time!