fix body injection and exit if no recipients left
This commit is contained in:
@@ -135,12 +135,9 @@ class MilterMessage(MIMEPart):
|
|||||||
else:
|
else:
|
||||||
parent.make_mixed()
|
parent.make_mixed()
|
||||||
maintype, subtype = ("multipart", "mixed")
|
maintype, subtype = ("multipart", "mixed")
|
||||||
elif subtype == "related":
|
|
||||||
parent.make_alternative()
|
|
||||||
maintype, subtype = ("multipart", "alternative")
|
|
||||||
|
|
||||||
text_body = parent.get_body(preferencelist=("plain"))
|
text_body = parent.get_body(preferencelist=("plain"))
|
||||||
html_body = parent.get_body(preferencelist=("related", "html"))
|
html_body = parent.get_body(preferencelist=("html"))
|
||||||
|
|
||||||
if text_content is not None:
|
if text_content is not None:
|
||||||
if text_body:
|
if text_body:
|
||||||
|
|||||||
@@ -563,6 +563,7 @@ class Quarantine:
|
|||||||
|
|
||||||
if self._milter_action is not None:
|
if self._milter_action is not None:
|
||||||
milter.delrcpt(rcpts)
|
milter.delrcpt(rcpts)
|
||||||
if self._milter_action in ["ACCEPT", "REJECT"] and \
|
#if self._milter_action in ["ACCEPT", "REJECT"] and \
|
||||||
not milter.msginfo["rcpts"]:
|
# not milter.msginfo["rcpts"]:
|
||||||
|
if not milter.msginfo["rcpts"]:
|
||||||
return (self._milter_action, self._reason)
|
return (self._milter_action, self._reason)
|
||||||
|
|||||||
Reference in New Issue
Block a user