Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am using Thunderbird 9 and I have a problem I cannot solve in a "nice" way.

My input is a series of emails I received regularly and I want to filter at two levels. First, if the email is from a specific sender and contains one of a set of strings, I want it to be moved to a folder. My problem here is that I cannot create a filter with clauses like X AND (Y OR W OR Z) which is what I need. How can I do this?

Second, once this filtering is done, I would like to flag as Important (and maybe do something else) any message in the filtered set that contain a specific string in the Body. To do this I read about FiltaQuilla and its Javascript integration, but I wasn't sure how to use it for "filtering" instead of "filter action"...

I know the filtering I am performing would be better done at mail-server level, but I don't have that option, so...is what I am trying to do even possible?

Thank you very much!

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

Thunderbird filters are processed in sequence unless you explicitly put in a condition that stops flow. So with these two things, you can usually achieve AND and OR operations.

If email is from X and contains Y move to folder
If email is from X and contains W move to folder
If email is from X and contains Z move to folder

So this sequence effectively comes out as "If email contains (Y or W or Z) and is from X then move to folder.

If you want to flag as important, you effectively have to do the test again (using match all):

If email is from X and contains Y and contains T flag important and potentially do something else
If email is from X and contains W and contains T flag important and potentially do something else
If email is from X and contains Z and contains T flag important and potentially do something else

So all of the filters will run, and it is about ordering them right to achieve what you want. It isn't as elegant as a proper boolean parentheses logic, but mostly you can get there, just with many more filters. And you can use the "Stop Processing Filters" action if something later on will match where you don't want it to.

share|improve this answer
    
Thanks! But, what if I needed, for the second set of filters, a more powerful tool than a simple "Body contains"? What if I have to match regexes on lines granulatiry? Is FiltaQuilla what I need then or not? –  mdm Jan 13 '12 at 14:20
    
FiltaQuilla just has additional actions rather than additional conditions. How about adding the other requirements to the question, and we can enhance the answers to match? –  Paul Jan 13 '12 at 22:33
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.