문제

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.

도움이 되었습니까?

해결책

Take a look at the FiltaQilla AddOn - it allows regular expressions... :-)

다른 팁

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

I strongly suggest using FiltaQuilla as suggested in MozillaZine.

Example

Hers is my filter for:

  • From contains @yahoo.es
  • Subject is photo, selfie or image, plus plurals, case insensitive

ThunderBird filter with regular expression

I don't think there is a way to do exactly what you want. But I can suggest this workaround:

  1. Create a first filter to store the messages in a specific folder (folder1), based only on the sender
  2. Create a search folder (folder2), to select only the read messages from folder1
  3. Periodically (manually) delete the messages from folder2. Unfortunately, I didn't find a way to do this automatically

I use this system to delete some daily notifications, which become useless after a few days.

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top