ignore hotmail bounce that uses 'Undisclosed recipients:;' in :To header

This commit is contained in:
Son 2021-10-25 10:36:50 +02:00
parent 9299904fc9
commit de0f838950
1 changed files with 7 additions and 1 deletions

View File

@ -1373,7 +1373,13 @@ def handle_hotmail_complaint(msg: Message) -> bool:
LOG.e("cannot find the alias")
return False
_, alias_address = parse_full_address(get_header_unicode(to_header))
try:
_, alias_address = parse_full_address(get_header_unicode(to_header))
except ValueError:
# to_header can be something like 'Undisclosed recipients:;'
LOG.w("cannot parse %s", to_header)
return False
alias = Alias.get_by(email=alias_address)
if not alias: