updated rspamd config

This commit is contained in:
Spitap
2023-06-21 16:04:38 +02:00
committed by Antoine Nguyen
parent 69a8f08246
commit 46bbb1039b
9 changed files with 74 additions and 11 deletions

View File

@@ -103,8 +103,18 @@ class Postfix(base.Installer):
utils.exec_cmd("postalias {}".format(aliases_file))
# Postwhite
install("postwhite", self.config, self.upgrade, self.archive_path)
condition = (
not self.config.getboolean("rspamd", "enabled") and
self.config.getboolean("postwhite", "enabled")
)
if condition:
install("postwhite", self.config, self.upgrade, self.archive_path)
def backup(self, path):
"""Launch postwhite backup."""
backup("postwhite", self.config, path)
condition = (
not self.config.getboolean("rspamd", "enabled") and
self.config.getboolean("postwhite", "enabled")
)
if condition:
backup("postwhite", self.config, path)