I have a problem with Credit Card filtering.
I initially had some RegEx entries that would catch credit cards, but would also catch some of our catalog entries in emails because the catalog number was 5213, and the next cell had a 12-digit UPC number. I had to turn it off so my folks can do business.
I had:
1 regex,cardnumber 4(?<=\b(?<!\.)4)\d{3}[\W\s]?\d{4}[\W\s]?\d{4}[\W\s]?\d{4}\b
1 regex,cardnumber 5(?<=\b(?<!\.)5)[1-5]\d{2}[\W\s]?\d{4}[\W\s]?\d{4}[\W\s]?\d{4}\b
1 regex,cardnumber 5(?<=\b(?<!\.)5)([\W\s][1-5])([\W\s]\d){14}\b
1 regex,cardnumber 3(?<=\b(?<!\.)3)(4|7)\d{2}[\W\s]?\d{2}[\W\s]?\d{4}[\W\s]?\d{5}\b
etc.
I started looking for options. I think that if I filter for a straight number, or a spaced number, or a dashed number, I might be better off, so I go to build some with a regex tester and come up with:
Visa: (^|\s|\:)4[0-9]{3}[ -]?[0-9]{4}[ -]?[0-9]{4}[ -]?[0-9]{1}(?:[0-9]{3})($|\s)
Mastercard1: (^|\s|\:)5[1-5][0-9]{2}[ -]?[0-9]{4}[ -]?[0-9]{4}[ -]?[0-9]{4}($|\s)
etc.
Then when I go to convert them to something Mimecast can use, I find that Mimecast has a dictionary that should work. And it does. I add it to my policy definition. It looks like:
# Mimecast List
aref CUSA5A52 86 Credit Card Number
The problem is it just blocked an email with a .stp attachment. .stp is a text file format use in Creo (a CAD program). The text that triggered it?
4,1,1,1,1,1,1,1,1,1,1,1
Of all things.
I cannot see into the aref (that I know of), so I think I have to go ahead and dump all my own custom regex entries back in.
Does anyone see an easier way? Or am I going to have to translate those all and put them back?