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.
- checksums.yaml +4 -4
- data/.github/workflows/codecovio.yml +3 -1
- data/.github/workflows/rake-test.yml +6 -2
- data/ChangeLog.md +34 -0
- data/README-JA.md +20 -17
- data/README.md +20 -17
- data/lib/sisimai/arf.rb +3 -3
- data/lib/sisimai/fact/json.rb +2 -2
- data/lib/sisimai/fact/yaml.rb +2 -2
- data/lib/sisimai/fact.rb +4 -19
- data/lib/sisimai/lhost/activehunter.rb +4 -3
- data/lib/sisimai/lhost/amavis.rb +4 -4
- data/lib/sisimai/lhost/amazonses.rb +6 -6
- data/lib/sisimai/lhost/amazonworkmail.rb +4 -4
- data/lib/sisimai/lhost/aol.rb +4 -4
- data/lib/sisimai/lhost/apachejames.rb +4 -4
- data/lib/sisimai/lhost/barracuda.rb +4 -4
- data/lib/sisimai/lhost/bigfoot.rb +4 -4
- data/lib/sisimai/lhost/biglobe.rb +4 -4
- data/lib/sisimai/lhost/courier.rb +4 -4
- data/lib/sisimai/lhost/domino.rb +4 -4
- data/lib/sisimai/lhost/dragonfly.rb +114 -0
- data/lib/sisimai/lhost/einsundeins.rb +4 -4
- data/lib/sisimai/lhost/exchange2003.rb +4 -3
- data/lib/sisimai/lhost/exchange2007.rb +4 -3
- data/lib/sisimai/lhost/exim.rb +4 -4
- data/lib/sisimai/lhost/ezweb.rb +4 -4
- data/lib/sisimai/lhost/facebook.rb +4 -4
- data/lib/sisimai/lhost/fml.rb +4 -4
- data/lib/sisimai/lhost/gmail.rb +4 -4
- data/lib/sisimai/lhost/gmx.rb +4 -4
- data/lib/sisimai/lhost/googlegroups.rb +4 -4
- data/lib/sisimai/lhost/gsuite.rb +4 -4
- data/lib/sisimai/lhost/imailserver.rb +4 -3
- data/lib/sisimai/lhost/interscanmss.rb +5 -4
- data/lib/sisimai/lhost/kddi.rb +4 -4
- data/lib/sisimai/lhost/mailfoundry.rb +4 -4
- data/lib/sisimai/lhost/mailmarshalsmtp.rb +5 -4
- data/lib/sisimai/lhost/mailru.rb +4 -4
- data/lib/sisimai/lhost/mcafee.rb +4 -4
- data/lib/sisimai/lhost/messagelabs.rb +4 -3
- data/lib/sisimai/lhost/messagingserver.rb +5 -4
- data/lib/sisimai/lhost/mfilter.rb +4 -4
- data/lib/sisimai/lhost/mxlogic.rb +3 -3
- data/lib/sisimai/lhost/notes.rb +4 -4
- data/lib/sisimai/lhost/office365.rb +4 -4
- data/lib/sisimai/lhost/opensmtpd.rb +9 -7
- data/lib/sisimai/lhost/outlook.rb +4 -4
- data/lib/sisimai/lhost/postfix.rb +4 -4
- data/lib/sisimai/lhost/powermta.rb +4 -4
- data/lib/sisimai/lhost/qmail.rb +10 -10
- data/lib/sisimai/lhost/receivingses.rb +4 -4
- data/lib/sisimai/lhost/sendgrid.rb +4 -4
- data/lib/sisimai/lhost/sendmail.rb +4 -4
- data/lib/sisimai/lhost/surfcontrol.rb +4 -4
- data/lib/sisimai/lhost/v5sendmail.rb +5 -4
- data/lib/sisimai/lhost/verizon.rb +4 -4
- data/lib/sisimai/lhost/x1.rb +3 -3
- data/lib/sisimai/lhost/x2.rb +3 -3
- data/lib/sisimai/lhost/x3.rb +3 -3
- data/lib/sisimai/lhost/x4.rb +3 -3
- data/lib/sisimai/lhost/x5.rb +3 -3
- data/lib/sisimai/lhost/x6.rb +3 -3
- data/lib/sisimai/lhost/yahoo.rb +4 -4
- data/lib/sisimai/lhost/yandex.rb +4 -4
- data/lib/sisimai/lhost/zoho.rb +4 -4
- data/lib/sisimai/lhost.rb +5 -5
- data/lib/sisimai/mail/maildir.rb +1 -1
- data/lib/sisimai/mail/stdin.rb +1 -1
- data/lib/sisimai/mda.rb +3 -3
- data/lib/sisimai/message.rb +8 -8
- data/lib/sisimai/order.rb +1 -0
- data/lib/sisimai/reason/badreputation.rb +1 -1
- data/lib/sisimai/reason/norelaying.rb +1 -0
- data/lib/sisimai/reason/rejected.rb +1 -0
- data/lib/sisimai/reason.rb +8 -8
- data/lib/sisimai/rfc3464.rb +3 -3
- data/lib/sisimai/rfc3834.rb +2 -2
- data/lib/sisimai/rhost/apple.rb +92 -0
- data/lib/sisimai/rhost/cox.rb +81 -32
- data/lib/sisimai/rhost/franceptt.rb +84 -81
- data/lib/sisimai/rhost/godaddy.rb +205 -43
- data/lib/sisimai/rhost/google.rb +3 -5
- data/lib/sisimai/rhost/iua.rb +2 -2
- data/lib/sisimai/rhost/kddi.rb +6 -5
- data/lib/sisimai/rhost/microsoft.rb +4 -5
- data/lib/sisimai/rhost/mimecast.rb +15 -4
- data/lib/sisimai/rhost/nttdocomo.rb +1 -1
- data/lib/sisimai/rhost/spectrum.rb +100 -40
- data/lib/sisimai/rhost/tencent.rb +46 -25
- data/lib/sisimai/rhost/yahooinc.rb +110 -0
- data/lib/sisimai/rhost.rb +28 -35
- data/lib/sisimai/smtp/reply.rb +4 -3
- data/lib/sisimai/smtp/transcript.rb +3 -3
- data/lib/sisimai/version.rb +1 -1
- data/lib/sisimai.rb +0 -6
- data/set-of-emails/maildir/bsd/lhost-dragonfly-01.eml +36 -0
- data/set-of-emails/maildir/bsd/lhost-dragonfly-02.eml +32 -0
- data/set-of-emails/maildir/bsd/lhost-dragonfly-03.eml +32 -0
- data/set-of-emails/maildir/bsd/lhost-dragonfly-04.eml +31 -0
- data/set-of-emails/maildir/bsd/lhost-dragonfly-05.eml +32 -0
- data/set-of-emails/maildir/bsd/lhost-dragonfly-06.eml +32 -0
- data/set-of-emails/maildir/bsd/lhost-dragonfly-07.eml +32 -0
- data/set-of-emails/maildir/bsd/lhost-dragonfly-08.eml +32 -0
- data/set-of-emails/maildir/bsd/lhost-dragonfly-09.eml +32 -0
- data/set-of-emails/maildir/bsd/lhost-dragonfly-10.eml +32 -0
- data/set-of-emails/maildir/bsd/lhost-dragonfly-11.eml +32 -0
- data/set-of-emails/maildir/bsd/lhost-dragonfly-12.eml +32 -0
- data/set-of-emails/maildir/bsd/lhost-dragonfly-13.eml +32 -0
- data/set-of-emails/maildir/bsd/lhost-dragonfly-14.eml +32 -0
- data/set-of-emails/maildir/bsd/lhost-dragonfly-15.eml +32 -0
- data/set-of-emails/maildir/bsd/lhost-dragonfly-16.eml +32 -0
- data/set-of-emails/maildir/bsd/lhost-dragonfly-17.eml +32 -0
- data/set-of-emails/maildir/bsd/lhost-dragonfly-18.eml +32 -0
- data/set-of-emails/maildir/bsd/lhost-dragonfly-19.eml +32 -0
- data/set-of-emails/maildir/bsd/lhost-dragonfly-20.eml +32 -0
- data/set-of-emails/maildir/bsd/lhost-dragonfly-21.eml +33 -0
- data/set-of-emails/maildir/bsd/lhost-dragonfly-22.eml +32 -0
- data/set-of-emails/maildir/bsd/lhost-dragonfly-23.eml +32 -0
- data/set-of-emails/maildir/bsd/lhost-dragonfly-24.eml +32 -0
- data/set-of-emails/maildir/bsd/lhost-dragonfly-25.eml +33 -0
- data/set-of-emails/maildir/bsd/lhost-dragonfly-26.eml +33 -0
- data/set-of-emails/maildir/bsd/lhost-dragonfly-27.eml +47 -0
- data/set-of-emails/maildir/bsd/lhost-dragonfly-28.eml +47 -0
- data/set-of-emails/maildir/bsd/lhost-dragonfly-29.eml +32 -0
- data/set-of-emails/maildir/bsd/lhost-dragonfly-30.eml +32 -0
- data/set-of-emails/maildir/bsd/lhost-opensmtpd-10.eml +58 -0
- data/set-of-emails/maildir/bsd/lhost-opensmtpd-11.eml +58 -0
- data/set-of-emails/maildir/bsd/lhost-opensmtpd-12.eml +62 -0
- data/set-of-emails/maildir/bsd/lhost-opensmtpd-13.eml +62 -0
- data/set-of-emails/maildir/bsd/lhost-opensmtpd-14.eml +58 -0
- data/set-of-emails/maildir/bsd/lhost-opensmtpd-15.eml +63 -0
- data/set-of-emails/maildir/bsd/lhost-opensmtpd-16.eml +62 -0
- data/set-of-emails/maildir/bsd/lhost-opensmtpd-17.eml +63 -0
- data/set-of-emails/maildir/bsd/lhost-qmail-11.eml +29 -0
- data/set-of-emails/maildir/bsd/lhost-qmail-12.eml +29 -0
- data/set-of-emails/maildir/bsd/lhost-qmail-13.eml +29 -0
- data/set-of-emails/maildir/bsd/lhost-qmail-14.eml +34 -0
- data/set-of-emails/maildir/bsd/lhost-qmail-15.eml +30 -0
- data/set-of-emails/maildir/bsd/lhost-qmail-16.eml +31 -0
- data/set-of-emails/maildir/bsd/lhost-qmail-17.eml +38 -0
- data/set-of-emails/maildir/bsd/lhost-qmail-18.eml +31 -0
- data/set-of-emails/maildir/bsd/lhost-qmail-19.eml +31 -0
- data/set-of-emails/maildir/bsd/lhost-qmail-20.eml +46 -0
- data/set-of-emails/maildir/bsd/lhost-qmail-21.eml +41 -0
- data/set-of-emails/maildir/bsd/lhost-qmail-22.eml +42 -0
- data/set-of-emails/maildir/bsd/lhost-qmail-23.eml +43 -0
- data/set-of-emails/maildir/bsd/lhost-qmail-24.eml +43 -0
- data/set-of-emails/maildir/bsd/lhost-qmail-25.eml +54 -0
- data/set-of-emails/maildir/bsd/rhost-apple-01.eml +79 -0
- data/set-of-emails/maildir/bsd/rhost-apple-02.eml +81 -0
- data/set-of-emails/maildir/bsd/rhost-apple-03.eml +75 -0
- data/set-of-emails/maildir/bsd/rhost-apple-04.eml +74 -0
- data/set-of-emails/maildir/bsd/rhost-yahooinc-01.eml +80 -0
- data/set-of-emails/maildir/bsd/rhost-yahooinc-02.eml +83 -0
- data/set-of-emails/maildir/bsd/rhost-yahooinc-03.eml +125 -0
- metadata +65 -2
data/lib/sisimai/lhost/notes.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module Sisimai::Lhost
|
2
|
-
# Sisimai::Lhost::Notes
|
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
|
-
#
|
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
|
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
|
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
|
-
#
|
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
|
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
|
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' => [
|
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
|
-
#
|
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
|
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
|
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
|
-
#
|
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
|
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
|
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
|
-
#
|
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
|
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
|
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
|
-
#
|
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
|
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')
|
data/lib/sisimai/lhost/qmail.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
module Sisimai::Lhost
|
2
|
-
# Sisimai::Lhost::Qmail
|
3
|
-
#
|
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
|
-
#
|
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
|
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']
|
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
|
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
|
-
#
|
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
|
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
|
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
|
-
#
|
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
|
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
|
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
|
-
#
|
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
|
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
|
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
|
-
#
|
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
|
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,
|
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
|
3
|
-
#
|
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
|
-
#
|
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
|
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
|
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
|
-
#
|
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
|
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
|
data/lib/sisimai/lhost/x1.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
module Sisimai::Lhost
|
2
|
-
# Sisimai::Lhost::X1
|
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
|
-
#
|
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
|
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" ')
|
data/lib/sisimai/lhost/x2.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
module Sisimai::Lhost
|
2
|
-
# Sisimai::Lhost::X2
|
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
|
-
#
|
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
|
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@')
|
data/lib/sisimai/lhost/x3.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
module Sisimai::Lhost
|
2
|
-
# Sisimai::Lhost::X3
|
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
|
-
#
|
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
|
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')
|
data/lib/sisimai/lhost/x4.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
module Sisimai::Lhost
|
2
|
-
# Sisimai::Lhost::X4
|
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
|
-
#
|
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
|
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
|
data/lib/sisimai/lhost/x5.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
module Sisimai::Lhost
|
2
|
-
# Sisimai::Lhost::X5
|
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
|
-
#
|
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
|
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')
|
data/lib/sisimai/lhost/x6.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
module Sisimai::Lhost
|
2
|
-
# Sisimai::Lhost::X6
|
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
|
-
#
|
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
|
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')
|
data/lib/sisimai/lhost/yahoo.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module Sisimai::Lhost
|
2
|
-
# Sisimai::Lhost::Yahoo
|
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
|
-
#
|
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
|
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...
|
data/lib/sisimai/lhost/yandex.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module Sisimai::Lhost
|
2
|
-
# Sisimai::Lhost::Yandex
|
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
|
-
#
|
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
|
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
|
data/lib/sisimai/lhost/zoho.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module Sisimai::Lhost
|
2
|
-
# Sisimai::Lhost::Zoho
|
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
|
-
#
|
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
|
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
|
-
#
|
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
|
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
|
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
|
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
|
data/lib/sisimai/mail/maildir.rb
CHANGED
data/lib/sisimai/mail/stdin.rb
CHANGED
data/lib/sisimai/mda.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
module Sisimai
|
2
|
-
# Sisimai::MDA - Error message
|
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
|
-
#
|
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
|
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
|