some more fixes
This commit is contained in:
@@ -197,7 +197,8 @@ class StoreConfig(BaseConfig):
|
||||
"directory": {"type": "string"},
|
||||
"mode": {"type": "string"},
|
||||
"metavar": {"type": "string"},
|
||||
"original": {"type": "boolean", "default": True}}}}
|
||||
"metadata": {"type": "boolean", "default": False},
|
||||
"original": {"type": "boolean", "default": False}}}}
|
||||
|
||||
|
||||
class NotifyConfig(BaseConfig):
|
||||
@@ -245,6 +246,8 @@ class QuarantineConfig(BaseConfig):
|
||||
def __init__(self, config, rec=True):
|
||||
super().__init__(config)
|
||||
if rec:
|
||||
if "metadata" not in self["store"]:
|
||||
self["store"]["metadata"] = True
|
||||
self["store"] = StoreConfig(self["store"])
|
||||
if "notify" in self:
|
||||
self["notify"] = NotifyConfig(self["notify"])
|
||||
|
||||
@@ -266,7 +266,7 @@ class EMailNotification(BaseNotification):
|
||||
variables["ENVELOPE_TO_URL"] = escape(quote(recipient))
|
||||
for field in ["from", "to", "subject"]:
|
||||
value = msg[field]
|
||||
if not value:
|
||||
if value is None:
|
||||
continue
|
||||
variables[field.upper()] = escape(value, quote=False)
|
||||
|
||||
|
||||
@@ -362,7 +362,6 @@ class Quarantine:
|
||||
"pretend": cfg["pretend"],
|
||||
"type": "store",
|
||||
"args": cfg["args"]["store"].get_config()})
|
||||
storage_cfg["args"]["metadata"] = True
|
||||
self._storage = Store(storage_cfg, local_addrs, debug)
|
||||
|
||||
self.smtp_host = cfg["args"]["smtp_host"]
|
||||
|
||||
Reference in New Issue
Block a user