improve conditions handling

This commit is contained in:
2021-09-14 01:36:32 +02:00
parent ef025d758c
commit e34e85af6b
4 changed files with 70 additions and 77 deletions

View File

@@ -194,9 +194,6 @@ class Action:
logger = CustomLogger(
self.logger, {"qid": milter.qid, "name": self._name})
if self.conditions is None or \
self.conditions.match(envfrom=milter.mailfrom,
envto=[*milter.rcpts],
headers=milter.msg.items(),
qid=milter.qid):
self.conditions.match(milter):
return self._class.execute(
milter=milter, pretend=self.pretend, logger=logger)