Thunderbird Message Filters Parser and Printer
This is a small library which can parse msgFilterRules.dat
files from
Thunderbird, the free email application.
msgFilterRules.dat
contain so-called "Message Filters", which can be used to
automatically apply actions to inbound emails based on some pre-conditions.
Things like automatic tagging, labelling or moving emails to specific folders.
I personally make extensive use of message filters, but as the number of rules grows, I found the built-in interface to not be very convenient. Finding or editing rules can become a pain. So I decided to write a library which allows to manipulate these rules through a minimal and type-safe API.
The goal of the project is to allow developping more high-level tooling to read, transform, extend, update the rules while not having to worry about the low-level parsing details. It would also be possible to store the rules in a nicer format then use the library to produce the final file which can be consumed by Thunderbird.
Install the library:
npm install --save thunderbird-msg-filters
Then use (works both as a commonjs and es6 import):
; // A typical `msgFilterRules.dat` could contain this raw value.; // This will produce the exact same output as previous example.