sisimai 5.0.2-java → 5.1.0-java

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 (168) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/codecovio.yml +35 -0
  3. data/.github/workflows/rake-test.yml +27 -24
  4. data/ChangeLog.md +62 -0
  5. data/Gemfile +2 -0
  6. data/README-JA.md +21 -18
  7. data/README.md +23 -20
  8. data/lib/sisimai/arf.rb +27 -8
  9. data/lib/sisimai/fact/json.rb +2 -2
  10. data/lib/sisimai/fact/yaml.rb +2 -2
  11. data/lib/sisimai/fact.rb +4 -19
  12. data/lib/sisimai/lhost/activehunter.rb +4 -3
  13. data/lib/sisimai/lhost/amavis.rb +4 -4
  14. data/lib/sisimai/lhost/amazonses.rb +6 -6
  15. data/lib/sisimai/lhost/amazonworkmail.rb +4 -4
  16. data/lib/sisimai/lhost/aol.rb +4 -4
  17. data/lib/sisimai/lhost/apachejames.rb +4 -4
  18. data/lib/sisimai/lhost/barracuda.rb +4 -4
  19. data/lib/sisimai/lhost/bigfoot.rb +4 -4
  20. data/lib/sisimai/lhost/biglobe.rb +4 -4
  21. data/lib/sisimai/lhost/courier.rb +4 -4
  22. data/lib/sisimai/lhost/domino.rb +4 -4
  23. data/lib/sisimai/lhost/dragonfly.rb +114 -0
  24. data/lib/sisimai/lhost/einsundeins.rb +4 -4
  25. data/lib/sisimai/lhost/exchange2003.rb +4 -3
  26. data/lib/sisimai/lhost/exchange2007.rb +4 -3
  27. data/lib/sisimai/lhost/exim.rb +4 -4
  28. data/lib/sisimai/lhost/ezweb.rb +4 -4
  29. data/lib/sisimai/lhost/facebook.rb +4 -4
  30. data/lib/sisimai/lhost/fml.rb +4 -4
  31. data/lib/sisimai/lhost/gmail.rb +4 -4
  32. data/lib/sisimai/lhost/gmx.rb +4 -4
  33. data/lib/sisimai/lhost/googlegroups.rb +4 -4
  34. data/lib/sisimai/lhost/gsuite.rb +4 -4
  35. data/lib/sisimai/lhost/imailserver.rb +4 -3
  36. data/lib/sisimai/lhost/interscanmss.rb +5 -4
  37. data/lib/sisimai/lhost/kddi.rb +4 -4
  38. data/lib/sisimai/lhost/mailfoundry.rb +4 -4
  39. data/lib/sisimai/lhost/mailmarshalsmtp.rb +6 -5
  40. data/lib/sisimai/lhost/mailru.rb +4 -4
  41. data/lib/sisimai/lhost/mcafee.rb +4 -4
  42. data/lib/sisimai/lhost/messagelabs.rb +4 -3
  43. data/lib/sisimai/lhost/messagingserver.rb +5 -4
  44. data/lib/sisimai/lhost/mfilter.rb +4 -4
  45. data/lib/sisimai/lhost/mxlogic.rb +3 -3
  46. data/lib/sisimai/lhost/notes.rb +4 -4
  47. data/lib/sisimai/lhost/office365.rb +4 -4
  48. data/lib/sisimai/lhost/opensmtpd.rb +9 -7
  49. data/lib/sisimai/lhost/outlook.rb +4 -4
  50. data/lib/sisimai/lhost/postfix.rb +4 -4
  51. data/lib/sisimai/lhost/powermta.rb +4 -4
  52. data/lib/sisimai/lhost/qmail.rb +10 -10
  53. data/lib/sisimai/lhost/receivingses.rb +4 -4
  54. data/lib/sisimai/lhost/sendgrid.rb +4 -4
  55. data/lib/sisimai/lhost/sendmail.rb +4 -4
  56. data/lib/sisimai/lhost/surfcontrol.rb +4 -4
  57. data/lib/sisimai/lhost/v5sendmail.rb +5 -4
  58. data/lib/sisimai/lhost/verizon.rb +4 -4
  59. data/lib/sisimai/lhost/x1.rb +3 -3
  60. data/lib/sisimai/lhost/x2.rb +3 -3
  61. data/lib/sisimai/lhost/x3.rb +3 -3
  62. data/lib/sisimai/lhost/x4.rb +3 -3
  63. data/lib/sisimai/lhost/x5.rb +3 -3
  64. data/lib/sisimai/lhost/x6.rb +3 -3
  65. data/lib/sisimai/lhost/yahoo.rb +4 -4
  66. data/lib/sisimai/lhost/yandex.rb +4 -4
  67. data/lib/sisimai/lhost/zoho.rb +4 -4
  68. data/lib/sisimai/lhost.rb +5 -5
  69. data/lib/sisimai/mail/maildir.rb +1 -1
  70. data/lib/sisimai/mail/stdin.rb +1 -1
  71. data/lib/sisimai/mda.rb +3 -3
  72. data/lib/sisimai/message.rb +9 -9
  73. data/lib/sisimai/order.rb +1 -0
  74. data/lib/sisimai/reason/badreputation.rb +1 -1
  75. data/lib/sisimai/reason/blocked.rb +1 -0
  76. data/lib/sisimai/reason/expired.rb +7 -0
  77. data/lib/sisimai/reason/filtered.rb +1 -0
  78. data/lib/sisimai/reason/mailboxfull.rb +3 -0
  79. data/lib/sisimai/reason/norelaying.rb +2 -0
  80. data/lib/sisimai/reason/rejected.rb +2 -1
  81. data/lib/sisimai/reason/suspend.rb +4 -0
  82. data/lib/sisimai/reason/userunknown.rb +4 -1
  83. data/lib/sisimai/reason.rb +8 -8
  84. data/lib/sisimai/rfc3464.rb +3 -3
  85. data/lib/sisimai/rfc3834.rb +2 -2
  86. data/lib/sisimai/rhost/apple.rb +92 -0
  87. data/lib/sisimai/rhost/cox.rb +81 -32
  88. data/lib/sisimai/rhost/franceptt.rb +84 -81
  89. data/lib/sisimai/rhost/godaddy.rb +205 -43
  90. data/lib/sisimai/rhost/google.rb +85 -72
  91. data/lib/sisimai/rhost/iua.rb +2 -2
  92. data/lib/sisimai/rhost/kddi.rb +6 -5
  93. data/lib/sisimai/rhost/microsoft.rb +12 -5
  94. data/lib/sisimai/rhost/mimecast.rb +15 -4
  95. data/lib/sisimai/rhost/nttdocomo.rb +4 -4
  96. data/lib/sisimai/rhost/spectrum.rb +100 -40
  97. data/lib/sisimai/rhost/tencent.rb +46 -25
  98. data/lib/sisimai/rhost/yahooinc.rb +110 -0
  99. data/lib/sisimai/rhost.rb +28 -35
  100. data/lib/sisimai/smtp/reply.rb +4 -3
  101. data/lib/sisimai/smtp/transcript.rb +3 -3
  102. data/lib/sisimai/version.rb +1 -1
  103. data/lib/sisimai.rb +0 -6
  104. data/set-of-emails/maildir/bsd/arf-26.eml +27 -0
  105. data/set-of-emails/maildir/bsd/lhost-dragonfly-01.eml +36 -0
  106. data/set-of-emails/maildir/bsd/lhost-dragonfly-02.eml +32 -0
  107. data/set-of-emails/maildir/bsd/lhost-dragonfly-03.eml +32 -0
  108. data/set-of-emails/maildir/bsd/lhost-dragonfly-04.eml +31 -0
  109. data/set-of-emails/maildir/bsd/lhost-dragonfly-05.eml +32 -0
  110. data/set-of-emails/maildir/bsd/lhost-dragonfly-06.eml +32 -0
  111. data/set-of-emails/maildir/bsd/lhost-dragonfly-07.eml +32 -0
  112. data/set-of-emails/maildir/bsd/lhost-dragonfly-08.eml +32 -0
  113. data/set-of-emails/maildir/bsd/lhost-dragonfly-09.eml +32 -0
  114. data/set-of-emails/maildir/bsd/lhost-dragonfly-10.eml +32 -0
  115. data/set-of-emails/maildir/bsd/lhost-dragonfly-11.eml +32 -0
  116. data/set-of-emails/maildir/bsd/lhost-dragonfly-12.eml +32 -0
  117. data/set-of-emails/maildir/bsd/lhost-dragonfly-13.eml +32 -0
  118. data/set-of-emails/maildir/bsd/lhost-dragonfly-14.eml +32 -0
  119. data/set-of-emails/maildir/bsd/lhost-dragonfly-15.eml +32 -0
  120. data/set-of-emails/maildir/bsd/lhost-dragonfly-16.eml +32 -0
  121. data/set-of-emails/maildir/bsd/lhost-dragonfly-17.eml +32 -0
  122. data/set-of-emails/maildir/bsd/lhost-dragonfly-18.eml +32 -0
  123. data/set-of-emails/maildir/bsd/lhost-dragonfly-19.eml +32 -0
  124. data/set-of-emails/maildir/bsd/lhost-dragonfly-20.eml +32 -0
  125. data/set-of-emails/maildir/bsd/lhost-dragonfly-21.eml +33 -0
  126. data/set-of-emails/maildir/bsd/lhost-dragonfly-22.eml +32 -0
  127. data/set-of-emails/maildir/bsd/lhost-dragonfly-23.eml +32 -0
  128. data/set-of-emails/maildir/bsd/lhost-dragonfly-24.eml +32 -0
  129. data/set-of-emails/maildir/bsd/lhost-dragonfly-25.eml +33 -0
  130. data/set-of-emails/maildir/bsd/lhost-dragonfly-26.eml +33 -0
  131. data/set-of-emails/maildir/bsd/lhost-dragonfly-27.eml +47 -0
  132. data/set-of-emails/maildir/bsd/lhost-dragonfly-28.eml +47 -0
  133. data/set-of-emails/maildir/bsd/lhost-dragonfly-29.eml +32 -0
  134. data/set-of-emails/maildir/bsd/lhost-dragonfly-30.eml +32 -0
  135. data/set-of-emails/maildir/bsd/lhost-opensmtpd-10.eml +58 -0
  136. data/set-of-emails/maildir/bsd/lhost-opensmtpd-11.eml +58 -0
  137. data/set-of-emails/maildir/bsd/lhost-opensmtpd-12.eml +62 -0
  138. data/set-of-emails/maildir/bsd/lhost-opensmtpd-13.eml +62 -0
  139. data/set-of-emails/maildir/bsd/lhost-opensmtpd-14.eml +58 -0
  140. data/set-of-emails/maildir/bsd/lhost-opensmtpd-15.eml +63 -0
  141. data/set-of-emails/maildir/bsd/lhost-opensmtpd-16.eml +62 -0
  142. data/set-of-emails/maildir/bsd/lhost-opensmtpd-17.eml +63 -0
  143. data/set-of-emails/maildir/bsd/lhost-qmail-11.eml +29 -0
  144. data/set-of-emails/maildir/bsd/lhost-qmail-12.eml +29 -0
  145. data/set-of-emails/maildir/bsd/lhost-qmail-13.eml +29 -0
  146. data/set-of-emails/maildir/bsd/lhost-qmail-14.eml +34 -0
  147. data/set-of-emails/maildir/bsd/lhost-qmail-15.eml +30 -0
  148. data/set-of-emails/maildir/bsd/lhost-qmail-16.eml +31 -0
  149. data/set-of-emails/maildir/bsd/lhost-qmail-17.eml +38 -0
  150. data/set-of-emails/maildir/bsd/lhost-qmail-18.eml +31 -0
  151. data/set-of-emails/maildir/bsd/lhost-qmail-19.eml +31 -0
  152. data/set-of-emails/maildir/bsd/lhost-qmail-20.eml +46 -0
  153. data/set-of-emails/maildir/bsd/lhost-qmail-21.eml +41 -0
  154. data/set-of-emails/maildir/bsd/lhost-qmail-22.eml +42 -0
  155. data/set-of-emails/maildir/bsd/lhost-qmail-23.eml +43 -0
  156. data/set-of-emails/maildir/bsd/lhost-qmail-24.eml +43 -0
  157. data/set-of-emails/maildir/bsd/lhost-qmail-25.eml +54 -0
  158. data/set-of-emails/maildir/bsd/rhost-apple-01.eml +79 -0
  159. data/set-of-emails/maildir/bsd/rhost-apple-02.eml +81 -0
  160. data/set-of-emails/maildir/bsd/rhost-apple-03.eml +75 -0
  161. data/set-of-emails/maildir/bsd/rhost-apple-04.eml +74 -0
  162. data/set-of-emails/maildir/bsd/rhost-microsoft-04.eml +86 -0
  163. data/set-of-emails/maildir/bsd/rhost-microsoft-05.eml +83 -0
  164. data/set-of-emails/maildir/bsd/rhost-yahooinc-01.eml +80 -0
  165. data/set-of-emails/maildir/bsd/rhost-yahooinc-02.eml +83 -0
  166. data/set-of-emails/maildir/bsd/rhost-yahooinc-03.eml +125 -0
  167. metadata +69 -3
  168. data/.travis.yml +0 -23
@@ -1,6 +1,7 @@
1
1
  module Sisimai::Lhost
2
- # Sisimai::Lhost::MailMarshalSMTP parses a bounce email which created by Trustwave Secure Email
3
- # Gateway: formerly MailMarshal SMTP. Methods in the module are called from only Sisimai::Message.
2
+ # Sisimai::Lhost::MailMarshalSMTP decodes a bounce email which created by Trustwave Secure Email
3
+ # Gateway: formerly MailMarshal SMTP https://www.trustwave.com/en-us/services/email-security/.
4
+ # Methods in the module are called from only Sisimai::Message.
4
5
  module MailMarshalSMTP
5
6
  class << self
6
7
  require 'sisimai/lhost'
@@ -13,11 +14,11 @@ module Sisimai::Lhost
13
14
  rcpts: ['The following recipients were affected:'],
14
15
  }.freeze
15
16
 
16
- # Parse bounce messages from MailMarshalSMTP
17
+ # @abstract Decodes the bounce message from Trustwave Secure Email Gateway (Formerly MailMarshalSMTP)
17
18
  # @param [Hash] mhead Message headers of a bounce email
18
19
  # @param [String] mbody Message body of a bounce email
19
20
  # @return [Hash] Bounce data list and message/rfc822 part
20
- # @return [Nil] it failed to parse or the arguments are missing
21
+ # @return [Nil] it failed to decode or the arguments are missing
21
22
  def inquire(mhead, mbody)
22
23
  return nil unless mhead['subject'].start_with?('Undeliverable Mail: "')
23
24
 
@@ -42,7 +43,7 @@ module Sisimai::Lhost
42
43
 
43
44
  # Your message:
44
45
  # From: originalsender@example.com
45
- # Subject: IIdentifica蟾ス驕俳
46
+ # Subject: ...
46
47
  #
47
48
  # Could not be delivered because of
48
49
  #
@@ -1,6 +1,6 @@
1
1
  module Sisimai::Lhost
2
- # Sisimai::Lhost::MailRu parses a bounce email which created by @mail.ru. Methods in the module are
3
- # called from only Sisimai::Message.
2
+ # Sisimai::Lhost::MailRu decodes a bounce email which created by @mail.ru https://mail.ru/.
3
+ # Methods in the module are called from only Sisimai::Message.
4
4
  module MailRu
5
5
  class << self
6
6
  # Based on Sisimai::Lhost::Exim
@@ -44,11 +44,11 @@ module Sisimai::Lhost
44
44
  'contenterror' => ['Too many "Received" headers'],
45
45
  }.freeze
46
46
 
47
- # Parse bounce messages from @mail.ru
47
+ # @abstract Decodes the bounce message from @mail.ru
48
48
  # @param [Hash] mhead Message headers of a bounce email
49
49
  # @param [String] mbody Message body of a bounce email
50
50
  # @return [Hash] Bounce data list and message/rfc822 part
51
- # @return [Nil] it failed to parse or the arguments are missing
51
+ # @return [Nil] it failed to decode or the arguments are missing
52
52
  def inquire(mhead, mbody)
53
53
  mfrom = mhead['from'].downcase
54
54
  msgid = mhead['message-id'] ? mhead['message-id'].downcase : ''
@@ -1,6 +1,6 @@
1
1
  module Sisimai::Lhost
2
- # Sisimai::Lhost::McAfee parses a bounce email which created by McAfee Email Appliance. Methods in
3
- # the module are called from only Sisimai::Message.
2
+ # Sisimai::Lhost::McAfee decodes a bounce email which created by McAfee Email Appliance.
3
+ # Methods in the module are called from only Sisimai::Message.
4
4
  module McAfee
5
5
  class << self
6
6
  require 'sisimai/lhost'
@@ -10,11 +10,11 @@ module Sisimai::Lhost
10
10
  StartingOf = { message: ['--- The following addresses had delivery problems ---'] }.freeze
11
11
  MessagesOf = { 'userunknown' => [' User not exist', ' unknown.', '550 Unknown user ', 'No such user'] }.freeze
12
12
 
13
- # Parse bounce messages from McAfee Email Appliance
13
+ # @abstract Decodes the bounce message from McAfee Email Appliance
14
14
  # @param [Hash] mhead Message headers of a bounce email
15
15
  # @param [String] mbody Message body of a bounce email
16
16
  # @return [Hash] Bounce data list and message/rfc822 part
17
- # @return [Nil] it failed to parse or the arguments are missing
17
+ # @return [Nil] it failed to decode or the arguments are missing
18
18
  def inquire(mhead, mbody)
19
19
  # X-NAI-Header: Modified by McAfee Email and Web Security Virtual Appliance
20
20
  return nil unless mhead['x-nai-header']
@@ -1,5 +1,6 @@
1
1
  module Sisimai::Lhost
2
- # Sisimai::Lhost::MessageLabs parses a bounce email which created by Symantec.cloud: formerly MessageLabs.
2
+ # Sisimai::Lhost::MessageLabs decodes a bounce email which created by Email Security (formerly MessageLab)
3
+ # https://www.broadcom.com/products/cybersecurity/emails.
3
4
  # Methods in the module are called from only Sisimai::Message.
4
5
  module MessageLabs
5
6
  class << self
@@ -13,11 +14,11 @@ module Sisimai::Lhost
13
14
  'securityerror' => ['Please turn on SMTP Authentication in your mail client'],
14
15
  }.freeze
15
16
 
16
- # Parse bounce messages from Symantec.cloud(MessageLabs)
17
+ # @abstract Decodes the bounce message from Email Security (formerly Symantec.cloud (formerly MessageLabs))
17
18
  # @param [Hash] mhead Message headers of a bounce email
18
19
  # @param [String] mbody Message body of a bounce email
19
20
  # @return [Hash] Bounce data list and message/rfc822 part
20
- # @return [Nil] it failed to parse or the arguments are missing
21
+ # @return [Nil] it failed to decode or the arguments are missing
21
22
  def inquire(mhead, mbody)
22
23
  # X-Msg-Ref: server-11.tower-143.messagelabs.com!1419367175!36473369!1
23
24
  # X-Originating-IP: [10.245.230.38]
@@ -1,6 +1,7 @@
1
1
  module Sisimai::Lhost
2
- # Sisimai::Lhost::MessagingServer parses a bounce email which created by Oracle Communications Messaging
3
- # Server and Sun Java System Messaging Server. Methods in the module are called from only Sisimai::Message.
2
+ # Sisimai::Lhost::MessagingServer decodes a bounce email which created by Oracle Communications
3
+ # Messaging Server and Sun Java System Messaging Server https://docs.oracle.com/en/industries/communications/messaging-server/index.html.
4
+ # Methods in the module are called from only Sisimai::Message.
4
5
  module MessagingServer
5
6
  class << self
6
7
  require 'sisimai/lhost'
@@ -10,11 +11,11 @@ module Sisimai::Lhost
10
11
  StartingOf = { message: ['This report relates to a message you sent with the following header fields:'] }.freeze
11
12
  MessagesOf = { 'hostunknown' => ['Illegal host/domain name found'] }.freeze
12
13
 
13
- # Parse bounce messages from MessagingServer
14
+ # @abstract Decodes the bounce message from MessagingServer
14
15
  # @param [Hash] mhead Message headers of a bounce email
15
16
  # @param [String] mbody Message body of a bounce email
16
17
  # @return [Hash] Bounce data list and message/rfc822 part
17
- # @return [Nil] it failed to parse or the arguments are missing
18
+ # @return [Nil] it failed to decode or the arguments are missing
18
19
  def inquire(mhead, mbody)
19
20
  match = 0
20
21
  match += 1 if mhead['content-type'].include?('Boundary_(ID_')
@@ -1,6 +1,6 @@
1
1
  module Sisimai::Lhost
2
- # Sisimai::Lhost::mFILTER parses a bounce email which created by Digital Arts m-FILTER. Methods in
3
- # the module are called from only Sisimai::Message.
2
+ # Sisimai::Lhost::mFILTER decodes a bounce email which created by Digital Arts m-FILTER https://www.daj.jp/bs/mf/.
3
+ # Methods in the module are called from only Sisimai::Message.
4
4
  module MFILTER
5
5
  class << self
6
6
  require 'sisimai/lhost'
@@ -12,11 +12,11 @@ module Sisimai::Lhost
12
12
  command: ['-------SMTP command'],
13
13
  }.freeze
14
14
 
15
- # Parse bounce messages from Digital Arts m-FILTER
15
+ # @abstract Decodes the bounce message from Digital Arts m-FILTER
16
16
  # @param [Hash] mhead Message headers of a bounce email
17
17
  # @param [String] mbody Message body of a bounce email
18
18
  # @return [Hash] Bounce data list and message/rfc822 part
19
- # @return [Nil] it failed to parse or the arguments are missing
19
+ # @return [Nil] it failed to decode or the arguments are missing
20
20
  def inquire(mhead, mbody)
21
21
  # X-Mailer: m-FILTER
22
22
  return nil unless mhead['x-mailer'].to_s == 'm-FILTER'
@@ -1,5 +1,5 @@
1
1
  module Sisimai::Lhost
2
- # Sisimai::Lhost::MXLogic parses a bounce email which created by McAfee SaaS (formerly MX Logic).
2
+ # Sisimai::Lhost::MXLogic decodes a bounce email which created by McAfee SaaS (formerly MXLogic).
3
3
  # Methods in the module are called from only Sisimai::Message.
4
4
  module MXLogic
5
5
  class << self
@@ -67,11 +67,11 @@ module Sisimai::Lhost
67
67
  'was frozen on arrival by ',
68
68
  ].freeze
69
69
 
70
- # Parse bounce messages from MXLogic
70
+ # @abstract Decodes the bounce message from McAfee Saas (Formerly MXLogic)
71
71
  # @param [Hash] mhead Message headers of a bounce email
72
72
  # @param [String] mbody Message body of a bounce email
73
73
  # @return [Hash] Bounce data list and message/rfc822 part
74
- # @return [Nil] it failed to parse or the arguments are missing
74
+ # @return [Nil] it failed to decode or the arguments are missing
75
75
  def inquire(mhead, mbody)
76
76
  # X-MX-Bounce: mta/src/queue/bounce
77
77
  # X-MXL-NoteHash: ffffffffffffffff-0000000000000000000000000000000000000000
@@ -1,6 +1,6 @@
1
1
  module Sisimai::Lhost
2
- # Sisimai::Lhost::Notes parses a bounce email which created by Lotus Notes Server. Methods in the
3
- # module are called from only Sisimai::Message.
2
+ # Sisimai::Lhost::Notes decodes a bounce email which created by HCL Notes (formerly IMB Notes Server
3
+ # (formerly Lotus Notes Server)). Methods in the module are called from only Sisimai::Message.
4
4
  module Notes
5
5
  class << self
6
6
  require 'sisimai/lhost'
@@ -16,11 +16,11 @@ module Sisimai::Lhost
16
16
  'networkerror' => ['Message has exceeded maximum hop count'],
17
17
  }.freeze
18
18
 
19
- # Parse bounce messages from Lotus Notes
19
+ # @abstract Decodes the bounce messages from HCL Notes (Formerly IBM Notes (Formerly Lotus Notes))
20
20
  # @param [Hash] mhead Message headers of a bounce email
21
21
  # @param [String] mbody Message body of a bounce email
22
22
  # @return [Hash] Bounce data list and message/rfc822 part
23
- # @return [Nil] it failed to parse or the arguments are missing
23
+ # @return [Nil] it failed to decode or the arguments are missing
24
24
  def inquire(mhead, mbody)
25
25
  return nil unless mhead['subject'].start_with?('Undeliverable message')
26
26
 
@@ -1,6 +1,6 @@
1
1
  module Sisimai::Lhost
2
- # Sisimai::Lhost::Office365 parses a bounce email which created by Microsoft Office 365. Methods in
3
- # the module are called from only Sisimai::Message.
2
+ # Sisimai::Lhost::Office365 decodes a bounce email which created by Microsoft 365 https://office.microsoft.com/'.
3
+ # Methods in the module are called from only Sisimai::Message.
4
4
  module Office365
5
5
  class << self
6
6
  require 'sisimai/lhost'
@@ -89,11 +89,11 @@ module Sisimai::Lhost
89
89
  RCPT: %r/unknown recipient or mailbox unavailable ->.+[<]?.+[@].+[.][a-zA-Z]+[>]?/,
90
90
  }.freeze
91
91
 
92
- # Parse bounce messages from Microsoft Office 365
92
+ # @abstract decodes the bounce message from Microsoft 365
93
93
  # @param [Hash] mhead Message headers of a bounce email
94
94
  # @param [String] mbody Message body of a bounce email
95
95
  # @return [Hash] Bounce data list and message/rfc822 part
96
- # @return [Nil] it failed to parse or the arguments are missing
96
+ # @return [Nil] it failed to decode or the arguments are missing
97
97
  def inquire(mhead, mbody)
98
98
  # X-MS-Exchange-Message-Is-Ndr:
99
99
  # X-Microsoft-Antispam-PRVS: <....@...outlook.com>
@@ -1,6 +1,6 @@
1
1
  module Sisimai::Lhost
2
- # Sisimai::Lhost::OpenSMTPD parses a bounce email which created by OpenSMTPD. Methods in the module
3
- # are called from only Sisimai::Message.
2
+ # Sisimai::Lhost::OpenSMTPD decodes a bounce email which created by OpenSMTPD https://www.opensmtpd.org/.
3
+ # Methods in the module are called from only Sisimai::Message.
4
4
  module OpenSMTPD
5
5
  class << self
6
6
  require 'sisimai/lhost'
@@ -45,7 +45,11 @@ module Sisimai::Lhost
45
45
  'Domain does not exist',
46
46
  ],
47
47
  # smtp/mta.c:1085| relay->failstr = "Destination seem to reject all mails";
48
- 'notaccept' => ['Destination seem to reject all mails'],
48
+ 'notaccept' => [
49
+ 'Destination seem to reject all mails',
50
+ 'No MX found for domain',
51
+ 'No MX found for destination',
52
+ ],
49
53
  # smtpd/mta.c:972| relay->failstr = "Temporary failure in MX lookup";
50
54
  'networkerror' => [
51
55
  'Address family mismatch on destination MXs',
@@ -54,8 +58,6 @@ module Sisimai::Lhost
54
58
  'Could not retrieve source address',
55
59
  'Loop detected',
56
60
  'Network error on destination MXs',
57
- 'No MX found for domain',
58
- 'No MX found for destination',
59
61
  'No valid route to remote MX',
60
62
  'No valid route to destination',
61
63
  'Temporary failure in MX lookup',
@@ -64,11 +66,11 @@ module Sisimai::Lhost
64
66
  'securityerror' => ['Could not retrieve credentials'],
65
67
  }.freeze
66
68
 
67
- # Parse bounce messages from OpenSMTPD
69
+ # @abstract Decodes the bounce message from OpenSMTPD
68
70
  # @param [Hash] mhead Message headers of a bounce email
69
71
  # @param [String] mbody Message body of a bounce email
70
72
  # @return [Hash] Bounce data list and message/rfc822 part
71
- # @return [Nil] it failed to parse or the arguments are missing
73
+ # @return [Nil] it failed to decode or the arguments are missing
72
74
  def inquire(mhead, mbody)
73
75
  return nil unless mhead['subject'].start_with?('Delivery status notification')
74
76
  return nil unless mhead['from'].start_with?('Mailer Daemon <')
@@ -1,6 +1,6 @@
1
1
  module Sisimai::Lhost
2
- # Sisimai::Lhost::Outlook parses a bounce email which created by Microsoft Outlook.com. Methods in
3
- # the module are called from only Sisimai::Message.
2
+ # Sisimai::Lhost::Outlook decode a bounce email which created by Microsoft outlook.com https://www.outlook.com/.
3
+ # Methods in the module are called from only Sisimai::Message.
4
4
  module Outlook
5
5
  class << self
6
6
  require 'sisimai/lhost'
@@ -13,11 +13,11 @@ module Sisimai::Lhost
13
13
  'userunknown' => ['Requested action not taken: mailbox unavailable'],
14
14
  }.freeze
15
15
 
16
- # Parse bounce messages from Microsoft Outlook.com
16
+ # @abstract Decodes the bounce message from Microsoft Outlook.com
17
17
  # @param [Hash] mhead Message headers of a bounce email
18
18
  # @param [String] mbody Message body of a bounce email
19
19
  # @return [Hash] Bounce data list and message/rfc822 part
20
- # @return [Nil] it failed to parse or the arguments are missing
20
+ # @return [Nil] it failed to decode or the arguments are missing
21
21
  def inquire(mhead, mbody)
22
22
  # X-Message-Delivery: Vj0xLjE7RD0wO0dEPTA7U0NMPTk7bD0xO3VzPTE=
23
23
  # X-Message-Info: AuEzbeVr9u5fkDpn2vR5iCu5wb6HBeY4iruBjnutBzpStnUabbM...
@@ -1,6 +1,6 @@
1
1
  module Sisimai::Lhost
2
- # Sisimai::Lhost::Postfix parses a bounce email which created by Postfix. Methods in the module are
3
- # called from only Sisimai::Message.
2
+ # Sisimai::Lhost::Postfix decodes a bounce email which created by Postfix https://www.postfix.org/.
3
+ # Methods in the module are called from only Sisimai::Message.
4
4
  module Postfix
5
5
  class << self
6
6
  require 'sisimai/lhost'
@@ -20,11 +20,11 @@ module Sisimai::Lhost
20
20
  ],
21
21
  }.freeze
22
22
 
23
- # Parse bounce messages from Postfix
23
+ # @abstract Decodes the bounce message from Postfix
24
24
  # @param [Hash] mhead Message headers of a bounce email
25
25
  # @param [String] mbody Message body of a bounce email
26
26
  # @return [Hash] Bounce data list and message/rfc822 part
27
- # @return [Nil] it failed to parse or the arguments are missing
27
+ # @return [Nil] it failed to decode or the arguments are missing
28
28
  def inquire(mhead, mbody)
29
29
  match = nil
30
30
  sessx = nil
@@ -1,6 +1,6 @@
1
1
  module Sisimai::Lhost
2
- # Sisimai::Lhost::PowerMTA parses a bounce email which created by PowerMTA. Methods in the module
3
- # are called from only Sisimai::Message.
2
+ # Sisimai::Lhost::PowerMTA decodes a bounce email which created by PowerMTA https://bird.com/email/power-mta.
3
+ # Methods in the module are called from only Sisimai::Message.
4
4
  module PowerMTA
5
5
  class << self
6
6
  require 'sisimai/lhost'
@@ -20,11 +20,11 @@ module Sisimai::Lhost
20
20
  'spam-related' => 'spamdetected',
21
21
  }.freeze
22
22
 
23
- # Parse bounce messages from PowerMTA
23
+ # @abstract Decodes the bounce message from PowerMTA
24
24
  # @param [Hash] mhead Message headers of a bounce email
25
25
  # @param [String] mbody Message body of a bounce email
26
26
  # @return [Hash] Bounce data list and message/rfc822 part
27
- # @return [Nil] it failed to parse or the arguments are missing
27
+ # @return [Nil] it failed to decode or the arguments are missing
28
28
  # @since v4.25.6
29
29
  def inquire(mhead, mbody)
30
30
  return nil unless mhead['subject'].to_s.start_with?('Delivery report')
@@ -1,6 +1,7 @@
1
1
  module Sisimai::Lhost
2
- # Sisimai::Lhost::Qmail parses a bounce email which created by qmail. Methods in the module are called
3
- # from only Sisimai::Message.
2
+ # Sisimai::Lhost::Qmail decodes a bounce email which created by qmail https://cr.yp.to/qmail.html
3
+ # or qmail clones or notqmail https://notqmail.org/.
4
+ # Methods in the module are called from only Sisimai::Message.
4
5
  module Qmail
5
6
  class << self
6
7
  require 'sisimai/lhost'
@@ -79,18 +80,21 @@ module Sisimai::Lhost
79
80
  'system error',
80
81
  'Unable to',
81
82
  ],
83
+ 'notaccept' => [
84
+ # notqmail 1.08 returns the following error message when the destination MX is NullMX
85
+ "Sorry, I couldn't find a mail exchanger or IP address",
86
+ ],
82
87
  'networkerror' => [
83
88
  "Sorry, I wasn't able to establish an SMTP connection",
84
- "Sorry, I couldn't find a mail exchanger or IP address",
85
89
  "Sorry. Although I'm listed as a best-preference MX or A for that host",
86
90
  ],
87
91
  }.freeze
88
92
 
89
- # Parse bounce messages from qmail
93
+ # @abstract Decodes the bounce message from qmail
90
94
  # @param [Hash] mhead Message headers of a bounce email
91
95
  # @param [String] mbody Message body of a bounce email
92
96
  # @return [Hash] Bounce data list and message/rfc822 part
93
- # @return [Nil] it failed to parse or the arguments are missing
97
+ # @return [Nil] it failed to decode or the arguments are missing
94
98
  def inquire(mhead, mbody)
95
99
  # Pre process email headers and the body part of the message which generated
96
100
  # by qmail, see https://cr.yp.to/qmail.html
@@ -181,11 +185,7 @@ module Sisimai::Lhost
181
185
  end
182
186
 
183
187
  # Detect the reason of bounce
184
- if e['command'] == 'MAIL'
185
- # MAIL | Connected to 192.0.2.135 but sender was rejected.
186
- e['reason'] = 'rejected'
187
-
188
- elsif %w[HELO EHLO].index(e['command'])
188
+ if %w[HELO EHLO].index(e['command'])
189
189
  # HELO | Connected to 192.0.2.135 but my name was rejected.
190
190
  e['reason'] = 'blocked'
191
191
  else
@@ -1,6 +1,6 @@
1
1
  module Sisimai::Lhost
2
- # Sisimai::Lhost::ReceivingSES parses a bounce email which created by Amazon Simple Email Service.
3
- # Methods in the module are called from only Sisimai::Message.
2
+ # Sisimai::Lhost::ReceivingSES decodes a bounce email which created by Amazon Simple Email Service
3
+ # https://aws.amazon.com/ses. Methods in the module are called from only Sisimai::Message.
4
4
  module ReceivingSES
5
5
  class << self
6
6
  require 'sisimai/lhost'
@@ -17,11 +17,11 @@ module Sisimai::Lhost
17
17
  'contenterror' => ['Message content rejected'],
18
18
  }.freeze
19
19
 
20
- # Parse bounce messages from Amazon SES/Receiving
20
+ # @abstract Decodes the bounce message from Amazon SES/Receiving
21
21
  # @param [Hash] mhead Message headers of a bounce email
22
22
  # @param [String] mbody Message body of a bounce email
23
23
  # @return [Hash] Bounce data list and message/rfc822 part
24
- # @return [Nil] it failed to parse or the arguments are missing
24
+ # @return [Nil] it failed to decode or the arguments are missing
25
25
  def inquire(mhead, mbody)
26
26
  # X-SES-Outgoing: 2015.10.01-54.240.27.7
27
27
  # Feedback-ID: 1.us-west-2.HX6/J9OVlHTadQhEu1+wdF9DBj6n6Pa9sW5Y/0pSOi8=:AmazonSES
@@ -1,6 +1,6 @@
1
1
  module Sisimai::Lhost
2
- # Sisimai::Lhost::SendGrid parses a bounce email which created by SendGrid. Methods in the module
3
- # are called from only Sisimai::Message.
2
+ # Sisimai::Lhost::SendGrid decodes a bounce email which created by Twilio SendGrid https://sendgrid.com/.
3
+ # Methods in the module are called from only Sisimai::Message.
4
4
  module SendGrid
5
5
  class << self
6
6
  require 'sisimai/lhost'
@@ -9,11 +9,11 @@ module Sisimai::Lhost
9
9
  Boundaries = ['Content-Type: message/rfc822'].freeze
10
10
  StartingOf = { message: ['This is an automatically generated message from SendGrid.'] }.freeze
11
11
 
12
- # Parse bounce messages from SendGrid
12
+ # @abstract Decodes the bounce message from Twilio SendGrid
13
13
  # @param [Hash] mhead Message headers of a bounce email
14
14
  # @param [String] mbody Message body of a bounce email
15
15
  # @return [Hash] Bounce data list and message/rfc822 part
16
- # @return [Nil] it failed to parse or the arguments are missing
16
+ # @return [Nil] it failed to decode or the arguments are missing
17
17
  def inquire(mhead, mbody)
18
18
  # Return-Path: <apps@sendgrid.net>
19
19
  # X-Mailer: MIME-tools 5.502 (Entity 5.502)
@@ -1,6 +1,6 @@
1
1
  module Sisimai::Lhost
2
- # Sisimai::Lhost::Sendmail parses a bounce email which created by v8 Sendmail. Methods in the module
3
- # are called from only Sisimai::Message.
2
+ # Sisimai::Lhost::Sendmail decodes a bounce email which created by Sendmail Open Source https://sendmail.org/.
3
+ # Methods in the module are called from only Sisimai::Message.
4
4
  module Sendmail
5
5
  class << self
6
6
  require 'sisimai/lhost'
@@ -23,11 +23,11 @@ module Sisimai::Lhost
23
23
  error: ['... while talking to '],
24
24
  }.freeze
25
25
 
26
- # Parse bounce messages from Sendmail
26
+ # @abstract Decodes the bounce message from Sendmail Open Source
27
27
  # @param [Hash] mhead Message headers of a bounce email
28
28
  # @param [String] mbody Message body of a bounce email
29
29
  # @return [Hash] Bounce data list and message/rfc822 part
30
- # @return [Nil] it failed to parse or the arguments are missing
30
+ # @return [Nil] it failed to decode or the arguments are missing
31
31
  def inquire(mhead, mbody)
32
32
  return nil if mhead['x-aol-ip']
33
33
  match = nil
@@ -1,5 +1,5 @@
1
1
  module Sisimai::Lhost
2
- # Sisimai::Lhost::SurfControl parses a bounce email which created by WebSense SurfControl.
2
+ # Sisimai::Lhost::SurfControl decodes a bounce email which created by WebSense SurfControl.
3
3
  # Methods in the module are called from only Sisimai::Message.
4
4
  module SurfControl
5
5
  class << self
@@ -9,11 +9,11 @@ module Sisimai::Lhost
9
9
  Boundaries = ['Content-Type: message/rfc822'].freeze
10
10
  StartingOf = { message: ['Your message could not be sent.'] }.freeze
11
11
 
12
- # Parse bounce messages from SurfControl
12
+ # @abstract Decodes the bounce message from SurfControl
13
13
  # @param [Hash] mhead Message headers of a bounce email
14
14
  # @param [String] mbody Message body of a bounce email
15
15
  # @return [Hash] Bounce data list and message/rfc822 part
16
- # @return [Nil] it failed to parse or the arguments are missing
16
+ # @return [Nil] it failed to decode or the arguments are missing
17
17
  def inquire(mhead, mbody)
18
18
  # X-SEF-ZeroHour-RefID: fgs=000000000
19
19
  # X-SEF-Processed: 0_0_0_000__2010_04_29_23_34_45
@@ -77,7 +77,7 @@ module Sisimai::Lhost
77
77
  v['diagnosis'] = Sisimai::String.sweep(e[p2 + 2, e.size])
78
78
 
79
79
  else
80
- # Fallback, parse RFC3464 headers.
80
+ # Fallback, Decode RFC3464 headers.
81
81
  if f = Sisimai::RFC1894.match(e)
82
82
  # "e" matched with any field defined in RFC3464
83
83
  next unless o = Sisimai::RFC1894.field(e)
@@ -1,6 +1,7 @@
1
1
  module Sisimai::Lhost
2
- # Sisimai::Lhost::V5sendmail parses a bounce email which created by Sendmail version 5. Methods in
3
- # the module are called from only Sisimai::Message.
2
+ # Sisimai::Lhost::V5sendmail decodes a bounce email which created by Sendmail version 5 or any
3
+ # email appliances based on Sendmail version 5.
4
+ # Methods in the module are called from only Sisimai::Message.
4
5
  module V5sendmail
5
6
  class << self
6
7
  require 'sisimai/lhost'
@@ -28,11 +29,11 @@ module Sisimai::Lhost
28
29
  message: ['----- Transcript of session follows -----'],
29
30
  }.freeze
30
31
 
31
- # Parse bounce messages from Sendmail version 5
32
+ # @abstract Decodes the bounce message from Sendmail version 5
32
33
  # @param [Hash] mhead Message headers of a bounce email
33
34
  # @param [String] mbody Message body of a bounce email
34
35
  # @return [Hash] Bounce data list and message/rfc822 part
35
- # @return [Nil] it failed to parse or the arguments are missing
36
+ # @return [Nil] it failed to decode or the arguments are missing
36
37
  def inquire(mhead, mbody)
37
38
  # :from => %r/\AMail Delivery Subsystem/,
38
39
  return nil unless mhead['subject'].start_with?('Returned mail: ')
@@ -1,16 +1,16 @@
1
1
  module Sisimai::Lhost
2
- # Sisimai::Lhost::Verizon parses a bounce email which created by Verizon Wireless. Methods in the
3
- # module are called from only Sisimai::Message.
2
+ # Sisimai::Lhost::Verizon decodes a bounce email which created by Verizon https://www.verizon.com/.
3
+ # Methods in the module are called from only Sisimai::Message.
4
4
  module Verizon
5
5
  class << self
6
6
  require 'sisimai/lhost'
7
7
  Indicators = Sisimai::Lhost.INDICATORS
8
8
 
9
- # Parse bounce messages from Verizon
9
+ # @abstract Decodes the bounce message from Verizon
10
10
  # @param [Hash] mhead Message headers of a bounce email
11
11
  # @param [String] mbody Message body of a bounce email
12
12
  # @return [Hash] Bounce data list and message/rfc822 part
13
- # @return [Nil] it failed to parse or the arguments are missing
13
+ # @return [Nil] it failed to decode or the arguments are missing
14
14
  def inquire(mhead, mbody)
15
15
  match = -1
16
16
  while true
@@ -1,5 +1,5 @@
1
1
  module Sisimai::Lhost
2
- # Sisimai::Lhost::X1 parses a bounce email which created by Unknown MTA #1. Methods in the module
2
+ # Sisimai::Lhost::X1 decodes a bounce email which created by Unknown MTA #1. Methods in the module
3
3
  # are called from only Sisimai::Message.
4
4
  module X1
5
5
  class << self
@@ -9,11 +9,11 @@ module Sisimai::Lhost
9
9
  Boundaries = ['Received: from '].freeze
10
10
  MarkingsOf = { message: ['The original message was received at '] }.freeze
11
11
 
12
- # Parse bounce messages from Unknown MTA #1
12
+ # @abstract Decodes the bounce message from Unknown MTA #1
13
13
  # @param [Hash] mhead Message headers of a bounce email
14
14
  # @param [String] mbody Message body of a bounce email
15
15
  # @return [Hash] Bounce data list and message/rfc822 part
16
- # @return [Nil] it failed to parse or the arguments are missing
16
+ # @return [Nil] it failed to decode or the arguments are missing
17
17
  def inquire(mhead, mbody)
18
18
  return nil unless mhead['subject'].start_with?('Returned Mail: ')
19
19
  return nil unless mhead['from'].start_with?('"Mail Deliver System" ')
@@ -1,5 +1,5 @@
1
1
  module Sisimai::Lhost
2
- # Sisimai::Lhost::X2 parses a bounce email which created by Unknown MTA #2. Methods in the module
2
+ # Sisimai::Lhost::X2 decodes a bounce email which created by Unknown MTA #2. Methods in the module
3
3
  # are called from only Sisimai::Message.
4
4
  module X2
5
5
  class << self
@@ -9,11 +9,11 @@ module Sisimai::Lhost
9
9
  Boundaries = ['--- Original message follows.'].freeze
10
10
  StartingOf = { message: ['Unable to deliver message to the following address'] }.freeze
11
11
 
12
- # Parse bounce messages from Unknown MTA #2
12
+ # @abstract Decodes the bounce message from Unknown MTA #2
13
13
  # @param [Hash] mhead Message headers of a bounce email
14
14
  # @param [String] mbody Message body of a bounce email
15
15
  # @return [Hash] Bounce data list and message/rfc822 part
16
- # @return [Nil] it failed to parse or the arguments are missing
16
+ # @return [Nil] it failed to decode or the arguments are missing
17
17
  def inquire(mhead, mbody)
18
18
  match = nil
19
19
  match ||= 1 if mhead['from'].include?('MAILER-DAEMON@')
@@ -1,5 +1,5 @@
1
1
  module Sisimai::Lhost
2
- # Sisimai::Lhost::X3 parses a bounce email which created by Unknown MTA #3. Methods in the module
2
+ # Sisimai::Lhost::X3 decodes a bounce email which created by Unknown MTA #3. Methods in the module
3
3
  # are called from only Sisimai::Message.
4
4
  module X3
5
5
  class << self
@@ -9,11 +9,11 @@ module Sisimai::Lhost
9
9
  Boundaries = ['Content-Type: message/rfc822'].freeze
10
10
  StartingOf = { message: [' This is an automatically generated Delivery Status Notification.'] }.freeze
11
11
 
12
- # Parse bounce messages from Unknown MTA #3
12
+ # @abstract Decodes the bounce message from Unknown MTA #3
13
13
  # @param [Hash] mhead Message headers of a bounce email
14
14
  # @param [String] mbody Message body of a bounce email
15
15
  # @return [Hash] Bounce data list and message/rfc822 part
16
- # @return [Nil] it failed to parse or the arguments are missing
16
+ # @return [Nil] it failed to decode or the arguments are missing
17
17
  def inquire(mhead, mbody)
18
18
  return nil unless mhead['subject'].start_with?('Delivery status notification')
19
19
  return nil unless mhead['from'].start_with?('Mail Delivery System')
@@ -1,5 +1,5 @@
1
1
  module Sisimai::Lhost
2
- # Sisimai::Lhost::X4 parses a bounce email which created by some qmail clone. Methods in the module
2
+ # Sisimai::Lhost::X4 decodes a bounce email which created by some qmail clone. Methods in the module
3
3
  # are called from only Sisimai::Message.
4
4
  module X4
5
5
  class << self
@@ -122,11 +122,11 @@ module Sisimai::Lhost
122
122
  ],
123
123
  }.freeze
124
124
 
125
- # Parse bounce messages from Unknown MTA #4
125
+ # @abstract Decodes the bounce message from Unknown MTA #4
126
126
  # @param [Hash] mhead Message headers of a bounce email
127
127
  # @param [String] mbody Message body of a bounce email
128
128
  # @return [Hash] Bounce data list and message/rfc822 part
129
- # @return [Nil] it failed to parse or the arguments are missing
129
+ # @return [Nil] it failed to decode or the arguments are missing
130
130
  def inquire(mhead, mbody)
131
131
  # Pre process email headers and the body part of the message which generated by qmail, see
132
132
  # https://cr.yp.to/qmail.html