sisimai 5.0.3-java → 5.1.0-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (157) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/codecovio.yml +3 -1
  3. data/.github/workflows/rake-test.yml +6 -2
  4. data/ChangeLog.md +34 -0
  5. data/README-JA.md +20 -17
  6. data/README.md +20 -17
  7. data/lib/sisimai/arf.rb +3 -3
  8. data/lib/sisimai/fact/json.rb +2 -2
  9. data/lib/sisimai/fact/yaml.rb +2 -2
  10. data/lib/sisimai/fact.rb +4 -19
  11. data/lib/sisimai/lhost/activehunter.rb +4 -3
  12. data/lib/sisimai/lhost/amavis.rb +4 -4
  13. data/lib/sisimai/lhost/amazonses.rb +6 -6
  14. data/lib/sisimai/lhost/amazonworkmail.rb +4 -4
  15. data/lib/sisimai/lhost/aol.rb +4 -4
  16. data/lib/sisimai/lhost/apachejames.rb +4 -4
  17. data/lib/sisimai/lhost/barracuda.rb +4 -4
  18. data/lib/sisimai/lhost/bigfoot.rb +4 -4
  19. data/lib/sisimai/lhost/biglobe.rb +4 -4
  20. data/lib/sisimai/lhost/courier.rb +4 -4
  21. data/lib/sisimai/lhost/domino.rb +4 -4
  22. data/lib/sisimai/lhost/dragonfly.rb +114 -0
  23. data/lib/sisimai/lhost/einsundeins.rb +4 -4
  24. data/lib/sisimai/lhost/exchange2003.rb +4 -3
  25. data/lib/sisimai/lhost/exchange2007.rb +4 -3
  26. data/lib/sisimai/lhost/exim.rb +4 -4
  27. data/lib/sisimai/lhost/ezweb.rb +4 -4
  28. data/lib/sisimai/lhost/facebook.rb +4 -4
  29. data/lib/sisimai/lhost/fml.rb +4 -4
  30. data/lib/sisimai/lhost/gmail.rb +4 -4
  31. data/lib/sisimai/lhost/gmx.rb +4 -4
  32. data/lib/sisimai/lhost/googlegroups.rb +4 -4
  33. data/lib/sisimai/lhost/gsuite.rb +4 -4
  34. data/lib/sisimai/lhost/imailserver.rb +4 -3
  35. data/lib/sisimai/lhost/interscanmss.rb +5 -4
  36. data/lib/sisimai/lhost/kddi.rb +4 -4
  37. data/lib/sisimai/lhost/mailfoundry.rb +4 -4
  38. data/lib/sisimai/lhost/mailmarshalsmtp.rb +5 -4
  39. data/lib/sisimai/lhost/mailru.rb +4 -4
  40. data/lib/sisimai/lhost/mcafee.rb +4 -4
  41. data/lib/sisimai/lhost/messagelabs.rb +4 -3
  42. data/lib/sisimai/lhost/messagingserver.rb +5 -4
  43. data/lib/sisimai/lhost/mfilter.rb +4 -4
  44. data/lib/sisimai/lhost/mxlogic.rb +3 -3
  45. data/lib/sisimai/lhost/notes.rb +4 -4
  46. data/lib/sisimai/lhost/office365.rb +4 -4
  47. data/lib/sisimai/lhost/opensmtpd.rb +9 -7
  48. data/lib/sisimai/lhost/outlook.rb +4 -4
  49. data/lib/sisimai/lhost/postfix.rb +4 -4
  50. data/lib/sisimai/lhost/powermta.rb +4 -4
  51. data/lib/sisimai/lhost/qmail.rb +10 -10
  52. data/lib/sisimai/lhost/receivingses.rb +4 -4
  53. data/lib/sisimai/lhost/sendgrid.rb +4 -4
  54. data/lib/sisimai/lhost/sendmail.rb +4 -4
  55. data/lib/sisimai/lhost/surfcontrol.rb +4 -4
  56. data/lib/sisimai/lhost/v5sendmail.rb +5 -4
  57. data/lib/sisimai/lhost/verizon.rb +4 -4
  58. data/lib/sisimai/lhost/x1.rb +3 -3
  59. data/lib/sisimai/lhost/x2.rb +3 -3
  60. data/lib/sisimai/lhost/x3.rb +3 -3
  61. data/lib/sisimai/lhost/x4.rb +3 -3
  62. data/lib/sisimai/lhost/x5.rb +3 -3
  63. data/lib/sisimai/lhost/x6.rb +3 -3
  64. data/lib/sisimai/lhost/yahoo.rb +4 -4
  65. data/lib/sisimai/lhost/yandex.rb +4 -4
  66. data/lib/sisimai/lhost/zoho.rb +4 -4
  67. data/lib/sisimai/lhost.rb +5 -5
  68. data/lib/sisimai/mail/maildir.rb +1 -1
  69. data/lib/sisimai/mail/stdin.rb +1 -1
  70. data/lib/sisimai/mda.rb +3 -3
  71. data/lib/sisimai/message.rb +8 -8
  72. data/lib/sisimai/order.rb +1 -0
  73. data/lib/sisimai/reason/badreputation.rb +1 -1
  74. data/lib/sisimai/reason/norelaying.rb +1 -0
  75. data/lib/sisimai/reason/rejected.rb +1 -0
  76. data/lib/sisimai/reason.rb +8 -8
  77. data/lib/sisimai/rfc3464.rb +3 -3
  78. data/lib/sisimai/rfc3834.rb +2 -2
  79. data/lib/sisimai/rhost/apple.rb +92 -0
  80. data/lib/sisimai/rhost/cox.rb +81 -32
  81. data/lib/sisimai/rhost/franceptt.rb +84 -81
  82. data/lib/sisimai/rhost/godaddy.rb +205 -43
  83. data/lib/sisimai/rhost/google.rb +3 -5
  84. data/lib/sisimai/rhost/iua.rb +2 -2
  85. data/lib/sisimai/rhost/kddi.rb +6 -5
  86. data/lib/sisimai/rhost/microsoft.rb +4 -5
  87. data/lib/sisimai/rhost/mimecast.rb +15 -4
  88. data/lib/sisimai/rhost/nttdocomo.rb +1 -1
  89. data/lib/sisimai/rhost/spectrum.rb +100 -40
  90. data/lib/sisimai/rhost/tencent.rb +46 -25
  91. data/lib/sisimai/rhost/yahooinc.rb +110 -0
  92. data/lib/sisimai/rhost.rb +28 -35
  93. data/lib/sisimai/smtp/reply.rb +4 -3
  94. data/lib/sisimai/smtp/transcript.rb +3 -3
  95. data/lib/sisimai/version.rb +1 -1
  96. data/lib/sisimai.rb +0 -6
  97. data/set-of-emails/maildir/bsd/lhost-dragonfly-01.eml +36 -0
  98. data/set-of-emails/maildir/bsd/lhost-dragonfly-02.eml +32 -0
  99. data/set-of-emails/maildir/bsd/lhost-dragonfly-03.eml +32 -0
  100. data/set-of-emails/maildir/bsd/lhost-dragonfly-04.eml +31 -0
  101. data/set-of-emails/maildir/bsd/lhost-dragonfly-05.eml +32 -0
  102. data/set-of-emails/maildir/bsd/lhost-dragonfly-06.eml +32 -0
  103. data/set-of-emails/maildir/bsd/lhost-dragonfly-07.eml +32 -0
  104. data/set-of-emails/maildir/bsd/lhost-dragonfly-08.eml +32 -0
  105. data/set-of-emails/maildir/bsd/lhost-dragonfly-09.eml +32 -0
  106. data/set-of-emails/maildir/bsd/lhost-dragonfly-10.eml +32 -0
  107. data/set-of-emails/maildir/bsd/lhost-dragonfly-11.eml +32 -0
  108. data/set-of-emails/maildir/bsd/lhost-dragonfly-12.eml +32 -0
  109. data/set-of-emails/maildir/bsd/lhost-dragonfly-13.eml +32 -0
  110. data/set-of-emails/maildir/bsd/lhost-dragonfly-14.eml +32 -0
  111. data/set-of-emails/maildir/bsd/lhost-dragonfly-15.eml +32 -0
  112. data/set-of-emails/maildir/bsd/lhost-dragonfly-16.eml +32 -0
  113. data/set-of-emails/maildir/bsd/lhost-dragonfly-17.eml +32 -0
  114. data/set-of-emails/maildir/bsd/lhost-dragonfly-18.eml +32 -0
  115. data/set-of-emails/maildir/bsd/lhost-dragonfly-19.eml +32 -0
  116. data/set-of-emails/maildir/bsd/lhost-dragonfly-20.eml +32 -0
  117. data/set-of-emails/maildir/bsd/lhost-dragonfly-21.eml +33 -0
  118. data/set-of-emails/maildir/bsd/lhost-dragonfly-22.eml +32 -0
  119. data/set-of-emails/maildir/bsd/lhost-dragonfly-23.eml +32 -0
  120. data/set-of-emails/maildir/bsd/lhost-dragonfly-24.eml +32 -0
  121. data/set-of-emails/maildir/bsd/lhost-dragonfly-25.eml +33 -0
  122. data/set-of-emails/maildir/bsd/lhost-dragonfly-26.eml +33 -0
  123. data/set-of-emails/maildir/bsd/lhost-dragonfly-27.eml +47 -0
  124. data/set-of-emails/maildir/bsd/lhost-dragonfly-28.eml +47 -0
  125. data/set-of-emails/maildir/bsd/lhost-dragonfly-29.eml +32 -0
  126. data/set-of-emails/maildir/bsd/lhost-dragonfly-30.eml +32 -0
  127. data/set-of-emails/maildir/bsd/lhost-opensmtpd-10.eml +58 -0
  128. data/set-of-emails/maildir/bsd/lhost-opensmtpd-11.eml +58 -0
  129. data/set-of-emails/maildir/bsd/lhost-opensmtpd-12.eml +62 -0
  130. data/set-of-emails/maildir/bsd/lhost-opensmtpd-13.eml +62 -0
  131. data/set-of-emails/maildir/bsd/lhost-opensmtpd-14.eml +58 -0
  132. data/set-of-emails/maildir/bsd/lhost-opensmtpd-15.eml +63 -0
  133. data/set-of-emails/maildir/bsd/lhost-opensmtpd-16.eml +62 -0
  134. data/set-of-emails/maildir/bsd/lhost-opensmtpd-17.eml +63 -0
  135. data/set-of-emails/maildir/bsd/lhost-qmail-11.eml +29 -0
  136. data/set-of-emails/maildir/bsd/lhost-qmail-12.eml +29 -0
  137. data/set-of-emails/maildir/bsd/lhost-qmail-13.eml +29 -0
  138. data/set-of-emails/maildir/bsd/lhost-qmail-14.eml +34 -0
  139. data/set-of-emails/maildir/bsd/lhost-qmail-15.eml +30 -0
  140. data/set-of-emails/maildir/bsd/lhost-qmail-16.eml +31 -0
  141. data/set-of-emails/maildir/bsd/lhost-qmail-17.eml +38 -0
  142. data/set-of-emails/maildir/bsd/lhost-qmail-18.eml +31 -0
  143. data/set-of-emails/maildir/bsd/lhost-qmail-19.eml +31 -0
  144. data/set-of-emails/maildir/bsd/lhost-qmail-20.eml +46 -0
  145. data/set-of-emails/maildir/bsd/lhost-qmail-21.eml +41 -0
  146. data/set-of-emails/maildir/bsd/lhost-qmail-22.eml +42 -0
  147. data/set-of-emails/maildir/bsd/lhost-qmail-23.eml +43 -0
  148. data/set-of-emails/maildir/bsd/lhost-qmail-24.eml +43 -0
  149. data/set-of-emails/maildir/bsd/lhost-qmail-25.eml +54 -0
  150. data/set-of-emails/maildir/bsd/rhost-apple-01.eml +79 -0
  151. data/set-of-emails/maildir/bsd/rhost-apple-02.eml +81 -0
  152. data/set-of-emails/maildir/bsd/rhost-apple-03.eml +75 -0
  153. data/set-of-emails/maildir/bsd/rhost-apple-04.eml +74 -0
  154. data/set-of-emails/maildir/bsd/rhost-yahooinc-01.eml +80 -0
  155. data/set-of-emails/maildir/bsd/rhost-yahooinc-02.eml +83 -0
  156. data/set-of-emails/maildir/bsd/rhost-yahooinc-03.eml +125 -0
  157. metadata +65 -2
@@ -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
@@ -1,5 +1,5 @@
1
1
  module Sisimai::Lhost
2
- # Sisimai::Lhost::X5 parses a bounce email which created by Unknown MTA #5. Methods in the module
2
+ # Sisimai::Lhost::X5 decodes a bounce email which created by Unknown MTA #5. Methods in the module
3
3
  # are called from only Sisimai::Message.
4
4
  module X5
5
5
  class << self
@@ -9,11 +9,11 @@ module Sisimai::Lhost
9
9
  Boundaries = ['Content-Type: message/rfc822'].freeze
10
10
  StartingOf = { message: ['Content-Type: message/delivery-status'] }.freeze
11
11
 
12
- # Parse bounce messages from Unknown MTA #5
12
+ # @abstract Decodes the bounce message from Unknown MTA #5
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 = 0
19
19
  match += 1 if mhead['to'].to_s.include?('NotificationRecipients')
@@ -1,5 +1,5 @@
1
1
  module Sisimai::Lhost
2
- # Sisimai::Lhost::X6 parses a bounce email which created by Unknown MTA #6. Methods in the module
2
+ # Sisimai::Lhost::X6 decodes a bounce email which created by Unknown MTA #6. Methods in the module
3
3
  # are called from only Sisimai::Message.
4
4
  module X6
5
5
  class << self
@@ -9,11 +9,11 @@ module Sisimai::Lhost
9
9
  Boundaries = ['The attachment contains the original mail headers'].freeze
10
10
  StartingOf = { message: ['We had trouble delivering your message. Full details follow:'] }.freeze
11
11
 
12
- # Parse bounce messages from Unknown MTA #6
12
+ # @abstract Decodes the bounce message from Unknown MTA #6
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
  # @since v4.25.6
18
18
  def inquire(mhead, mbody)
19
19
  return nil unless mhead['subject'].start_with?('There was an error sending your mail')
@@ -1,6 +1,6 @@
1
1
  module Sisimai::Lhost
2
- # Sisimai::Lhost::Yahoo parses a bounce email which created by Yahoo! MAIL. Methods in the module
3
- # are called from only Sisimai::Message.
2
+ # Sisimai::Lhost::Yahoo decodes a bounce email which created by Yahoo Mail https://mail.yahoo.com/.
3
+ # Methods in the module are called from only Sisimai::Message.
4
4
  module Yahoo
5
5
  class << self
6
6
  require 'sisimai/lhost'
@@ -9,11 +9,11 @@ module Sisimai::Lhost
9
9
  Boundaries = ['--- Below this line is a copy of the message.'].freeze
10
10
  StartingOf = { message: ['Sorry, we were unable to deliver your message'] }.freeze
11
11
 
12
- # Parse bounce messages from Yahoo! MAIL
12
+ # @abstract Decodes the bounce message from Yahoo Mail
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-YMailISG: YtyUVyYWLDsbDh...
19
19
  # X-YMail-JAS: Pb65aU4VM1mei...
@@ -1,6 +1,6 @@
1
1
  module Sisimai::Lhost
2
- # Sisimai::Lhost::Yandex parses a bounce email which created by Yandex.Mail. Methods in the module
3
- # are called from only Sisimai::Message.
2
+ # Sisimai::Lhost::Yandex decodes a bounce email which created by Yandex Mail https://360.yandex.com/mail/'.
3
+ # Methods in the module are called from only Sisimai::Message.
4
4
  module Yandex
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 the mail system at host yandex.ru.'] }.freeze
11
11
 
12
- # Parse bounce messages from Yandex.Mail
12
+ # @abstract Decodes the bounce message from Yandex Mail
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-Yandex-Front: mxback1h.mail.yandex.net
19
19
  # X-Yandex-TimeMark: 1417885948
@@ -1,6 +1,6 @@
1
1
  module Sisimai::Lhost
2
- # Sisimai::Lhost::Zoho parses a bounce email which created by Zoho Mail. Methods in the module are
3
- # called from only Sisimai::Message.
2
+ # Sisimai::Lhost::Zoho decodes a bounce email which created by Zoho Mail https://www.zoho.com/mail/.
3
+ # Methods in the module are called from only Sisimai::Message.
4
4
  module Zoho
5
5
  class << self
6
6
  require 'sisimai/lhost'
@@ -10,11 +10,11 @@ module Sisimai::Lhost
10
10
  StartingOf = { message: ['This message was created automatically by mail delivery'] }.freeze
11
11
  MessagesOf = { 'expired' => ['Host not reachable'] }.freeze
12
12
 
13
- # Parse bounce messages from Zoho Mail
13
+ # @abstract Decodes the bounce message from Zoho Mail
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-ZohoMail: Si CHF_MF_NL SS_10 UW48 UB48 FMWL UW48 UB48 SGR3_1_09124_42
20
20
  # X-Zoho-Virus-Status: 2
data/lib/sisimai/lhost.rb CHANGED
@@ -4,7 +4,7 @@ module Sisimai
4
4
  class << self
5
5
  require 'sisimai/rfc5322'
6
6
 
7
- # Data structure for parsed bounce messages
7
+ # @abstract Returns the data structure for decoded bounce messages
8
8
  # @return [Hash] Data structure for delivery status
9
9
  # @private
10
10
  def DELIVERYSTATUS
@@ -42,8 +42,8 @@ module Sisimai
42
42
  def index
43
43
  return %w[
44
44
  Activehunter Amavis AmazonSES AmazonWorkMail Aol ApacheJames Barracuda Bigfoot Biglobe
45
- Courier Domino EZweb EinsUndEins Exchange2003 Exchange2007 Exim FML Facebook GMX GSuite
46
- GoogleGroups Gmail IMailServer InterScanMSS KDDI MXLogic MailFoundry MailMarshalSMTP
45
+ Courier Domino DragonFly EZweb EinsUndEins Exchange2003 Exchange2007 Exim FML Facebook GMX
46
+ GSuite GoogleGroups Gmail IMailServer InterScanMSS KDDI MXLogic MailFoundry MailMarshalSMTP
47
47
  MailRu McAfee MessageLabs MessagingServer Notes Office365 OpenSMTPD Outlook Postfix
48
48
  PowerMTA ReceivingSES SendGrid Sendmail SurfControl V5sendmail Verizon X1 X2 X3 X4 X5 X6
49
49
  Yahoo Yandex Zoho MFILTER Qmail
@@ -64,11 +64,11 @@ module Sisimai
64
64
  return table
65
65
  end
66
66
 
67
- # @abstract Parse bounce messages
67
+ # @abstract decode bounce messages
68
68
  # @param [Hash] mhead Message headers of a bounce email
69
69
  # @param [String] mbody Message body of a bounce email
70
70
  # @return [Hash] Bounce data list and message/rfc822 part
71
- # @return [Nil] it failed to parse or the arguments are missing
71
+ # @return [Nil] it failed to decode or the arguments are missing
72
72
  def inquire; return nil; end
73
73
  def description; return ''; end
74
74
  end
@@ -27,7 +27,7 @@ module Sisimai
27
27
  @handle = Dir.open(argv1)
28
28
  end
29
29
 
30
- # Maildir reader, works as a iterator.
30
+ # Maildir reader, works as an iterator.
31
31
  # @return [String] Contents of file in Maildir/
32
32
  def read
33
33
  return nil unless self.offset < self.size
@@ -21,7 +21,7 @@ module Sisimai
21
21
  @handle = stdin
22
22
  end
23
23
 
24
- # Mbox reader, works as a iterator.
24
+ # Mbox reader, works as an iterator.
25
25
  # @return [String] Contents of mbox
26
26
  def read
27
27
  readhandle = self.handle
data/lib/sisimai/mda.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Sisimai
2
- # Sisimai::MDA - Error message parser for MDA
2
+ # Sisimai::MDA - Error message decoder for MDA
3
3
  module MDA
4
4
  class << self
5
5
  AgentNames = {
@@ -66,11 +66,11 @@ module Sisimai
66
66
  },
67
67
  }.freeze
68
68
 
69
- # Parse message body and return reason and text
69
+ # @abstract Decodes the message body and return the MDA name, the reason, and the error message
70
70
  # @param [Hash] mhead Message headers of a bounce email
71
71
  # @param [String] mbody Message body of a bounce email
72
72
  # @return [Hash] Bounce data list and message/rfc822 part
73
- # @return [Nil] it failed to parse or the arguments are missing
73
+ # @return [Nil] it failed to decode or the arguments are missing
74
74
  def inquire(mhead, mbody)
75
75
  return nil unless mhead
76
76
  return nil unless mbody.size > 0