aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMark Sapiro <mark@msapiro.net>2018-11-28 12:03:48 -0800
committerMark Sapiro <mark@msapiro.net>2018-11-28 12:03:48 -0800
commitd03507def644416adf753098173220be6f75c137 (patch)
treeeebbc55005d36568469a1f43103e08ed43978fb5 /tests
parent377a75049a8b1bccf352e1347e2c4a02e7dd6170 (diff)
downloadmailman2-d03507def644416adf753098173220be6f75c137.tar.gz
mailman2-d03507def644416adf753098173220be6f75c137.tar.xz
mailman2-d03507def644416adf753098173220be6f75c137.zip
Added recognition for non-compliant opensmtpd DSN Action: error.
Diffstat (limited to 'tests')
-rw-r--r--tests/bounces/dsn_18.txt52
-rw-r--r--tests/test_bounces.py1
2 files changed, 53 insertions, 0 deletions
diff --git a/tests/bounces/dsn_18.txt b/tests/bounces/dsn_18.txt
new file mode 100644
index 00000000..f2988895
--- /dev/null
+++ b/tests/bounces/dsn_18.txt
@@ -0,0 +1,52 @@
+Return-Path: <>
+X-Original-To: list.name-bounces@domain.replaced
+Delivered-To: list.name-bounces@domain.replaced
+Received: from mx.domain.replaced (mx.domain.replaced [177.XXX.XXX.XXX])
+ by mailhost.domain.replaced (Postfix) with ESMTP id 6D6C71E8A3
+ for <list.name-bounces@domain.replaced>; Thu, 22 Nov 2018 17:56:08 -0200 (BRST)
+Received: from mx.domain.replaced (mx.domain.replaced [local])
+ by mx.domain.replaced (OpenSMTPD) with ESMTPA id cce9bd49
+ for <list.name-bounces@domain.replaced>;
+ Thu, 22 Nov 2018 17:56:08 -0200 (-02)
+Subject: Delivery status notification: error
+From: Mailer Daemon <MAILER-DAEMON@mx.domain.replaced>
+To: list.name-bounces@domain.replaced
+Date: Thu, 22 Nov 2018 17:56:08 -0200 (-02)
+MIME-Version: 1.0
+Content-Type: multipart/mixed;boundary="9950749020440539406/mx.domain.replaced"
+Message-ID: <f778c4a058120b20@mx.domain.replaced>
+
+This is a MIME-encapsulated message.
+
+--9950749020440539406/mx.domain.replaced
+Content-Description: Notification
+Content-Type: text/plain; charset=us-ascii
+
+ Hi!
+
+ This is the MAILER-DAEMON, please DO NOT REPLY to this email.
+
+ An error has occurred while attempting to deliver a message for
+ the following list of recipients:
+
+email@replaced.net: Domain does not exist
+
+ Below is a copy of the original message:
+
+--9950749020440539406/mx.domain.replaced
+Content-Description: Delivery Report
+Content-Type: message/delivery-status
+
+Reporting-MTA: dns; mx.domain.replaced
+
+Final-Recipient: rfc822; email@replaced.net
+Action: error
+Status: 5.0.0
+
+--9950749020440539406/mx.domain.replaced
+Content-Description: Message headers
+Content-Type: text/rfc822-headers
+
+[ORIGINAL MESSAGE]
+
+--9950749020440539406/mx.domain.replaced--
diff --git a/tests/test_bounces.py b/tests/test_bounces.py
index e9bcff17..2f814428 100644
--- a/tests/test_bounces.py
+++ b/tests/test_bounces.py
@@ -122,6 +122,7 @@ class BounceTest(unittest.TestCase):
('DSN', 'dsn_15.txt', ['userx@example.com']),
('DSN', 'dsn_16.txt', ['userx@example.com']),
('DSN', 'dsn_17.txt', Stop),
+ ('DSN', 'dsn_18.txt', ['email@replaced.net']),
# Microsoft Exchange
('Exchange', 'microsoft_01.txt', ['userx@example.COM']),
('Exchange', 'microsoft_02.txt', ['userx@example.COM']),