add whitelist functionality to quarantine

This commit is contained in:
2021-09-21 05:20:47 +02:00
parent f4bc545f9b
commit f4bb0d38eb
5 changed files with 354 additions and 3 deletions

View File

@@ -188,6 +188,14 @@ class ActionConfig(BaseConfig):
if "reject_reason" in cfg:
self.add_string_arg(cfg, "reject_reason")
if "whitelist" in cfg:
wl = {"whitelist": cfg["whitelist"]}
wl["name"] = f"{self.name}: whitelist"
if "loglevel" not in wl:
wl["loglevel"] = self.loglevel
self.args["whitelist"] = ConditionsConfig(
wl, self.local_addrs, self.debug)
class Action:
"""Action to implement a pre-configured action to perform on e-mails."""