Message filters running in the wrong order
I get automatic emails from my company's source code system. These relate to many different software repositories, and I'm only interested in some of them depending on which repo. So, I have filters set up to move the messages into different folders depending on the "X-ReviewRequest-Repository" field of the header, which is populated by the tool sending the emails.
However, my emails are not getting sorted into the right folders, no matter what I do. I am convinced that the filters are not actually running in the correct top-to-bottom order, but in some arbitrary order instead.
Say we have "X-ReviewRequest-Repository" strings that look like this:
- Software/Products/CabbageTron9000
- Software/Components/PotatoUI
- Software/Components/PotatoUIModels
- Software/Components/PotatoUIMashed
- Software/Components/PotatoUIFried
- Software/Components/CarrotsAndPeas
Say I want my folder structure to look like this:
- Review
* CabbageTron9000 * PotatoUI * PotatoUIModels * PotatoUIMashed * PotatoUIFried
I have filters that look like this
X-ReviewRequest-Repository begins with Software/Components/PotatoUIModels -> move to PotatoUIModels and stop running filters X-ReviewRequest-Repository begins with Software/Components/PotatoUIMashed -> move to PotatoUIMashed and stop running filters X-ReviewRequest-Repository begins with Software/Components/PotatoUIFried -> move to PotatoUIFried and stop running filters X-ReviewRequest-Repository begins with Software/Components/PotatoUI -> move to PotatoUI and stop running filters X-ReviewRequest-Repository begins with Software/Components/CabbageTron9000 -> move to CabbageTron9000 and stop running filters
However, everything is in the wrong folders. I even CabbageTron9000 emails still sitting in Inbox, not filtered at all, as if "stop running filters" meant "stop all filtering for all messages" rather than "don't process any more filtering rules for this message".
So, I tried this instead: X-ReviewRequest-Repository begins with Software/Components/PotatoUI -> move to PotatoUI X-ReviewRequest-Repository begins with Software/Components/PotatoUIModels -> move to PotatoUIModels X-ReviewRequest-Repository begins with Software/Components/PotatoUIMashed -> move to PotatoUIMashed X-ReviewRequest-Repository begins with Software/Components/PotatoUIFried -> move to PotatoUIFried
that didn't work either!
What's going on?
Keazen oplossing
Ok. It looks like some of the filters simply aren't running. I do not know why. In particular, my PotatoUIModels is not recognising anything.
I moved it to before the others, AND changed my "PotatoUI" one to filter only "matches exactly".
Here, I'll open copy in my msgFilterRules.dat to show you...
WAIT A SECOND!
Some of the rules in here are listed as enabled="no"!! That includes my PotatoUI rule! That's despite the fact that the GUI indicates ALL rules are enabled! I've just closed Thunderbird, changed those values to "yes", started Thunderbird, run the filters, and the messages go where they should.
So, it's a bug. Some of the rules have been disabled, but the GUI does not indicate that.
Dit antwurd yn kontekst lêze 👍 0Alle antwurden (10)
fire.face.kitchengoblin74 said
I get automatic emails from my company's source code system. These relate to many different software repositories, and I'm only interested in some of them depending on which repo. So, I have filters set up to move the messages into different folders depending on the "X-ReviewRequest-Repository" field of the header, which is populated by the tool sending the emails. However, my emails are not getting sorted into the right folders, no matter what I do. I am convinced that the filters are not actually running in the correct top-to-bottom order, but in some arbitrary order instead. Say we have "X-ReviewRequest-Repository" strings that look like this:Say I want my folder structure to look like this:
- Software/Products/CabbageTron9000
- Software/Components/PotatoUI
- Software/Components/PotatoUIModels
- Software/Components/PotatoUIMashed
- Software/Components/PotatoUIFried
- Software/Components/CarrotsAndPeas
+ CabbageTron9000 + PotatoUI - PotatoUIModels - PotatoUIMashed - PotatoUIFried I have filters that look like this X-ReviewRequest-Repository begins with Software/Components/PotatoUIModels -> move to PotatoUIModels and stop running filters X-ReviewRequest-Repository begins with Software/Components/PotatoUIMashed -> move to PotatoUIMashed and stop running filters X-ReviewRequest-Repository begins with Software/Components/PotatoUIFried -> move to PotatoUIFried and stop running filters X-ReviewRequest-Repository begins with Software/Components/PotatoUI -> move to PotatoUI and stop running filters X-ReviewRequest-Repository begins with Software/Components/CabbageTron9000 -> move to CabbageTron9000 and stop running filters However, everything is in the wrong folders. I even CabbageTron9000 emails still sitting in Inbox, not filtered at all, as if "stop running filters" meant "stop all filtering for all messages" rather than "don't process any more filtering rules for this message". So, I tried this instead: X-ReviewRequest-Repository begins with Software/Components/PotatoUI -> move to PotatoUI X-ReviewRequest-Repository begins with Software/Components/PotatoUIModels -> move to PotatoUIModels X-ReviewRequest-Repository begins with Software/Components/PotatoUIMashed -> move to PotatoUIMashed X-ReviewRequest-Repository begins with Software/Components/PotatoUIFried -> move to PotatoUIFried that didn't work either! What's going on?
- Review
Oh, forgot to mention: this is on Mac.
Bewurke troch fire.face.kitchengoblin74 op
Personally I prefer contains rather than begins with. You never know when there is something like a line feed in there and contains just rolls over those sort of issues without much if any overhead penalty for the less exact matching.
Once a filter moves a message from the inbox, it is no longer there for other filters to be finding it, so there is no point in explicitly saying stop filtering.
What you have there are four filters, not four conditions in a single filter. Yes? The order of filter execution as you present it here should not be an issue at all, unless you have another filter that meets all of the emails criteria, like Software/Components/Potato => Move to junk While ever each filter uses a unique strings that is not included in another filter then order of execution is irrelevant.
Aha!
I think my problem was not realising that when a filter moves the message out of inbox none of the other filters will apply to it. I've changed things accordingly, then tested by moving everything back into my inbox and running the filters. It seems to be working! Thank you!
Bewurke troch fire.face.kitchengoblin74 op
Ah. No, it's still not working.
My rule that moves messages into PotatoUIMashed appears before my rule to move things into PotatoUI. Yet I'm still getting PotatoUIMashed messages in my PotatoUI folder.
What happens if you use 'contains' and only the specific difference in word and also move the first one to last. Then all the 'Models, Mashed and Fried have been moved, so when the PotatoUI runs it will not move others because they have already been moved.
X-ReviewRequest-Repository contains Models -> move to PotatoUIModels X-ReviewRequest-Repository contains Mashed -> move to PotatoUIMashed X-ReviewRequest-Repository contains Fried -> move to PotatoUIFried X-ReviewRequest-Repository contains PotatoUI -> move to PotatoUI
Keazen oplossing
Ok. It looks like some of the filters simply aren't running. I do not know why. In particular, my PotatoUIModels is not recognising anything.
I moved it to before the others, AND changed my "PotatoUI" one to filter only "matches exactly".
Here, I'll open copy in my msgFilterRules.dat to show you...
WAIT A SECOND!
Some of the rules in here are listed as enabled="no"!! That includes my PotatoUI rule! That's despite the fact that the GUI indicates ALL rules are enabled! I've just closed Thunderbird, changed those values to "yes", started Thunderbird, run the filters, and the messages go where they should.
So, it's a bug. Some of the rules have been disabled, but the GUI does not indicate that.
Please file a bug report here https://bugzilla.mozilla.org/home
Product: Thunderbird Component: Filters
I seem to to be having the same issue with most of my emails; they are all filter with rules to go into specific folders one in particular they want to continue to go into Citibank folder once there I then have to run filters on that folder until all of them are cleared out. However some do not. What really disappoints me is waiting on an important email in my in box or some other box that is very important and find it later in another email folder, well I've deleted this Citibank folder and created another Citibank folder in banking but it does the same thing. Surely there is a bug in the system and the other email versions I had did the same-thing somebody needs to address this issue, please.
Thanks, David Dec 08, 2020
Dave said
I seem to to be having the same issue with most of my emails; they are all filter with rules to go into specific folders one in particular they want to continue to go into Citibank folder once there I then have to run filters on that folder until all of them are cleared out. However some do not. What really disappoints me is waiting on an important email in my in box or some other box that is very important and find it later in another email folder, well I've deleted this Citibank folder and created another Citibank folder in banking but it does the same thing. Surely there is a bug in the system and the other email versions I had did the same-thing somebody needs to address this issue, please. Thanks, David Dec 08, 2020
I think you'll have more luck if you open a new thread. My issue was solved; there was one specific bug that was causing it, that bug has been fixed, and I don't get my issue any more.
Dave: re : What really disappoints me is waiting on an important email in my in box or some other box that is very important and find it later in another email folder Filters run in the order listed. So for example: You have two filters, first filters 'From' 'contains' 'bank' to folder 'A' the second filters 'From' 'contains' 'Citybank' to folder 'B'. This means all emails from 'Citybank' would get filtered into 'A' and as nothing now matches the second filter, nothing ends up in 'B' folder.
In your case, it is likely that the emails for 'Citybank' contain something that is matching a previous filter, hence why they are being filtered and ending up in a different folder. The filter for 'Citybank' will run, but nothing matches that filters parameters because the emails have already been filtered by a previous filter. So, which filter puts 'Citybank' and other emails in the that specific folder and then you will need to look closely at your filter to see why it is also filtering the 'Citybank ' emails. Without knowing how your filters are set up and the parameters contined in each filter, I can only make an educated guess that your filters are doing precisely what you have instructed them to do. It is just not what you desired. So recheck your filters.
This question has a 'Chosen Solution' which will not assist you.
Putting a comment in this particular question is sending an email to the person who created the question and they may not appreciate comments that have nothing to do with their issue. They may not be able to help you.
If you really need more help, then please create a new question thread and it will get more attention from the whole community.
Bewurke troch Toad-Hall op