Posted on Thu 26 July 2018
By all means, replace procmail with maildrop.
If you haven’t read a procmailrc in a few months, it’s so much line noise and you need to consult the man pages again.
If you haven’t read a maildrop recipe file, well – here’s a nearly maximum-complexity snippet:
xfilter "/usr/bin/spamc -U /var/lib/spamassassin/socket"
if (/^X-Spam-Status: Yes/)
{
to Maildir/spam/
}
`reformail -D 16000 duplicate.cache`
if ( $RETURNCODE == 0 )
exit
if (/^X-Facebook.*/:h)
to Maildir/facebook/
if (/^Subject: \[Slack\] Notifications.*/:h)
to Maildir/slack/
You now know how to do 90% of everything you’ll ever want your mailfilter to do, and debugging it next year will be simple.