Skip to content

Commit

Permalink
Add sample email rejected by Verizon
Browse files Browse the repository at this point in the history
  • Loading branch information
azumakuniyuki committed Nov 20, 2020
1 parent ecd59be commit 78c07bb
Show file tree
Hide file tree
Showing 5 changed files with 87 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/Sisimai/Reason/Blocked.pm
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ sub match {
|check:[ ]fail
)
|spf:[ ][^ ]+[ ]is[ ]not[ ]allowed[ ]to[ ]send[ ]mail[.][ ][a-z0-9]_401
|temporarily[ ]deferred[ ]due[ ]to[ ]unexpected[ ]volume[ ]or[ ]user[ ]complaints
|the[ ](?:email|domain|ip)[ ][^ ]+[ ]is[ ]blacklisted
|this[ ]system[ ]will[ ]not[ ]accept[ ]messages[ ]from[ ]servers[/]devices[ ]with[ ]no[ ]reverse[ ]dns
|too[ ]many[ ](?:
Expand Down
83 changes: 83 additions & 0 deletions set-of-emails/maildir/bsd/lhost-postfix-74.eml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
Return-Path: <>
Delivered-To: [email protected]
Received: from u1.em.example.jp
by mbox3.em.example.jp with LMTP id pRi6D904298QQXvAukD22R
for <[email protected]>; Tue, 17 Nov 2020 23:34:45 +0900
Received: by u1.em.example.jp (Postfix)
id 9UKnCx1J50z3ZQ2; Tue, 17 Nov 2020 23:34:45 +0900 (JST)
Date: Tue, 17 Nov 2020 23:34:45 +0900 (JST)
From: [email protected] (Mail Delivery System)
Subject: Undelivered Mail Returned to Sender
To: [email protected]
Auto-Submitted: auto-replied
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
boundary="9UK8Prr4eZzSPQR.1605555025/u1.em.example.jp"
Message-Id: <[email protected]>

This is a MIME-encapsulated message.

--9UK8Prr4eZzSPQR.1605555025/u1.em.example.jp
Content-Description: Notification
Content-Type: text/plain; charset=us-ascii
This is the mail system at host u1.em.example.jp.
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
<[email protected]>: host mta6.am0.yahoodns.net[67.195.204.72] said: 421
4.7.0 [TSS04] Messages from 192.0.2.192 temporarily deferred due to
unexpected volume or user complaints - 4.16.55.1; see
https://postmaster.verizonmedia.com/error-codes (in reply to MAIL FROM
command)
--9UK8Prr4eZzSPQR.1605555025/u1.em.example.jp
Content-Description: Delivery report
Content-Type: message/delivery-status
Reporting-MTA: dns; u1.em.example.jp
X-Postfix-Queue-ID: 9UK8Prr4eZzSPQR
X-Postfix-Sender: rfc822; [email protected]
Arrival-Date: Mon, 16 Nov 2020 23:34:45 +0900 (JST)
Final-Recipient: rfc822; [email protected]
Original-Recipient: rfc822;[email protected]
Action: failed
Status: 4.7.0
Remote-MTA: dns; mta6.am0.yahoodns.net
Diagnostic-Code: smtp; 421 4.7.0 [TSS04] Messages from 192.0.2.192
temporarily deferred due to unexpected volume or user complaints -
4.16.55.1; see https://postmaster.verizonmedia.com/error-codes
--9UK8Prr4eZzSPQR.1605555025/u1.em.example.jp
Content-Description: Undelivered Message
Content-Type: message/rfc822
Return-Path: <[email protected]>
Received: from u1.em.example.jp (localhost [127.0.0.1])
by u1.em.example.jp (Postfix) with ESMTP id 9UK8Prr4eZzSPQR
for <[email protected]>; Mon, 16 Nov 2020 23:34:45 +0900 (JST)
Received: from localhost (localhost [127.0.0.1])
by u1.em.example.jp (Postfix) with ESMTP id 9UK8P757b8z3ZQM
for <[email protected]>; Mon, 16 Nov 2020 23:34:45 +0900 (JST)
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-2022-JP
Content-Transfer-Encoding: quoted-printable
From: <[email protected]>
To: "Kijitora" <[email protected]>
Subject: Nyaan
Message-Id: <[email protected]>
Date: Mon, 16 Nov 2020 23:34:45 +0900 (JST)
X-Virus-Scanned: ClamAV using ClamSMTP
Nyaan
--9UK8Prr4eZzSPQR.1605555025/u1.em.example.jp--
2 changes: 1 addition & 1 deletion t/022-mail-maildir.t
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ my $MethodNames = {
'class' => ['new'],
'object' => ['path', 'dir', 'file', 'size', 'offset', 'handle', 'read'],
};
my $MaildirSize = 502;
my $MaildirSize = 503;
my $SampleEmail = './set-of-emails/maildir/bsd';
my $NewInstance = $PackageName->new($SampleEmail);

Expand Down
1 change: 1 addition & 0 deletions t/640-lhost-postfix.t
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ my $isexpected = [
{ 'n' => '71', 's' => qr/\A5[.]7[.]1\z/, 'r' => qr/policyviolation/,'b' => qr/\A1\z/ },
{ 'n' => '72', 's' => qr/\A5[.]7[.]1\z/, 'r' => qr/policyviolation/,'b' => qr/\A1\z/ },
{ 'n' => '73', 's' => qr/\A5[.]7[.]1\z/, 'r' => qr/policyviolation/,'b' => qr/\A1\z/ },
{ 'n' => '74', 's' => qr/\A4[.]7[.]0\z/, 'r' => qr/blocked/, 'b' => qr/\A1\z/ },
];

$enginetest->($enginename, $isexpected);
Expand Down
1 change: 1 addition & 0 deletions xt/640-lhost-postfix.t
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ my $isexpected = [
{ 'n' => '01229', 'r' => qr/policyviolation/},
{ 'n' => '01230', 'r' => qr/policyviolation/},
{ 'n' => '01231', 'r' => qr/policyviolation/},
{ 'n' => '01232', 'r' => qr/blocked/ },
];

plan 'skip_all', sprintf("%s not found", $samplepath) unless -d $samplepath;
Expand Down

0 comments on commit 78c07bb

Please sign in to comment.