From 44601962cab569b08b0dfd1247923639427af936 Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 21 Aug 2020 10:29:48 +0200 Subject: [PATCH] Better sieve filters and lmtp support, auto nuke trash --- templates/default.sieve.j2 | 11 ++++-- templates/dovecot.conf.j2 | 77 +++++++++++++++++++++++++++++--------- 2 files changed, 68 insertions(+), 20 deletions(-) diff --git a/templates/default.sieve.j2 b/templates/default.sieve.j2 index 5818861..4802083 100644 --- a/templates/default.sieve.j2 +++ b/templates/default.sieve.j2 @@ -1,5 +1,10 @@ -require ["fileinto", "mailbox"]; -if header :contains "X-Spam-Flag" "YES" +require ["fileinto","mailbox"]; +if anyof( + header :contains ["X-Spam-Flag"] "YES", + header :contains ["X-Spam-Status"] "spam", + header :contains ["X-Spam"] "Yes", + header :contains ["Subject"] "*** SPAM ***" + ) { - fileinto "Junk"; + fileinto :create "Junk"; } diff --git a/templates/dovecot.conf.j2 b/templates/dovecot.conf.j2 index 029c364..6effc67 100644 --- a/templates/dovecot.conf.j2 +++ b/templates/dovecot.conf.j2 @@ -101,6 +101,8 @@ dict { # it's not found: !include_try local.conf +protocols = imap lmtp + ssl = required ssl_cert =