From d03507def644416adf753098173220be6f75c137 Mon Sep 17 00:00:00 2001 From: Mark Sapiro Date: Wed, 28 Nov 2018 12:03:48 -0800 Subject: Added recognition for non-compliant opensmtpd DSN Action: error. --- tests/bounces/dsn_18.txt | 52 ++++++++++++++++++++++++++++++++++++++++++++++++ tests/test_bounces.py | 1 + 2 files changed, 53 insertions(+) create mode 100644 tests/bounces/dsn_18.txt (limited to 'tests') 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 ; 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 ; + Thu, 22 Nov 2018 17:56:08 -0200 (-02) +Subject: Delivery status notification: error +From: Mailer Daemon +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: + +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']), -- cgit v1.2.3