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

Filters executing in the wrong order, but only when running automatically (not manual force)

more options

Hello,

I have a subset of message rules which do not appear to execute in the right order, or the function to stop filter execution once a rule is met is not happening. This only happens when filters run automatically for new messages. Filters execute as expected when doing so manually either via "Tools > Run Filters on Folder" or in the filters management UI.

I saw a related issue: https://support.mozilla.org/en-US/questions/1299994 However this turned out to be a GUI bug whereby the message filters data file had `enabled="no"` but the GUI showing all filters were enabled. That is not the case for me.

I've included a subset of the "msgFilterRules.dat" involved at the end. You'll find a collection of rules to move messages to various sub-folders within a "Servers" folder, along with a final rule to put messages in the "Servers" folder itself. The intention here is that the more fine grained subfolder rules should be matched first, and if matched, don't look any further.

What happens is when messages arrive in my inbox the final rule is the one that seems to get the say. (E.g. messages with reply-to being "cpanel@" end up in the main "Servers" folder instead of "Servers/cPanel" folder. However after this first move, if I select the main "Servers" folder then do "Tools > Run Filters on Folder" the rule for cPanel messages works as expected. This would either be because the final rule won't match because Thunderbird thinks its already fulfilled, or the function to stop filter execution just doesn't work.

Is this a bug or have I just got rules defined incorrectly for the intention?

    1. msgFilterRules.dat

name="Servers: cPanel" enabled="yes" type="17" action="Move to folder" actionValue="imap://adam%40example.com@imap.example.com/Servers/cPanel" action="Stop execution" condition="AND (\"reply-to\",contains,cpanel@) AND (to,is,server@example.com)" name="Servers: Firewall" enabled="yes" type="17" action="Move to folder" actionValue="imap://adam%40example.com@imap.example.com/Servers/Firewall" action="Stop execution" condition="AND (subject,begins with,lfd on) AND (to,is,server@example.com)" name="Servers: Hosting accounts (LVM)" enabled="yes" type="17" action="Move to folder" actionValue="imap://adam%40example.com@imap.example.com/Servers/Hosting Accounts" action="Stop execution" condition="OR (subject,begins with,Hosting account resources exceeded) AND (to,is,server@example.com)" name="Servers: Logwatch" enabled="yes" type="17" action="Move to folder" actionValue="imap://adam%40example.com@imap.example.com/Servers/Logwatch" action="Stop execution" condition="AND (subject,begins with,Logwatch for) AND (to,contains,server@example.com)" name="Servers: Pinger" enabled="yes" type="17" action="Move to folder" actionValue="imap://adam%40example.com@imap.example.com/Servers/Pinger" action="Stop execution" condition="OR (to,is,pinger@example.com) OR (\"reply-to\",is,pinger@example.com)" name="Servers: Webmin" enabled="yes" type="17" action="Move to folder" actionValue="imap://adam%40example.com@imap.example.com/Servers/Webmin" action="Stop execution" condition="AND (\"reply-to\",contains,webmin@) AND (to,is,server@example.com)" name="Servers" enabled="yes" type="17" action="Move to folder" actionValue="imap://adam%40example.com@imap.example.com/Servers" action="Stop execution" condition="OR (to,is,server@example.com) OR (from,is,server@example.com)"

Hello, I have a subset of message rules which do not appear to execute in the right order, or the function to stop filter execution once a rule is met is not happening. This only happens when filters run automatically for new messages. Filters execute as expected when doing so manually either via "Tools > Run Filters on Folder" or in the filters management UI. I saw a related issue: https://support.mozilla.org/en-US/questions/1299994 However this turned out to be a GUI bug whereby the message filters data file had `enabled="no"` but the GUI showing all filters were enabled. That is not the case for me. I've included a subset of the "msgFilterRules.dat" involved at the end. You'll find a collection of rules to move messages to various sub-folders within a "Servers" folder, along with a final rule to put messages in the "Servers" folder itself. The intention here is that the more fine grained subfolder rules should be matched first, and if matched, don't look any further. What happens is when messages arrive in my inbox the final rule is the one that seems to get the say. (E.g. messages with reply-to being "cpanel@" end up in the main "Servers" folder instead of "Servers/cPanel" folder. However after this first move, if I select the main "Servers" folder then do "Tools > Run Filters on Folder" the rule for cPanel messages works as expected. This would either be because the final rule won't match because Thunderbird thinks its already fulfilled, or the function to stop filter execution just doesn't work. Is this a bug or have I just got rules defined incorrectly for the intention? ## msgFilterRules.dat name="Servers: cPanel" enabled="yes" type="17" action="Move to folder" actionValue="imap://adam%40example.com@imap.example.com/Servers/cPanel" action="Stop execution" condition="AND (\"reply-to\",contains,cpanel@) AND (to,is,server@example.com)" name="Servers: Firewall" enabled="yes" type="17" action="Move to folder" actionValue="imap://adam%40example.com@imap.example.com/Servers/Firewall" action="Stop execution" condition="AND (subject,begins with,lfd on) AND (to,is,server@example.com)" name="Servers: Hosting accounts (LVM)" enabled="yes" type="17" action="Move to folder" actionValue="imap://adam%40example.com@imap.example.com/Servers/Hosting Accounts" action="Stop execution" condition="OR (subject,begins with,Hosting account resources exceeded) AND (to,is,server@example.com)" name="Servers: Logwatch" enabled="yes" type="17" action="Move to folder" actionValue="imap://adam%40example.com@imap.example.com/Servers/Logwatch" action="Stop execution" condition="AND (subject,begins with,Logwatch for) AND (to,contains,server@example.com)" name="Servers: Pinger" enabled="yes" type="17" action="Move to folder" actionValue="imap://adam%40example.com@imap.example.com/Servers/Pinger" action="Stop execution" condition="OR (to,is,pinger@example.com) OR (\"reply-to\",is,pinger@example.com)" name="Servers: Webmin" enabled="yes" type="17" action="Move to folder" actionValue="imap://adam%40example.com@imap.example.com/Servers/Webmin" action="Stop execution" condition="AND (\"reply-to\",contains,webmin@) AND (to,is,server@example.com)" name="Servers" enabled="yes" type="17" action="Move to folder" actionValue="imap://adam%40example.com@imap.example.com/Servers" action="Stop execution" condition="OR (to,is,server@example.com) OR (from,is,server@example.com)"

All Replies (2)

more options

the stopping of execution only applies to that filter, not the ones that follow it or proceed it.

more options

Hi Matt,

That would explain it. Kind of makes the action pointless to have at the end of a filter set. Given that the filers UI doesn't let you rearrange actions without removing/re-adding them that just adds to the confusion of the UI.

I take it there isn't an option to stop all filter execution once a particular rule is matched? The generic catch rule at the end is there to stop messages being moved twice (what with Gmail over IMAP being very slow).

Possibly related: https://support.mozilla.org/en-US/questions/1034337

Modified by Adam Reece | WebBox