How to Use Regexp in Acceptance and Routing Rules

When you configure a condition for an acceptance and routing rule, using the "Regexp" option, the actions are not applied to the required sessions.

Solution

   If you want to match all incoming emails from all subdomains of the example.test domain, using a rule like the ones in the below screenshots will not work:






   In the first image, the rule applies to the "*.example.com" domain, as the "Is" option does not support the use of regular expressions.

   In the second image, the problem is encountered because of the incorrect content for the regular expression field. Another common mistake is to forget escaping the required characters, which would allow the regular expression to be properly interpreted. To escape a certain character you need to place "\" before it.

   For example using  .*example\.test will match any domain that has ZERO or more characters before example.test.
   To match any subdomains of example.test but not the example.test domain you can use .*\.example\.test which matches any domain that has ZERO or more characters before .example.test.
   Another example to use in the above case would be .+\.example\.test
which will match any sub-domains that have ONE or more characters before
.example.test.

   As such the correct rule, in our case, would be:

OS: LinuxWindowsFreeBSDNetBSDOpenBSDSolaris
Distros: WindowsDEB based distros amd64FreeBSD 7.x