Way back in 2014, I wrote about my two stage mail filter system. At the time, I had to use a helper program called deliver-to-maildir
in order to get my read messages correctly delivered as seen, rather than new.
In the intervening time, Sam Varshavchik, the primary programmer of Courier and maildrop, made some improvements. The really useful one is this:
if (/^To:.*school@domain.edu/:h)
to "| /usr/local/bin/deliver-to-maildir seen $HOME/Maildir/.school/"
can now be handled like this:
FLAGS="S"
if (/^To:.*school@domain.edu/:h)
to $HOME/Maildir/.school/
Much cleaner, and you can either set FLAGS once at the top of your mailfilter or inside a scope just before your to
delivery.