Made junk sieve optional

This commit is contained in:
Spitfireap
2024-01-12 18:38:18 +01:00
committed by Antoine Nguyen
parent e73d318e14
commit 86481417cf
2 changed files with 4 additions and 3 deletions

View File

@@ -78,7 +78,7 @@ class Dovecot(base.Installer):
def get_template_context(self):
"""Additional variables."""
context = super(Dovecot, self).get_template_context()
context = super().get_template_context()
pw_mailbox = pwd.getpwnam(self.mailboxes_owner)
dovecot_package = {"deb": "dovecot-core", "rpm": "dovecot"}
ssl_protocol_parameter = "ssl_protocols"
@@ -120,7 +120,8 @@ class Dovecot(base.Installer):
"ssl_protocols": ssl_protocols,
"ssl_protocol_parameter": ssl_protocol_parameter,
"modoboa_2_2_or_greater": "" if self.modoboa_2_2_or_greater else "#",
"not_modoboa_2_2_or_greater": "" if not self.modoboa_2_2_or_greater else "#"
"not_modoboa_2_2_or_greater": "" if not self.modoboa_2_2_or_greater else "#",
"do_move_spam_to_junk": "" if self.app_config["move_spam_to_junk"] else "#"
})
return context

View File

@@ -38,7 +38,7 @@ plugin {
# Identical to sieve_before, only the specified scripts are executed after the
# user's script (only when keep is still in effect!). Multiple script file or
# directory paths can be specified by appending an increasing number.
{%dovecot_enabled}sieve_after = /etc/dovecot/conf.d/custom_after_sieve
%{do_move_spam_to_junk}sieve_after = /etc/dovecot/conf.d/custom_after_sieve
#sieve_after2 =
#sieve_after2 = (etc...)