aboutsummaryrefslogtreecommitdiffstats
path: root/mailrules.py
AgeCommit message (Collapse)AuthorFilesLines
14 daysfeat(rules): save atomically, preserving unknown fieldsDanilo M.1-0/+54
Write to a temp file and rename, so the hook can never read a partial file. Fields this version does not understand round-trip untouched, which is what makes the format belong to neither tool.
14 daysfeat(rules): order rules by stage, ties by file positionDanilo M.1-0/+11
Account tags must run before topic rules, which is what the stage field is for. Disabled rules stay loaded so a UI can re-enable them.
14 daysfeat(rules): drop a malformed rule rather than the whole fileDanilo M.1-13/+95
One typo must not stop the other rules from tagging. A missing file and a file that will not parse are tracked separately: the hook may run on the first and must refuse on the second.
14 daysfeat(rules): load a shared tagging-rule storeDanilo M.1-0/+95
The rules that tag incoming mail live in a notmuch post-new hook as hand-written shell. This is the first piece of moving them into a JSON store that both this tool and qtmaildir read. A rule carries no scope: the hook supplies tag:new, a dry run supplies nothing. Unknown fields are kept per rule so the format belongs to neither tool.