Filter mail and [ ] brackets

6 posts / 0 new
Last post
#1 Wed, 02/10/2010 - 03:26
gshegosh

Filter mail and [ ] brackets

Hello,

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?

Wed, 02/10/2010 - 08:52
andreychek

Howdy,

Yeah, I suspect that you're running into the brackets special meaning in regex syntax.

In regex-speak, if you say:

[token]

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:

[token]

Let us know if that does the trick!

-Eric

Wed, 02/24/2010 - 15:48
mikerobinson

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 "examplefilter@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.

Wed, 02/24/2010 - 16:44
mikerobinson

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:

:0
$HOME/Maildir/.Spamcatch/

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).

Mike

Wed, 02/24/2010 - 18:17
andreychek

Hi Mike,

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!

-Eric

Wed, 02/24/2010 - 20:19
mikerobinson

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.

Topic locked