CC: | michael.stevens [...] dianomi.com,michael.smith [...] dianomi.com |
Subject: | Another unknown user case |
Another new unknown user case.
Diff in gitorious at: http://gitorious.org/mail-deliverystatus-
bounceparser-fork/mail-deliverystatus-bounceparser-
fork/commit/56b219ed9770f20b0f864cfbd5967028d41df183
Also attached raw patch.
Subject: | bad-rcptto-patch.txt |
From 56b219ed9770f20b0f864cfbd5967028d41df183 Mon Sep 17 00:00:00 2001
From: Michael Stevens <mstevens@etla.org>
Date: Mon, 29 Nov 2010 18:18:30 +0000
Subject: [PATCH] Another unknown user case.
---
MANIFEST | 1 +
lib/Mail/DeliveryStatus/BounceParser.pm | 3 +-
t/corpus/badrcptto.msg | 98 +++++++++++++++++++++++++++++++
t/various-unknown.t | 6 ++-
4 files changed, 106 insertions(+), 2 deletions(-)
create mode 100644 t/corpus/badrcptto.msg
diff --git a/MANIFEST b/MANIFEST
index 79c47e8..94c6310 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -23,6 +23,7 @@ t/corpus/aol.attachment.msg
t/corpus/aol.unknown.msg
t/corpus/aol-vacation.msg
t/corpus/att-via-sendmail.unknown.msg
+t/corpus/badrcptto.msg
t/corpus/bluebottle.msg
t/corpus/boxbe-cr.msg
t/corpus/comcast-via-sendmail.unknown.msg
diff --git a/lib/Mail/DeliveryStatus/BounceParser.pm b/lib/Mail/DeliveryStatus/BounceParser.pm
index b50740f..78a24de 100644
--- a/lib/Mail/DeliveryStatus/BounceParser.pm
+++ b/lib/Mail/DeliveryStatus/BounceParser.pm
@@ -978,7 +978,8 @@ sub _std_reason {
/Mailbox\s+not\s+available/i or
/No\s+mailbox\s+found/i or
/<?$EMAIL_ADDR_REGEX>?\s+is\s+a\s+deactivated\s+mailbox/i or
- /Recipient\s+does\s+not\s+exist\s+on\s+this\s+system/i
+ /Recipient\s+does\s+not\s+exist\s+on\s+this\s+system/i or
+ /user\s+mail-box\s+not\s+found/i
) {
return "user_unknown";
}
diff --git a/t/corpus/badrcptto.msg b/t/corpus/badrcptto.msg
new file mode 100644
index 0000000..475df90
--- /dev/null
+++ b/t/corpus/badrcptto.msg
@@ -0,0 +1,98 @@
+Delivered-To: automated-bounces+9e191844-f321-11df-8cdf-952520ff6b44@email.example2.com
+Received: by 10.216.139.130 with SMTP id c2cs76443wej;
+ Thu, 18 Nov 2010 07:46:33 -0800 (PST)
+Received: by 10.227.134.206 with SMTP id k14mr824730wbt.160.1290095193100;
+ Thu, 18 Nov 2010 07:46:33 -0800 (PST)
+Return-Path: <>
+Received: from server4.example2.co.uk (server4.example2.co.uk [94.236.45.212])
+ by mx.google.com with ESMTP id y43si894253weq.30.2010.11.18.07.46.32;
+ Thu, 18 Nov 2010 07:46:32 -0800 (PST)
+Received-SPF: pass (google.com: best guess record for domain of server4.example2.co.uk designates 94.236.45.212 as permitted sender) client-ip=94.236.45.212;
+Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of server4.example2.co.uk designates 94.236.45.212 as permitted sender) smtp.mail=
+Received: by server4.example2.co.uk (Postfix)
+ id 6045516581C7; Thu, 18 Nov 2010 15:46:32 +0000 (GMT)
+Date: Thu, 18 Nov 2010 15:46:32 +0000 (GMT)
+From: MAILER-DAEMON@server4.example2.co.uk (Mail Delivery System)
+Subject: Undelivered Mail Returned to Sender
+To: automated-bounces+9E191844-F321-11DF-8CDF-952520FF6B44@email.example2.com
+Auto-Submitted: auto-replied
+MIME-Version: 1.0
+Content-Type: multipart/report; report-type=delivery-status;
+ boundary="9D5CF165820A.1290095192/server4.example2.co.uk"
+Message-Id: <20101118154632.6045516581C7@server4.example2.co.uk>
+
+This is a MIME-encapsulated message.
+
+--9D5CF165820A.1290095192/server4.example2.co.uk
+Content-Description: Notification
+Content-Type: text/plain; charset=us-ascii
+
+This is the mail system at host server4.example2.co.uk.
+
+I'm sorry to have to inform you that your message could not
+be delivered to one or more recipients. It's attached below.
+
+For further assistance, please send mail to <postmaster>
+
+If you do so, please include this problem report. You can
+delete your own text from the attached returned message.
+
+ The mail system
+
+<recipient@example.net>: host mta2.example.com[220.226.181.21] said: 553 sorry,
+ badrcptto(user mail-box not found) (#5.7.1) (in reply to RCPT TO command)
+
+--9D5CF165820A.1290095192/server4.example2.co.uk
+Content-Description: Delivery report
+Content-Type: message/delivery-status
+
+Reporting-MTA: dns; server4.example2.co.uk
+X-Postfix-Queue-ID: 9D5CF165820A
+X-Postfix-Sender: rfc822; automated-bounces+9E191844-F321-11DF-8CDF-952520FF6B44@email.example2.com
+Arrival-Date: Thu, 18 Nov 2010 14:39:15 +0000 (GMT)
+
+Final-Recipient: rfc822; recipient@example.net
+Action: failed
+Status: 5.0.0
+Remote-MTA: dns; mta2.example.com
+Diagnostic-Code: smtp; 553 sorry, badrcptto(user mail-box not found) (#5.7.1)
+
+--9D5CF165820A.1290095192/server4.example2.co.uk
+Content-Description: Undelivered Message
+Content-Type: message/rfc822
+
+Received: by server4.example2.co.uk (Postfix, from userid 505)
+ id 9D5CF165820A; Thu, 18 Nov 2010 14:39:15 +0000 (GMT)
+DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=email.example2.com;
+ s=default10; t=1290091155;
+ bh=AtcZE6taT4U+r2s+ySCzKX6sUxH38ilf6rtuzk2HZNg=;
+ h=MIME-Version:Content-Transfer-Encoding:Content-Type:Date:From:
+ Subject:List-Unsubscribe:To:Message-Id;
+ b=YI/E2PXQDfXIpUUmodcZCWq8ckKNz+ZYRBDdKdwMgGRnzfYTP/eFPl3zj+3fODxTA
+ wGCHG3lRQxG25Zn4a5wFy1ShRoAhai1gBN10sc1RPJJQ9tey2/d04NBDdrMBShLOAh
+ 4gntrMxInkAqXVINozFREIpHFrr5Mh3mwLHpZVPM=
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+Content-Type: multipart/related; boundary="_----------=_129009115510888130"
+X-Mailer: MIME::Lite 3.027 (F2.77; T1.28; A2.04; B3.08; Q3.08)
+Date: Thu, 18 Nov 2010 14:39:15 +0000
+From: Fred Bloggs <fred.bloggs@email.example2.com>
+Subject: foo
+X-Campaignid: example220100129.2
+List-Unsubscribe: <http://www.example2offers.co.uk/unsubscribe.epl?uuid=9E191844-F321-11DF-8CDF-952520FF6B44>
+To: john smith <recipient@example.net>
+Message-Id: <20101118143915.9D5CF165820A@server4.example2.co.uk>
+
+This is a multi-part message in MIME format.
+
+--_----------=_129009115510888130
+Content-Disposition: inline
+Content-Transfer-Encoding: quoted-printable
+Content-Type: text/html
+
+HTML
+
+--_----------=_129009115510888130--
+
+
+--9D5CF165820A.1290095192/server4.example2.co.uk--
diff --git a/t/various-unknown.t b/t/various-unknown.t
index 14e6de0..241a45e 100644
--- a/t/various-unknown.t
+++ b/t/various-unknown.t
@@ -1,7 +1,7 @@
#!perl -wT
use strict;
-use Test::More tests => 132;
+use Test::More tests => 138;
use Mail::DeliveryStatus::BounceParser;
@@ -135,6 +135,10 @@ This is a permanent error; I've given up. Sorry it didn't work out.",
"reason" => "550 Recipient does not exist on this system",
"smtp_code" => "550"
},
+ "badrcptto.msg" => {
+ "reason" => "553 sorry, badrcptto(user mail-box not found) (#5.7.1)",
+ "smtp_code" => "553",
+ },
);
foreach my $file (keys %files_and_responses) {
--
1.6.1