Spam filtering
Some mailing-lists tend to be more spammy than others. If we put a filter before they are handled by the rest of the script, we can fish for bad guys before they get filed.
#selective spam filter if allof (envelope :matches :domain "From" ["*debian.org","*kernel.org","*icinga.org","*mutt.org","*nginx.org"], header :contains "X-My-Unique-Spam-Flag" "Yes") { fileinto "Spam"; stop; }
Flag important mails
File mails automatically, but also send a copy to the inbox and flag them as we don’t want to miss any of these.
if header :contains "List-Id" "debian-security-announce.lists.debian.org" { removeflag "\\Flagged $MailFlagBit1"; fileinto ":public/Newsletters/Debian/Security"; addflag "\\Flagged $MailFlagBit1"; keep; }