Wednesday, April 24, 2024
HomeMicrosoft 365ExchangeMaximizing Exchange Transport Rule Size with Regex - Part 2

Maximizing Exchange Transport Rule Size with Regex – Part 2

Uncovering the Limits of Exchange Online Transport Rules
In the era of cloud computing, organizations are more and more looking to use Exchange Online and its powerful suite of mail transport rules to help secure their emails. Exchange Online provides a great way to apply various rules, such as blocking emails from certain domains or applying a disclaimer to all outbound emails. But what are the limits of Exchange Online transport rules? In this blog post, I will explore the maximum size of a transport rule and the limits of the regex expression in it.

The Maximum Size of a Transport Rule
One of the main limitations of Exchange Online transport rules is the maximum size. The maximum size of a transport rule is 10 KB. This means that if you are creating a transport rule which is larger than 10 KB, it will not be accepted by Exchange Online.

The Limits of the Regex Expression in a Transport Rule
The regex expression in a transport rule is limited to a maximum of 5,000 characters. This means that if you are creating a transport rule with a regex expression which is larger than 5,000 characters, it will not be accepted by Exchange Online.

How to Test the Size of a Transport Rule
If you want to test the size of a transport rule, you can use the Exchange Online PowerShell cmdlet Get-TransportRule. This cmdlet will return the size of the transport rule in bytes. You can then use this information to determine if the transport rule is larger than 10 KB.

Conclusion
Exchange Online transport rules are a powerful tool for organizations to secure their emails. But they are limited in size and the regex expression they can contain. Knowing the limits of a transport rule and how to test them can help ensure that any transport rules you create are within the limits imposed by Exchange Online.
References:
Finding Transport Rule Size Part 2 – Regex Limit

Most Popular