sieve-generator

This is a CLI used to generate .sieve email filter allowlist for different folders based on the receiver email address, configured with a JSON file. I have a catch-all email domain and use it automates the allowlist creating process whenever I use a new email. (e.g. something@domain.com filtered to something folder)

Usage

Let say we have JSON config file like this

{ "domain.com": { "options": { // global options // if every folder should be a sub-folder of a domain named folder "domain-as-first-folder": false, }, "Newsletter": { "Software": ["google", "facebook"], "Business": "wallstreet" }, "Utilities": { "self": ["electricity"], "Grocery": { "localparts": "market", // if title or sender contains keyword then go to label // by default every labeled mail will not be marked read // even if silent is set "labels": { "label": "keyword", "label2": ["keyword2"] }, "options": { // the generic filter here will be grocery.secret and // not utilities.grocery.secret "orphan": true, // mark all email of this folder as read "silent": true, // not generate generic filter for this folder "generic": false } } } } }

A .sieve filter allowlist will be generated in which