When I created a mail filter saying “Header Subject must start with [token]” it matched EVERY single incoming e-mail resulting in moving all my mail to a subfolder. Do [ ] brackets have special meaning? Or should I just use regexp syntax when defining filters?
Yeah, I suspect that you’re running into the brackets special meaning in regex syntax.
In regex-speak, if you say:
That says to match one character – either a “t”, “o”, “k”, “e”, or “n”.
To stop the special meaning of the brackets, you can escape them by using this syntax:
Let us know if that does the trick!
I’m having the same problem, but without brackets. My mail filters are matching ALL mails, even if they don’t match it. For example, I add a filter to move all mails TO address starting with “email@example.com” to a specific folder and every single message that comes in, even if not to that address is moved to that folder. I’ve tried it on two separate accounts and it has the same effect.
I figured out the problem by editing the ~/.procmailrc file. There is a bug in the Virtualmin code that while adding about 20 filters, it also added two separate cases of:
with no type of trigger set, so therefore matches ALL messages
Virtualmin admins, maybe you should look into this because I would consider this to be a serious bug! People could set up simple mail filters and unknowingly trigger all of their mail to be caught by the trigger. I’m using Usermin 1.430 on Centos 5 using the install script. As I mentioned earlier, this happened on two different accounts while setting up filters (around 20 for each account).
Nice catch! My recommendation would be to file a bug report regarding the issue you were seeing, so that Jamie can dig into the code and figure out what was awry. You can file a bug report using the Support link above.
Thanks for the advice Eric. I think I figured out the reason it was doing that and the problem is not with the Usermin code, but with the actual interface. I still filed a bug report though.