Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

为提升您的使用体验,本站正在维护,部分功能暂时无法使用。如果本站文章无法解决您的问题,您想要向社区提问的话,请到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 提问,我们的支持社区将会很快回复您的疑问。

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

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)"

所有回复 (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

由Adam Reece | WebBox于修改