From 4cfc54b4f2d2242890d1e2fd55fc1e21f0be5762 Mon Sep 17 00:00:00 2001 From: Nicolas Iooss Date: Tue, 20 Aug 2013 19:01:37 +0200 Subject: [PATCH] NL bounces: add another case to DSN filter Signed-off-by: Nicolas Iooss --- bin/newsletter.bounces.processor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/newsletter.bounces.processor.py b/bin/newsletter.bounces.processor.py index b17d945..7cb0d74 100755 --- a/bin/newsletter.bounces.processor.py +++ b/bin/newsletter.bounces.processor.py @@ -466,8 +466,8 @@ class DeliveryStatusNotificationFilter(MboxFilter): return True # Detect ill-formatted reports, sent as plain text email - if 'MAILER-DAEMON@' in message['From'].upper(): - email = findAddressInPlainBounce(message) + if 'MAILER-DAEMON@' in message['From'].upper() and report_message.get_content_type() == 'text/plain': + email = findAddressInPlainBounce(report_message) if email is not None: self.emails.append(email) self.mbox.add(message) -- 2.1.4