Reputation: 3497
The filter mechanism of Thunderbird is nice for simple things. But I want to do something like
(If message contains xy or sender is yz) and status is read, move to trash
The problem is, one filter rule can only match any (= OR) or all (=AND) filterconditions. I tried working around with that by first marking all the messages with an unprobable combination of tags in a first filter and then use a second filter to move all the marked+tagged messages to trash if they are read, but this works very poorly, as sometimes messages aren't being marked, sometimes marked messages are not deleted.
The purpose of all this is to delete unimportant or notification emails as soon as I read them. Of course I could do a seperate filter for each of them, but if I wanted to change something, it gets tedious for all >20-30 filter rules.
Is it somehow possible to hack into the filter configuration or is there some other way of complex filtering using only ONE filter?
Btw. I'm using Gmail+IMAP if that could be important.
Upvotes: 24
Views: 21401
Reputation: 4414
You can also manually edit the msgFilterRules.dat
file in the \Users... folder.
(A || B) && C
becomes:
condition="AND (OR (body,contains,A) OR (body,contains,B) AND (to,contains,C)"
Note first parenthesis is mismatched.
Change the condition depending on your requirements. Look at other filters, or create test filters to learn the syntax empirically. Note there are several msgFilterRules.dat
for different Email addresses and folders.
Upvotes: 6
Reputation: 10414
I strongly suggest using FiltaQuilla as suggested in MozillaZine.
Hers is my filter for:
Upvotes: 7
Reputation: 3083
A much less nice, but working solution, could be to convert your requirements to disjunctive normal form. That means creating several filters, each of them having "AND" parts. As multiple filters are independent, running them one after another simulates the "OR" part.
In your particular case, (message contains xy OR sender is yz) AND status is read = (message contains xy AND status is read) OR (sender is yz AND status is read)
.
That means you should create two filters, one for message contains xy AND status is read
and the other for sender is yz AND status is read
Upvotes: 6
Reputation: 163
I don't think there is a way to do exactly what you want. But I can suggest this workaround:
I use this system to delete some daily notifications, which become useless after a few days.
Upvotes: 1