add delrcpt

This commit is contained in:
2021-09-21 00:55:54 +02:00
parent f4f26f08fd
commit 6333a0913d
2 changed files with 11 additions and 1 deletions

View File

@@ -192,6 +192,15 @@ class ModifyMilter(Milter.Base):
def replacebody(self):
self._replacebody = True
def delrcpt(self, rcpts):
"Remove recipient. May be called from eom callback only."
if not isinstance(rcpts, list):
rcpts = [rcpts]
for rcpt in rcpts:
self.logger.debug(f"delrcpt: {rcpt}")
self.msginfo["rcpts"].remove(rcpt)
super().delrcpt(rcpt)
def connect(self, IPname, family, hostaddr):
try:
if hostaddr is None: