Exchange 2013 Mail flow rule using RegEx

2.4k Views Asked by At

We're trying to implement a rule on certain mailboxes that it shouldn't accept an email without a subject.

I found documentation from Microsoft on exchange 2010 to Configure a Transport Rule for Messages That Have a Blank Subject, but I tried using the ^$ RegEx with Exchange 2013 and it doesn't seem to work.

I also looked at the Transport Rule Predicates for Exchange 2013 and it clearly says that SubjectMatchesPatterns matches messages where text patterns in the Subject field match a specified regular expression.

My workaround was to reject all messages to those specific mailboxes except if subject pattern matches . but if I want to add now conditions ie. to reject emails with a subject "Sent from my snipping tool" I can't do it.

I found Here that Exchange 2013 now supports extended RegEx but I didn't find that the syntax for ^$ should be any different in extended RegEx.

1

There are 1 best solutions below

1
On

\s+ matches whitespace, maybe try that.