User interface problems could cause people to apply a mail filter to all of their e-mails

Yesterday I added about 25 mail filters to one of my accounts to delete various e-mails based on who they were sent to only to find that ALL of my e-mails were being deleted. Fortunately I noticed it right away and quickly deleted all mail filters and only ended up losing maybe 4 or 5.

Today I tried the same thing on a less important account and had the filters move all e-mails that trigger them to a folder called "Spamcatch". Again, I found that ALL of my e-mails were being moved there no matter who they were being sent to. After editing the ~/.procmailrc file I found two entries like this:

:0 $HOME/Maildir/.Spamcatch/

They did not have any sort of trigger, but simply moved ALL of my messages there. I have tried to recreate the bug, but could not, so the only reason I can think of that these filters were added was that I did not click on the radio button beside "Based On Header" in the add mail filter dialog, but filled it out as if I had. When in doubt, it's a PEBCAK error.

I have a very simple solution to this problem to prevent other people from committing the same mistake:

Upon page loading, use JavaScript to disable all of the input boxes beside everything in the list on the left (e.g. beside Based on header, Save to folder, etc) UNTIL someone clicks on the radio button, at which point JavaScript would reenable the ones beside that particular item. This would also be compatible with browsers that do not have JS enabled since the script would not be able to disable them in the first place.

One thing I've learned running multiple databases is you can never trust anyone's input 100% and this would definitely help fix the problem.

Best regards,

Mike

Status: 
Closed (fixed)

Comments

That's a good idea .. I will implement something like this in the next Usermin release.

Automatically closed -- issue fixed for 2 weeks with no activity.