On 30Sep2020 12:44, raf <[email protected]> wrote:
>On Wed, Sep 30, 2020 at 11:38:06AM +1000, Cameron Simpson <[email protected]>
>wrote:
>> I dropped procmail years ago too, [...]
>
>I didn't drop procmail. I wrote a program to
>generate procmail code from a set of prettier
>config files. :-)
Oh, so did I. Look up cats2procmailrc, which takes rules much like what
I showed above:
https://hg.sr.ht/~cameron-simpson/css/browse/bin/cats2procmailrc?rev=tip
but procmail is slow, too, and I didn't like its model. So later I wrote
a filer of my own, as also has Chris Green.
Re procmail, aside from my misgivings about its model, I was also not
happy with the fact that it just applies regexps to headers, which is
very error prone (yes, my paranoia levels are higher than yours:-) Also,
it reads the rules afresh for every delivery.
These days I use my own filer which runs as a daemon: it reads the rules
just once (including compiling any regexps), and rereads them if I edit
them. The main script is here:
https://hg.sr.ht/~cameron-simpson/css/browse/bin/mailfiler?rev=tip
which invokes this Python module:
https://hg.sr.ht/~cameron-simpson/css/browse/lib/python/cs/app/mailfiler.py?rev=tip
It just watches a Maildir for new messages and applies rules.
Cheers,
Cameron Simpson <[email protected]>
The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all progress
depends on the unreasonable man. - George Bernard Shaw