more logging improvements

This commit is contained in:
2024-01-10 16:14:08 +01:00
parent 4266cbb9d4
commit c3b672ec58
3 changed files with 11 additions and 5 deletions

View File

@@ -302,8 +302,8 @@ def release(cfg, args):
rcpts = quarantine.release(args.quarantine_id, args.recipient)
rcpts = ", ".join(rcpts)
logger.info(
f"{quarantine._storage.name}: released message with id {args.quarantine_id} "
f"for {rcpts}")
f"{quarantine._storage.name}: released message with id "
f"{args.quarantine_id} for {rcpts}")
def copy(cfg, args):

View File

@@ -190,6 +190,8 @@ class Conditions:
"vars does not match")
return False
logger.debug(f"vars matches, variable {self.var} is available")
if self.list is not None:
envfrom = milter.msginfo["mailfrom"]
envto = milter.msginfo["rcpts"]
@@ -203,4 +205,7 @@ class Conditions:
"list does not match")
return False
logger.debug(
"list matches envelope-from and envelope-to address")
return True

View File

@@ -36,6 +36,7 @@ import jsonschema
import logging
import re
class BaseConfig:
JSON_SCHEMA = {
"type": "object",