This commit is contained in:
Son Nguyen Kim 2021-09-13 19:50:15 +02:00
parent 106358da5f
commit e4ed192cce
2 changed files with 3 additions and 3 deletions

View file

@ -591,7 +591,7 @@ def get_orig_message_from_bounce(msg: Message) -> Message:
return part return part
def get_orig_message_from_outlook_complaint(msg: Message) -> Message: def get_orig_message_from_hotmail_complaint(msg: Message) -> Message:
i = 0 i = 0
for part in msg.walk(): for part in msg.walk():
i += 1 i += 1

View file

@ -117,7 +117,7 @@ from app.email_utils import (
sanitize_header, sanitize_header,
get_queue_id, get_queue_id,
should_ignore_bounce, should_ignore_bounce,
get_orig_message_from_outlook_complaint, get_orig_message_from_hotmail_complaint,
parse_full_address, parse_full_address,
get_orig_message_from_yahoo_complaint, get_orig_message_from_yahoo_complaint,
) )
@ -1306,7 +1306,7 @@ def handle_hotmail_complaint(msg: Message) -> bool:
Handle hotmail complaint sent to postmaster Handle hotmail complaint sent to postmaster
Return True if the complaint can be handled, False otherwise Return True if the complaint can be handled, False otherwise
""" """
orig_msg = get_orig_message_from_outlook_complaint(msg) orig_msg = get_orig_message_from_hotmail_complaint(msg)
to_header = orig_msg["To"] to_header = orig_msg["To"]
if not to_header: if not to_header:
LOG.e("cannot find the alias") LOG.e("cannot find the alias")