I am trying to understand the parts of the above file.
"Type" is there a list of these something between 1 and 7 and maybe beyond?
"Action" reasonably straightforward.
"Action Value" here is where we need information, such as limitation to either AND/OR maybe a mix is permissible. Bracket precedence.
"Condition" what limitations and inclusions
Source documentation is very sparse on searching the web.
Any references would be appreciated
Chris
PS just do not say wrong place without explicitly stating where to post this if incorrect. you may well fell this is the wrong place but is no help if you also do not know where to post this we are not all so smart as you.
Dissecting filters in msgfilterrules.dat
-
- Posts: 6
- Joined: October 2nd, 2013, 4:23 am
- Location: London
-
- Posts: 6432
- Joined: February 3rd, 2009, 6:29 pm
Re: Dissecting filters in msgfilterrules.dat
All possible action values aren't documented in a single file. You would have to look them up in the source.
type="1" i.e. Getting New Mail and Filter before Junk Classification (see nsMsgFilterType in nsMsgFilterCore.idl)
action="AddTag" i.e. Tag Message
actionValue="$label1" i.e. Important
Reference
http://searchfox.org/comm-esr91/source/ ... erCore.idl
http://searchfox.org/comm-esr91/search? ... properties
Message Filters
http://kb.mozillazine.org/Message_Filters
type="1" i.e. Getting New Mail and Filter before Junk Classification (see nsMsgFilterType in nsMsgFilterCore.idl)
action="AddTag" i.e. Tag Message
actionValue="$label1" i.e. Important
Code: Select all
Components.interfaces.nsMsgFilterType.InboxRule; // 1
Code: Select all
MailServices.tags.getAllTags()[0].key; // $label1
MailServices.tags.getAllTags()[0].tag; // Important
MailServices.tags.getAllTags()[1].key; // $label2
MailServices.tags.getAllTags()[1].tag; // Work
MailServices.tags.getAllTags()[2].key; // $label3
MailServices.tags.getAllTags()[2].tag; // Personal
http://searchfox.org/comm-esr91/source/ ... erCore.idl
http://searchfox.org/comm-esr91/search? ... properties
Message Filters
http://kb.mozillazine.org/Message_Filters
-
- Posts: 6
- Joined: October 2nd, 2013, 4:23 am
- Location: London
Re: Dissecting filters in msgfilterrules.dat
Thank you for your information I will go away and digest
-
- Posts: 6432
- Joined: February 3rd, 2009, 6:29 pm
Re: Dissecting filters in msgfilterrules.dat
I read that you shouldn't create a condition rule mixed with "AND" and "OR".
http://bugzilla.mozilla.org/show_bug.cgi?id=1312172#c10
Also, I read that the filter engine is capable of processing arbitrarily complex boolean expressions.
Bug 297852
http://bugzilla.mozilla.org/show_bug.cgi?id=297852
More info: http://forums.mozillazine.org/viewtopic ... &t=3046341
Bug 1312172 Comment 10aceman wrote:The proper format of a filter must always have either all operators being AND or all of them being OR.
http://bugzilla.mozilla.org/show_bug.cgi?id=1312172#c10
Also, I read that the filter engine is capable of processing arbitrarily complex boolean expressions.
Bug 297852
http://bugzilla.mozilla.org/show_bug.cgi?id=297852
More info: http://forums.mozillazine.org/viewtopic ... &t=3046341