
Documentation for Mozilla Thunderbird message filters
I am running 64-bit Thunderbird Supernova (115.5.0) on Windows 7 Home Premium with SP1.
I am working on my own set of tools to manage the message filters in the "msgFilterRules.dat" file and I am looking for documentation on how the message filters are constructed and what values can appear/be used within them.
I have tried searching around the internet for this but have not been able to find anything like what I was looking for - can anyone here help point me in the right direction please?
Chosen solution
Try the source https://searchfox.org/comm-central/source/mailnews/search/src/nsMsgFilter.cpp
I have never seen any real documentation of even how it is supposed to work.
Read this answer in context 👍 1All Replies (6)
See if this helps. https://support.mozilla.org/en-US/kb/organize-your-messages-using-filters
Hi Chris,
Thank you for that link - that's a good start, and it's led me to some more questions based on what I've picked up from studying the "msgFilterRules.dat" file, specifically as to whether any documentation exists that would help me with parts of a message filter.
I'll quote an example from my own "msgFilterRules.dat" file with some names changed for privacy protection (please note that I do have the "quickFilters" and "FiltaQuilla" extensions installed so I do have access so some additional actions/options):
- Apply when: Manually Run, Getting New Mail (Filter Before Junk Classification)
- Match all of the following:
- From contains ACME Inc
- Actions:
- Mark As Read
- Save Message As File: ACME Inc on file system
- Move Message To: ACME Inc on Local Folders
Now when I look at my "msgFilterRules.dat" file, I see this rule stored as follows:
- name="ACME Inc"
- enabled="yes"
- type="17"
- action="Mark read"
- action="Custom"
- customId="filtaquilla@mesquilla.com#saveMessageAsFile"
- actionValue="ACME Inc on file system"
- action="Move to folder"
- actionValue="mailbox://nobody@Local%20Folders/ACME%20Inc"
- condition="AND (from,contains,ACME Inc)"
Some of these are obvious than others: but I'm wondering if the possible values for the "type", "action", "actionValue" and "condition" entries are documented anywhere? Or would it benefit me to join the development volunteers and get access to Thunderbird's source code so I can find it for myself?
Many thanks in advance,
Richard
Chosen Solution
Try the source https://searchfox.org/comm-central/source/mailnews/search/src/nsMsgFilter.cpp
I have never seen any real documentation of even how it is supposed to work.
Hi Matt - thank you, that looks like it's what I need and I can study that at my leisure - that will give me something to do during the winter evenings :)
Mr. Watt, have you made progress on this conundrum? I've looked at the source but it is definitely Koine to me. I'm mainly trying to figure out the significance and meaning of Type= in msgfilterrules.dat. In my list of filters I have mostlly 17s and 48s, a few 49s, and one each of 273 and 304.
Whoops! My blunder. Found answer here. https://support.mozilla.org/en-US/questions/1417807