From: Nicolas Iooss Date: Tue, 20 Aug 2013 17:01:37 +0000 (+0200) Subject: NL bounces: add another case to DSN filter X-Git-Tag: xorg/1.1.9~10 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=4cfc54b4f2d2242890d1e2fd55fc1e21f0be5762;p=platal.git NL bounces: add another case to DSN filter Signed-off-by: Nicolas Iooss --- 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)