Skip to content

Commit 225e997

Browse files
committed
update
1 parent cbb7692 commit 225e997

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Mailman/Queue/IncomingRunner.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,10 @@ def _is_bounce(self, msg):
305305
if msg.get('content-type', '').startswith('multipart/report'):
306306
return True
307307
# Check for common bounce subjects
308-
subject = msg.get('subject', '').lower()
308+
subject = msg.get('subject', '')
309+
if isinstance(subject, email.header.Header):
310+
subject = str(subject)
311+
subject = subject.lower()
309312
bounce_subjects = ['delivery status', 'failure notice', 'mail delivery failed',
310313
'mail delivery system', 'mail system error', 'returned mail',
311314
'undeliverable', 'undelivered mail']

0 commit comments

Comments
 (0)