Hi Dirk-Jan.
>>>> I've been seeing mentions of this, and I'm curious becase mail
>>>> filtering is something I'd like to add here too. [...] I'm failing to
>>>> find the relevant workflow documentation, [...] So the question is:
>>>> how do you integrate mbsync/offlineimap with procmail/maildrop? Where
>>>> does they kick in to filter emails?
I searched "(procmail OR maildrop) (offlineimap OR mbsync)" and have all
the following 6 hits visited. No idea why I didn't visited that 1st
one... (maybe I shouldn't leave those things for the time when the rest
of the family is already asleep). ;)
> Basically, what you want is some program that gets mail (such as
> fetchmail) or even postfix/qmail etc. to not simply write the mail to
> local files, but instead pass them through a (procmail) scripts, which
> decides where to put the message file, or perhaps delete or transform
> it.
I'm learning as I go, so for the benefit of future newbies and system
ignorants as me, reading what seems at fist some slightly cryptic lines in
that article:
+ crontab is to execute syncemail repeatedly so that's not it.
+ .procmailrc are the processing rules, so that leaves...
+ ... syncemail as the relevant portion.
So syncemail gets the mail (offlineimap) and then each regular file in
the maildir newer than some timestamp (the one from $PROCMAILD/log?) is
passed through procmail (cat "$i" | procmail).
I assume that procmail then writes it again (or moves or modifies it)
depending on the defined rules.
I read about procmail and it seems that maildrop is newer and the rules
language is easier than procmail, but I assume it depends on how much
each person knows each tool. :)
Other related tools (probably not worth to try if maildrop works) are
afew (
https://github.com/teythoon/afew) that is done for notmuch but
seems independent from it, and procmail-py. Anyway, I'll start with
maildrop and continue from there as things develop.
Thank you very much.
Best...