Share via


How do you setup an Exchange 2010 Transport Rule to find number patterns like social security number?

I was asked this by a university in Phoenix. Here is what I found from our Exchange product team:

 

Prerequisites to make pattern matching work well:

You need Exchange 2007 Sp1 with Rollup10 or Exchange 2007 Sp2 or Exchange 2010

 

How do I create a sample rule?

In Exchange Command Shell type:

PS] D:\Users\Administrator\Desktop>New-TransportRule testrule -SubjectOrBodyMatchesPatterns "\d\d\d-\d\d-\d\d\d\d\s|\$"

 

The result of the rule firing is:

Asdkljf 349863-43-3454 fg

Not triggered – good

Asdf 568-45-45463477

Not triggered – good

Asdf 636-23-394867987 fgh

Not triggered – good

Asdfa asdfa 234-23-2345 rfy

Triggered - good

5675675747-56-34545645747

Not triggered- good

747-56-34545645747

Not triggered – good

 

More on transport rules here.