We’re trying to move to Virtualmin, but are facing an annoying issue. We can’t get email filters to work with regex.
One of our email filters looks like this:
- ^Subject: [[\w\d]+.domain.com] Account Suspended
When recieving an email called “[server1.domain.com] Account Suspended”, it won’t get filtered at all. It just ends up in the inbox.
Why could this be?
I’ve tested a bit further, and it seems that procmail isn’t too keen about \w\d.
If I change the regex to be
everything works as it should. This is not a viable solution for us, though.
[server1.domain.com] Account Suspended
I’ve even tested with just
as the regex, but somehow it’s not a match when I send an email with the subject ‘s.domain.com’.
Seems to be working with the following:
[[a-z0-9]+.domain.com] Account Suspended
Any reason why \w and \d won’t work?