sisimai 5.7.0 → 5.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. checksums.yaml +4 -4
  2. data/ChangeLog.md +15 -0
  3. data/README-JA.md +8 -8
  4. data/README.md +8 -8
  5. data/lib/sisimai/arf.rb +2 -1
  6. data/lib/sisimai/eb.rb +116 -0
  7. data/lib/sisimai/fact.rb +24 -17
  8. data/lib/sisimai/lda.rb +20 -18
  9. data/lib/sisimai/lhost/amazonses.rb +11 -10
  10. data/lib/sisimai/lhost/courier.rb +4 -3
  11. data/lib/sisimai/lhost/domino.rb +2 -1
  12. data/lib/sisimai/lhost/einsundeins.rb +3 -2
  13. data/lib/sisimai/lhost/exchange2003.rb +8 -7
  14. data/lib/sisimai/lhost/exchange2007.rb +14 -13
  15. data/lib/sisimai/lhost/exim.rb +7 -6
  16. data/lib/sisimai/lhost/ezweb.rb +4 -3
  17. data/lib/sisimai/lhost/fml.rb +4 -3
  18. data/lib/sisimai/lhost/gmail.rb +10 -9
  19. data/lib/sisimai/lhost/googlegroups.rb +3 -2
  20. data/lib/sisimai/lhost/googleworkspace.rb +2 -1
  21. data/lib/sisimai/lhost/imailserver.rb +3 -2
  22. data/lib/sisimai/lhost/kddi.rb +4 -3
  23. data/lib/sisimai/lhost/notes.rb +2 -1
  24. data/lib/sisimai/lhost/postfix.rb +7 -6
  25. data/lib/sisimai/lhost/qmail.rb +10 -9
  26. data/lib/sisimai/lhost/sendmail.rb +4 -3
  27. data/lib/sisimai/lhost/trendmicro.rb +2 -1
  28. data/lib/sisimai/lhost/v5sendmail.rb +2 -1
  29. data/lib/sisimai/lhost/verizon.rb +3 -2
  30. data/lib/sisimai/reason/authfailure.rb +6 -5
  31. data/lib/sisimai/reason/badreputation.rb +5 -4
  32. data/lib/sisimai/reason/blocked.rb +6 -5
  33. data/lib/sisimai/reason/contenterror.rb +6 -5
  34. data/lib/sisimai/reason/delivered.rb +3 -2
  35. data/lib/sisimai/reason/emailtoolarge.rb +6 -5
  36. data/lib/sisimai/reason/expired.rb +3 -2
  37. data/lib/sisimai/reason/failedstarttls.rb +5 -3
  38. data/lib/sisimai/reason/feedback.rb +2 -1
  39. data/lib/sisimai/reason/filtered.rb +9 -8
  40. data/lib/sisimai/reason/hasmoved.rb +5 -4
  41. data/lib/sisimai/reason/hostunknown.rb +5 -4
  42. data/lib/sisimai/reason/mailboxfull.rb +7 -6
  43. data/lib/sisimai/reason/mailererror.rb +3 -2
  44. data/lib/sisimai/reason/networkerror.rb +3 -2
  45. data/lib/sisimai/reason/norelaying.rb +4 -3
  46. data/lib/sisimai/reason/notaccept.rb +5 -4
  47. data/lib/sisimai/reason/notcompliantrfc.rb +4 -3
  48. data/lib/sisimai/reason/onhold.rb +8 -7
  49. data/lib/sisimai/reason/policyviolation.rb +7 -6
  50. data/lib/sisimai/reason/ratelimited.rb +5 -4
  51. data/lib/sisimai/reason/rejected.rb +18 -14
  52. data/lib/sisimai/reason/requireptr.rb +5 -4
  53. data/lib/sisimai/reason/securityerror.rb +4 -3
  54. data/lib/sisimai/reason/spamdetected.rb +6 -5
  55. data/lib/sisimai/reason/suppressed.rb +4 -3
  56. data/lib/sisimai/reason/suspend.rb +4 -3
  57. data/lib/sisimai/reason/syntaxerror.rb +4 -3
  58. data/lib/sisimai/reason/systemerror.rb +3 -2
  59. data/lib/sisimai/reason/systemfull.rb +4 -3
  60. data/lib/sisimai/reason/undefined.rb +2 -1
  61. data/lib/sisimai/reason/userunknown.rb +13 -9
  62. data/lib/sisimai/reason/vacation.rb +2 -1
  63. data/lib/sisimai/reason/virusdetected.rb +6 -5
  64. data/lib/sisimai/reason.rb +45 -40
  65. data/lib/sisimai/rfc1894.rb +8 -2
  66. data/lib/sisimai/rfc2045.rb +6 -3
  67. data/lib/sisimai/rfc3464/thirdparty.rb +10 -9
  68. data/lib/sisimai/rfc3834.rb +4 -2
  69. data/lib/sisimai/rhost/aol.rb +3 -2
  70. data/lib/sisimai/rhost/apple.rb +12 -11
  71. data/lib/sisimai/rhost/cloudflare.rb +3 -2
  72. data/lib/sisimai/rhost/cox.rb +38 -37
  73. data/lib/sisimai/rhost/facebook.rb +17 -16
  74. data/lib/sisimai/rhost/franceptt.rb +39 -38
  75. data/lib/sisimai/rhost/godaddy.rb +35 -34
  76. data/lib/sisimai/rhost/google.rb +22 -21
  77. data/lib/sisimai/rhost/gsuite.rb +8 -7
  78. data/lib/sisimai/rhost/iua.rb +11 -10
  79. data/lib/sisimai/rhost/kddi.rb +3 -2
  80. data/lib/sisimai/rhost/messagelabs.rb +13 -12
  81. data/lib/sisimai/rhost/microsoft.rb +33 -32
  82. data/lib/sisimai/rhost/mimecast.rb +18 -17
  83. data/lib/sisimai/rhost/nttdocomo.rb +10 -9
  84. data/lib/sisimai/rhost/outlook.rb +3 -2
  85. data/lib/sisimai/rhost/spectrum.rb +19 -18
  86. data/lib/sisimai/rhost/tencent.rb +10 -9
  87. data/lib/sisimai/rhost/yahooinc.rb +11 -10
  88. data/lib/sisimai/rhost/zoho.rb +8 -7
  89. data/lib/sisimai/smtp/command.rb +13 -8
  90. data/lib/sisimai/smtp/failure.rb +9 -8
  91. data/lib/sisimai/smtp/reply.rb +23 -22
  92. data/lib/sisimai/smtp/status.rb +141 -140
  93. data/lib/sisimai/smtp/transcript.rb +3 -2
  94. data/lib/sisimai/version.rb +1 -1
  95. data/lib/sisimai.rb +2 -1
  96. data/set-of-emails/maildir/bsd/lhost-postfix-81.eml +130 -0
  97. data/set-of-emails/should-not-crash/go-423-deeply-nested-mime-parts.eml +20050 -0
  98. metadata +5 -2
@@ -1,4 +1,4 @@
1
1
  # Define the version number of Sisimai
2
2
  module Sisimai
3
- VERSION = '5.7.0'.freeze
3
+ VERSION = '5.7.1'.freeze
4
4
  end
data/lib/sisimai.rb CHANGED
@@ -104,12 +104,13 @@ module Sisimai
104
104
  # Reason list Sisimai can detect
105
105
  # @return [Hash] Reason list table
106
106
  def reason
107
+ require 'sisimai/eb'
107
108
  require 'sisimai/reason'
108
109
  table = {}
109
110
  names = Sisimai::Reason.index
110
111
 
111
112
  # These reasons are not included in the results of Sisimai::Reason.index
112
- names += %w[Delivered Feedback Undefined Vacation]
113
+ names += [Sisimai::Eb::ReSENT, Sisimai::Eb::ReFEED, Sisimai::Eb::Re___0, Sisimai::Eb::ReAWAY]
113
114
  while e = names.shift do
114
115
  # Call .description() method of Sisimai::Reason::*
115
116
  r = "Sisimai::Reason::#{e}"
@@ -0,0 +1,130 @@
1
+ Return-Path: <>
2
+ Delivered-To: sironeko@example.com
3
+ Received: by e4.example.com (Postfix) via r2.example.com id FFFFFFFF00;
4
+ Thu, 29 Apr 2005 23:34:45 +0000 (UTC)
5
+ MIME-Version: 1.0
6
+ Content-Type: multipart/mixed; boundary="BOUNDARY-DEPTH-01"
7
+ Message-Id: <20050429233445.FFFFFFFF99@e4.example.com>
8
+ From: MAILER-DAEMON@e4.example.com (Mail Delivery System)
9
+ To: sironeko@e4.example.com
10
+ Subject: Undelivered Mail Returned to Sender
11
+ Date: Thu, 29 Apr 2005 23:34:45 +0000 (UTC)
12
+
13
+ This is a MIME-encapsulated message.
14
+
15
+ --BOUNDARY-DEPTH-01
16
+ Content-Type: multipart/mixed; boundary="BOUNDARY-DEPTH-02"
17
+
18
+ --BOUNDARY-DEPTH-02
19
+ Content-Type: multipart/mixed; boundary="BOUNDARY-DEPTH-03"
20
+
21
+ --BOUNDARY-DEPTH-03
22
+ Content-Type: multipart/mixed; boundary="BOUNDARY-DEPTH-04"
23
+
24
+ --BOUNDARY-DEPTH-04
25
+ Content-Type: multipart/mixed; boundary="BOUNDARY-DEPTH-05"
26
+
27
+ --BOUNDARY-DEPTH-05
28
+ Content-Type: multipart/mixed; boundary="BOUNDARY-DEPTH-06"
29
+
30
+ --BOUNDARY-DEPTH-06
31
+ Content-Type: multipart/mixed; boundary="BOUNDARY-DEPTH-07"
32
+
33
+ --BOUNDARY-DEPTH-07
34
+ Content-Type: multipart/mixed; boundary="BOUNDARY-DEPTH-08"
35
+
36
+ --BOUNDARY-DEPTH-08
37
+ Content-Type: multipart/mixed; boundary="BOUNDARY-DEPTH-09"
38
+
39
+ --BOUNDARY-DEPTH-09
40
+ Content-Type: multipart/mixed; boundary="BOUNDARY-DEPTH-10"
41
+
42
+ --BOUNDARY-DEPTH-10
43
+ Content-Type: multipart/mixed; boundary="BOUNDARY-DEPTH-11"
44
+
45
+ --BOUNDARY-DEPTH-11
46
+ Content-Type: multipart/mixed; boundary="BOUNDARY-DEPTH-12"
47
+
48
+ --BOUNDARY-DEPTH-12
49
+ Content-Type: multipart/mixed; boundary="BOUNDARY-DEPTH-13"
50
+
51
+ --BOUNDARY-DEPTH-13
52
+ Content-Type: multipart/mixed; boundary="BOUNDARY-DEPTH-14"
53
+
54
+ --BOUNDARY-DEPTH-14
55
+ Content-Type: multipart/mixed; boundary="BOUNDARY-DEPTH-15"
56
+
57
+ --BOUNDARY-DEPTH-15
58
+ Content-Type: multipart/mixed; boundary="BOUNDARY-DEPTH-16"
59
+
60
+ --BOUNDARY-DEPTH-16
61
+ Content-Type: multipart/mixed; boundary="BOUNDARY-DEPTH-17"
62
+
63
+ --BOUNDARY-DEPTH-17
64
+ Content-Type: multipart/mixed; boundary="BOUNDARY-DEPTH-18"
65
+
66
+ --BOUNDARY-DEPTH-18
67
+ Content-Type: multipart/mixed; boundary="BOUNDARY-DEPTH-19"
68
+
69
+ --BOUNDARY-DEPTH-19
70
+ Content-Type: multipart/mixed; boundary="BOUNDARY-DEPTH-20"
71
+
72
+ --BOUNDARY-DEPTH-20
73
+ Content-Description: Notification
74
+ Content-Type: text/plain
75
+
76
+ This is the Postfix program at host e4.example.com.
77
+
78
+ I'm sorry to have to inform you that the message returned
79
+ below could not be delivered to one or more destinations.
80
+
81
+ For further assistance, please contact <postmaster@e4.example.com>
82
+
83
+ If you do so, please include this problem report. You can
84
+ delete your own text from the message returned below.
85
+
86
+ The Postfix program
87
+
88
+ <kijitora@example.com>: Name service error for domain example.com: Host not
89
+ found, try again
90
+
91
+
92
+ --FFFF000020.0000110000/e4.example.com
93
+ Content-Description: Undelivered Message
94
+ Content-Type: message/rfc822
95
+
96
+ Received: by e4.example.com (Postfix, from userid 1)
97
+ id FFFFFFFF55; Thu, 29 Apr 2005 23:34:45 +0000 (UTC)
98
+ MIME-Version: 1.0
99
+ Content-Type: text/plain; charset=us-ascii
100
+ Content-Transfer-Encoding: 7bit
101
+ Message-ID: <ffffffffffffffff000000002@neko.nyaan.example.jp>
102
+ From: Neko <sironeko@example.or.jp>
103
+ Date: Thu, 29 Apr 2005 23:34:45 +0000
104
+ To: Kijitora <kijitora@example.com>
105
+ Subject: Nyaan
106
+
107
+ Nyaan
108
+
109
+ --FFFF000020.0000110000/e4.example.com--
110
+
111
+ --BOUNDARY-DEPTH-20--
112
+ --BOUNDARY-DEPTH-19--
113
+ --BOUNDARY-DEPTH-18--
114
+ --BOUNDARY-DEPTH-17--
115
+ --BOUNDARY-DEPTH-16--
116
+ --BOUNDARY-DEPTH-15--
117
+ --BOUNDARY-DEPTH-14--
118
+ --BOUNDARY-DEPTH-13--
119
+ --BOUNDARY-DEPTH-12--
120
+ --BOUNDARY-DEPTH-11--
121
+ --BOUNDARY-DEPTH-10--
122
+ --BOUNDARY-DEPTH-09--
123
+ --BOUNDARY-DEPTH-08--
124
+ --BOUNDARY-DEPTH-07--
125
+ --BOUNDARY-DEPTH-06--
126
+ --BOUNDARY-DEPTH-05--
127
+ --BOUNDARY-DEPTH-04--
128
+ --BOUNDARY-DEPTH-03--
129
+ --BOUNDARY-DEPTH-02--
130
+ --BOUNDARY-DEPTH-01--