Messaging Gateway

 View Only

Symantec Messaging Gateway - Regular Expression Help

  • 1.  Symantec Messaging Gateway - Regular Expression Help

    Posted Sep 02, 2014 01:38 PM

    We have been bombarded with spam recently and are trying to make some custom content rules to help block them. We noticed that at least half of the spam emails contain 9 or more blank lines.

    I wrote a regular expression and have tried many different forms to identify the 9 blank lines. I have been using the site www.regexr.com and http://regex101.com/ to test my expressions using some of the spam messages as the Test String. I get these expressions to find a match on both of these websites. I then enter the same regular expression into a content rule in Symantec Messaging Gateway and send a test email. My rule never gets triggered. I know other regular expressions are working, but not one to identify a blank line.

    I believe ([\n]{9,}) should work no problem. I have also tried different combinations with \r \s \W [[:space:]] and others and still no luck. Symantec's support has told me they don't help write custom regular expressions but that's not my issue. I have the expression that works, it just doesn't work in Messaging Gateway. Does anyone know how what regular expression may work with Messaging Gateway to detect 9 spaces in a row.