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 80212d8 commit 65de874
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.rb
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ class << self
|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: deadbeef@mailmagazine.example.com
Received: from u1.em.example.jp
by mbox3.em.example.jp with LMTP id pRi6D904298QQXvAukD22R
for <deadbeef@mailmagazine.example.com>; 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: MAILER-DAEMON@u1.em.example.jp (Mail Delivery System)
Subject: Undelivered Mail Returned to Sender
To: deadbeef@mailmagazine.example.com
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: <9UKnCx1J50z3ZQ2@u1.em.example.jp>

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
<kijitora@y.example.ca>: 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; deadbeef@mailmagazine.example.com
Arrival-Date: Mon, 16 Nov 2020 23:34:45 +0900 (JST)
Final-Recipient: rfc822; kijitora@y.example.ca
Original-Recipient: rfc822;kijitora@y.example.ca
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: <deadbeef@mailmagazine.example.com>
Received: from u1.em.example.jp (localhost [127.0.0.1])
by u1.em.example.jp (Postfix) with ESMTP id 9UK8Prr4eZzSPQR
for <kijitora@y.example.ca>; 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 <kijitora@y.example.ca>; 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: <neko@mailmagazine.example.com>
To: "Kijitora" <kijitora@y.example.ca>
Subject: Nyaan
Message-Id: <9UK8P757b8z3ZQM@u1.em.example.jp>
Date: Mon, 16 Nov 2020 23:34:45 +0900 (JST)
X-Virus-Scanned: ClamAV using ClamSMTP
Nyaan
--9UK8Prr4eZzSPQR.1605555025/u1.em.example.jp--
1 change: 1 addition & 0 deletions spec/sisimai/lhost/private-postfix_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@
{ 'n' => '01229', 'r' => /policyviolation/ },
{ 'n' => '01230', 'r' => /policyviolation/ },
{ 'n' => '01231', 'r' => /policyviolation/ },
{ 'n' => '01232', 'r' => /blocked/ },
]
Sisimai::Lhost::Code.maketest(enginename, isexpected, true)

1 change: 1 addition & 0 deletions spec/sisimai/lhost/public-postfix_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
{ 'n' => '71', 's' => /\A5[.]7[.]1\z/, 'r' => /policyviolation/, 'b' => /\A1\z/ },
{ 'n' => '72', 's' => /\A5[.]7[.]1\z/, 'r' => /policyviolation/, 'b' => /\A1\z/ },
{ 'n' => '73', 's' => /\A5[.]7[.]1\z/, 'r' => /policyviolation/, 'b' => /\A1\z/ },
{ 'n' => '74', 's' => /\A4[.]7[.]0\z/, 'r' => /blocked/, 'b' => /\A1\z/ },
]
Sisimai::Lhost::Code.maketest(enginename, isexpected)

2 changes: 1 addition & 1 deletion spec/sisimai/mail/maildir_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

describe Sisimai::Mail::Maildir do
samplemaildir = './set-of-emails/maildir/bsd'
allofthefiles = 504
allofthefiles = 505
let(:mailobj) { Sisimai::Mail::Maildir.new(samples) }
let(:mockobj) { Sisimai::Mail::Maildir.new(invalid) }

Expand Down

0 comments on commit 65de874

Please sign in to comment.