Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Message filters running in the wrong order

  • 7 replies
  • 1 has this problem
  • 25 views
  • Last reply by Matt

more options

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?

Chosen solution

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.

Read this answer in context 👍 0

All Replies (7)

more options

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:
  • 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?

Oh, forgot to mention: this is on Mac.

Modified by fire.face.kitchengoblin74

Helpful?

more options

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.

Helpful?

more options

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!

Modified by fire.face.kitchengoblin74

Helpful?

more options

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.

Helpful?

more options

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

Helpful?

more options

Chosen Solution

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.

Helpful?

more options

Please file a bug report here https://bugzilla.mozilla.org/home

Product: Thunderbird Component: Filters

Helpful?

Ask a question

You must log in to your account to reply to posts. Please start a new question, if you do not have an account yet.