sisimai 5.6.0-java → 5.7.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.
- checksums.yaml +4 -4
- data/.github/workflows/rake-test.yml +0 -4
- data/ChangeLog.md +32 -0
- data/README-JA.md +19 -16
- data/README.md +23 -21
- data/lib/sisimai/address.rb +8 -31
- data/lib/sisimai/arf.rb +3 -5
- data/lib/sisimai/fact.rb +12 -37
- data/lib/sisimai/lhost/activehunter.rb +0 -2
- data/lib/sisimai/lhost/amazonses.rb +6 -8
- data/lib/sisimai/lhost/apachejames.rb +0 -1
- data/lib/sisimai/lhost/biglobe.rb +0 -16
- data/lib/sisimai/lhost/courier.rb +5 -4
- data/lib/sisimai/lhost/deutschetelekom.rb +120 -0
- data/lib/sisimai/lhost/domino.rb +0 -3
- data/lib/sisimai/lhost/dragonfly.rb +0 -27
- data/lib/sisimai/lhost/einsundeins.rb +1 -10
- data/lib/sisimai/lhost/exchange2003.rb +4 -4
- data/lib/sisimai/lhost/exchange2007.rb +3 -4
- data/lib/sisimai/lhost/exim.rb +30 -78
- data/lib/sisimai/lhost/ezweb.rb +12 -49
- data/lib/sisimai/lhost/fml.rb +4 -29
- data/lib/sisimai/lhost/gmail.rb +0 -23
- data/lib/sisimai/lhost/gmx.rb +7 -24
- data/lib/sisimai/lhost/googlegroups.rb +3 -3
- data/lib/sisimai/lhost/googleworkspace.rb +0 -4
- data/lib/sisimai/lhost/imailserver.rb +3 -9
- data/lib/sisimai/lhost/kddi.rb +6 -20
- data/lib/sisimai/lhost/mailfoundry.rb +0 -2
- data/lib/sisimai/lhost/mailmarshal.rb +1 -3
- data/lib/sisimai/lhost/messagingserver.rb +4 -15
- data/lib/sisimai/lhost/mfilter.rb +0 -1
- data/lib/sisimai/lhost/mimecast.rb +0 -1
- data/lib/sisimai/lhost/notes.rb +1 -2
- data/lib/sisimai/lhost/opensmtpd.rb +0 -40
- data/lib/sisimai/lhost/postfix.rb +10 -11
- data/lib/sisimai/lhost/qmail.rb +14 -81
- data/lib/sisimai/lhost/sendmail.rb +4 -4
- data/lib/sisimai/lhost/trendmicro.rb +3 -3
- data/lib/sisimai/lhost/v5sendmail.rb +0 -1
- data/lib/sisimai/lhost/verizon.rb +1 -2
- data/lib/sisimai/lhost/x1.rb +1 -2
- data/lib/sisimai/lhost/x2.rb +0 -2
- data/lib/sisimai/lhost/x3.rb +4 -9
- data/lib/sisimai/lhost/x6.rb +0 -1
- data/lib/sisimai/lhost/zoho.rb +0 -12
- data/lib/sisimai/lhost.rb +38 -19
- data/lib/sisimai/message.rb +1 -1
- data/lib/sisimai/order.rb +4 -1
- data/lib/sisimai/reason/authfailure.rb +2 -2
- data/lib/sisimai/reason/contenterror.rb +2 -0
- data/lib/sisimai/reason/emailtoolarge.rb +1 -1
- data/lib/sisimai/reason/expired.rb +13 -2
- data/lib/sisimai/reason/hostunknown.rb +9 -0
- data/lib/sisimai/reason/mailboxfull.rb +3 -2
- data/lib/sisimai/reason/networkerror.rb +13 -1
- data/lib/sisimai/reason/norelaying.rb +4 -3
- data/lib/sisimai/reason/notaccept.rb +10 -3
- data/lib/sisimai/reason/notcompliantrfc.rb +1 -0
- data/lib/sisimai/reason/policyviolation.rb +6 -1
- data/lib/sisimai/reason/rejected.rb +6 -0
- data/lib/sisimai/reason/securityerror.rb +1 -0
- data/lib/sisimai/reason/suspend.rb +4 -0
- data/lib/sisimai/reason/syntaxerror.rb +1 -8
- data/lib/sisimai/reason/systemerror.rb +18 -0
- data/lib/sisimai/reason/userunknown.rb +2 -0
- data/lib/sisimai/reason.rb +7 -7
- data/lib/sisimai/rfc1123.rb +1 -1
- data/lib/sisimai/rfc1894.rb +7 -6
- data/lib/sisimai/rfc2045.rb +2 -2
- data/lib/sisimai/rfc3464/thirdparty.rb +1 -1
- data/lib/sisimai/rfc3464.rb +10 -14
- data/lib/sisimai/rfc3834.rb +3 -4
- data/lib/sisimai/rfc791.rb +3 -38
- data/lib/sisimai/rhost/microsoft.rb +4 -0
- data/lib/sisimai/rhost.rb +1 -1
- data/lib/sisimai/smtp/status.rb +23 -19
- data/lib/sisimai/string.rb +0 -12
- data/lib/sisimai/version.rb +1 -1
- data/set-of-emails/maildir/bsd/lhost-deutschetelekom-01.eml +66 -0
- data/set-of-emails/maildir/bsd/lhost-deutschetelekom-02.eml +68 -0
- data/set-of-emails/maildir/bsd/lhost-deutschetelekom-03.eml +50 -0
- data/set-of-emails/should-not-crash/p5-664-iomart-mail-filter.eml +258 -0
- data/set-of-emails/to-be-debugged-because/sisimai-cannot-parse-yet/.gitkeep +0 -0
- metadata +8 -2
|
@@ -126,7 +126,7 @@ module Sisimai::Lhost
|
|
|
126
126
|
else
|
|
127
127
|
# Message could not be delivered to mobile.
|
|
128
128
|
# Error: No valid recipients for this MM
|
|
129
|
-
v['diagnosis'] =
|
|
129
|
+
v['diagnosis'] = e[7, e.size] if e.start_with?('Error: ')
|
|
130
130
|
end
|
|
131
131
|
end
|
|
132
132
|
end
|
|
@@ -137,7 +137,6 @@ module Sisimai::Lhost
|
|
|
137
137
|
emailparts[1] += "Subject: #{subjecttxt}\n" if emailparts[1].include?("\nSubject: ") == false
|
|
138
138
|
|
|
139
139
|
dscontents.each do |e|
|
|
140
|
-
e['diagnosis'] = Sisimai::String.sweep(e['diagnosis'])
|
|
141
140
|
messagesof.each_key do |r|
|
|
142
141
|
# Verify each regular expression of session errors
|
|
143
142
|
next if messagesof[r].none? { |a| e['diagnosis'].include?(a) }
|
data/lib/sisimai/lhost/x1.rb
CHANGED
|
@@ -67,8 +67,7 @@ module Sisimai::Lhost
|
|
|
67
67
|
return nil if recipients == 0
|
|
68
68
|
|
|
69
69
|
dscontents.each do |e|
|
|
70
|
-
e['
|
|
71
|
-
e['date'] = datestring || ''
|
|
70
|
+
e['date'] = datestring || ''
|
|
72
71
|
end
|
|
73
72
|
|
|
74
73
|
return {"ds" => dscontents, "rfc822" => emailparts[1]}
|
data/lib/sisimai/lhost/x2.rb
CHANGED
|
@@ -88,8 +88,6 @@ module Sisimai::Lhost
|
|
|
88
88
|
end
|
|
89
89
|
end
|
|
90
90
|
return nil if recipients == 0
|
|
91
|
-
|
|
92
|
-
dscontents.each { |e| e['diagnosis'] = Sisimai::String.sweep(e['diagnosis']) }
|
|
93
91
|
return {"ds" => dscontents, "rfc822" => emailparts[1]}
|
|
94
92
|
end
|
|
95
93
|
def description; return 'Unknown MTA #2'; end
|
data/lib/sisimai/lhost/x3.rb
CHANGED
|
@@ -64,28 +64,23 @@ module Sisimai::Lhost
|
|
|
64
64
|
recipients += 1
|
|
65
65
|
else
|
|
66
66
|
# Detect error message
|
|
67
|
-
|
|
67
|
+
case
|
|
68
|
+
when e.start_with?('SMTP:')
|
|
68
69
|
# SMTP:RCPT host 192.0.2.8: 553 5.3.0 <kijitora@example.com>... No such user here
|
|
69
70
|
v['command'] = Sisimai::SMTP::Command.find(e)
|
|
70
71
|
v['diagnosis'] = e
|
|
71
72
|
|
|
72
|
-
|
|
73
|
+
when e.start_with?('Routing: ')
|
|
73
74
|
# Routing: Could not find a gateway for kijitora@example.co.jp
|
|
74
75
|
v['diagnosis'] = e[9, e.size]
|
|
75
76
|
|
|
76
|
-
|
|
77
|
+
when e.start_with?('Diagnostic-Code: smtp; ')
|
|
77
78
|
# Diagnostic-Code: smtp; 552 5.2.2 Over quota
|
|
78
79
|
v['diagnosis'] = e[e.index(';') + 2, e.size]
|
|
79
80
|
end
|
|
80
81
|
end
|
|
81
82
|
end
|
|
82
83
|
return nil if recipients == 0
|
|
83
|
-
|
|
84
|
-
dscontents.each do |e|
|
|
85
|
-
e['diagnosis'] = Sisimai::String.sweep(e['diagnosis'])
|
|
86
|
-
e['status'] = Sisimai::SMTP::Status.find(e['diagnosis'])
|
|
87
|
-
end
|
|
88
|
-
|
|
89
84
|
return {"ds" => dscontents, "rfc822" => emailparts[1]}
|
|
90
85
|
end
|
|
91
86
|
def description; return 'Unknown MTA #3'; end
|
data/lib/sisimai/lhost/x6.rb
CHANGED
data/lib/sisimai/lhost/zoho.rb
CHANGED
|
@@ -8,7 +8,6 @@ module Sisimai::Lhost
|
|
|
8
8
|
Indicators = Sisimai::Lhost.INDICATORS
|
|
9
9
|
Boundaries = ['Received: from mail.zoho.com by mx.zohomail.com'].freeze
|
|
10
10
|
StartingOf = {message: ['This message was created automatically by mail delivery']}.freeze
|
|
11
|
-
MessagesOf = {'expired' => ['Host not reachable']}.freeze
|
|
12
11
|
|
|
13
12
|
# @abstract Decodes the bounce message from Zoho Mail
|
|
14
13
|
# @param [Hash] mhead Message headers of a bounce email
|
|
@@ -88,17 +87,6 @@ module Sisimai::Lhost
|
|
|
88
87
|
end
|
|
89
88
|
end
|
|
90
89
|
return nil if recipients == 0
|
|
91
|
-
|
|
92
|
-
dscontents.each do |e|
|
|
93
|
-
e['diagnosis'] = Sisimai::String.sweep(e['diagnosis'].tr("\n", ' '))
|
|
94
|
-
MessagesOf.each_key do |r|
|
|
95
|
-
# Verify each regular expression of session errors
|
|
96
|
-
next if MessagesOf[r].none? { |a| e['diagnosis'].include?(a) }
|
|
97
|
-
e['reason'] = r
|
|
98
|
-
break
|
|
99
|
-
end
|
|
100
|
-
end
|
|
101
|
-
|
|
102
90
|
return {"ds" => dscontents, "rfc822" => emailparts[1]}
|
|
103
91
|
end
|
|
104
92
|
def description; return 'Zoho Mail: https://www.zoho.com'; end
|
data/lib/sisimai/lhost.rb
CHANGED
|
@@ -9,21 +9,20 @@ module Sisimai
|
|
|
9
9
|
# @private
|
|
10
10
|
def DELIVERYSTATUS
|
|
11
11
|
return {
|
|
12
|
-
'spec' => "",
|
|
13
|
-
'date' => "",
|
|
14
|
-
'rhost' => "",
|
|
15
|
-
'lhost' => "",
|
|
16
|
-
'alias' => "",
|
|
17
|
-
'agent' => "",
|
|
18
|
-
'action' => "",
|
|
19
|
-
'status' => "",
|
|
20
|
-
'reason' => "",
|
|
21
|
-
'command' => "",
|
|
22
|
-
'replycode' => "",
|
|
23
|
-
'diagnosis' => "",
|
|
24
|
-
'recipient' => "",
|
|
25
|
-
'feedbacktype' => "",
|
|
26
|
-
'toxic' => false, # EXPERIMENTAL
|
|
12
|
+
'spec' => "", # Protocl specification
|
|
13
|
+
'date' => "", # The value of Last-Attempt-Date header
|
|
14
|
+
'rhost' => "", # The value of Remote-MTA header
|
|
15
|
+
'lhost' => "", # The value of Received-From-MTA header
|
|
16
|
+
'alias' => "", # The value of alias entry(RHS)
|
|
17
|
+
'agent' => "", # MTA module name
|
|
18
|
+
'action' => "", # The value of Action header
|
|
19
|
+
'status' => "", # The value of Status header
|
|
20
|
+
'reason' => "", # Temporary reason of bounce
|
|
21
|
+
'command' => "", # SMTP command in the message body
|
|
22
|
+
'replycode' => "", # SMTP Reply code
|
|
23
|
+
'diagnosis' => "", # The value of Diagnostic-Code header
|
|
24
|
+
'recipient' => "", # The value of Final-Recipient header
|
|
25
|
+
'feedbacktype' => "", # Feedback Type
|
|
27
26
|
}
|
|
28
27
|
end
|
|
29
28
|
|
|
@@ -37,14 +36,34 @@ module Sisimai
|
|
|
37
36
|
}
|
|
38
37
|
end
|
|
39
38
|
|
|
39
|
+
# @abstract Banners defined in Smail 3 and Deutsche Telekom
|
|
40
|
+
# @return [Array] Banner strings
|
|
41
|
+
# @private
|
|
42
|
+
def BannerDTAG
|
|
43
|
+
return [
|
|
44
|
+
# smail-3.2.0.108/src/
|
|
45
|
+
# notify.c:61|static char *log_banner = "\
|
|
46
|
+
# notify.c:62||------------------------- Message log follows: -------------------------|\n";
|
|
47
|
+
# notify.c:63|static char *addr_error_banner = "\
|
|
48
|
+
# notify.c:64||------------------------- Failed addresses follow: ---------------------|\n";
|
|
49
|
+
# notify.c:65|static char *text_banner = "\
|
|
50
|
+
# notify.c:66||------------------------- Message text follows: ------------------------|\n";
|
|
51
|
+
"|------------------------- Message log follows: -------------------------|", # 0. Smail 3
|
|
52
|
+
"|------------------------- Failed addresses follow: ---------------------|", # 1. Smail 3
|
|
53
|
+
"|------------------------- Message text follows: ------------------------|", # 2. Smail 3
|
|
54
|
+
"|------------------------- Message header follows: ----------------------|", # 3. Deutsche Telekom
|
|
55
|
+
# "|----------- Message text follows: (body too large, truncated) ----------|", # 4. Deutsche Telekom
|
|
56
|
+
]
|
|
57
|
+
end
|
|
58
|
+
|
|
40
59
|
# @abstract MTA list
|
|
41
60
|
# @return [Array] MTA list with order
|
|
42
61
|
def index
|
|
43
62
|
return %w[
|
|
44
|
-
Activehunter AmazonSES ApacheJames Biglobe Courier Domino DragonFly EZweb
|
|
45
|
-
Exchange2007 Exim FML GMX GoogleWorkspace GoogleGroups Gmail
|
|
46
|
-
MailMarshal MessagingServer Notes OpenSMTPD Postfix
|
|
47
|
-
X1 X2 X3 X6 Zoho MFILTER Qmail
|
|
63
|
+
Activehunter AmazonSES ApacheJames Biglobe Courier Domino DeutscheTelekom DragonFly EZweb
|
|
64
|
+
EinsUndEins Exchange2003 Exchange2007 Exim FML GMX GoogleWorkspace GoogleGroups Gmail
|
|
65
|
+
IMailServer KDDI MailFoundry Mimecast MailMarshal MessagingServer Notes OpenSMTPD Postfix
|
|
66
|
+
Sendmail TrendMicro V5sendmail Verizon X1 X2 X3 X6 Zoho MFILTER Qmail
|
|
48
67
|
]
|
|
49
68
|
end
|
|
50
69
|
|
data/lib/sisimai/message.rb
CHANGED
|
@@ -66,7 +66,7 @@ module Sisimai
|
|
|
66
66
|
# Remove "Fwd:" string from the Subject: header
|
|
67
67
|
if p1
|
|
68
68
|
# Delete quoted strings, quote symbols(>)
|
|
69
|
-
cq =
|
|
69
|
+
cq = cq[cq.index(':') + 1, cq.size]
|
|
70
70
|
aftersplit[2] = aftersplit[2].gsub(/^[>][ ]/, '').gsub(/^[>]$/, '')
|
|
71
71
|
end
|
|
72
72
|
thing['header']['subject'] = cq
|
data/lib/sisimai/order.rb
CHANGED
|
@@ -11,11 +11,12 @@ module Sisimai
|
|
|
11
11
|
'Sisimai::Lhost::Sendmail',
|
|
12
12
|
'Sisimai::Lhost::Exchange2007',
|
|
13
13
|
'Sisimai::Lhost::Exchange2003',
|
|
14
|
+
'Sisimai::Lhost::AmazonSES',
|
|
14
15
|
'Sisimai::Lhost::TrendMicro',
|
|
16
|
+
'Sisimai::Lhost::DeutscheTelekom',
|
|
15
17
|
'Sisimai::Lhost::KDDI',
|
|
16
18
|
'Sisimai::Lhost::FML',
|
|
17
19
|
'Sisimai::Lhost::Verizon',
|
|
18
|
-
'Sisimai::Lhost::AmazonSES',
|
|
19
20
|
'Sisimai::Lhost::ApacheJames',
|
|
20
21
|
'Sisimai::Lhost::X2',
|
|
21
22
|
].freeze
|
|
@@ -83,8 +84,10 @@ module Sisimai
|
|
|
83
84
|
'Sisimai::Lhost::GMX',
|
|
84
85
|
'Sisimai::Lhost::Zoho',
|
|
85
86
|
'Sisimai::Lhost::EinsUndEins',
|
|
87
|
+
'Sisimai::Lhost::DeutscheTelekom',
|
|
86
88
|
],
|
|
87
89
|
'mail-could' => ['Sisimai::Lhost::TrendMicro'],
|
|
90
|
+
'mail-failed' => ['Sisimai::Lhost::DeutscheTelekom'],
|
|
88
91
|
'mail-failure' => ['Sisimai::Lhost::Exim'],
|
|
89
92
|
'mail-system' => ['Sisimai::Lhost::EZweb'],
|
|
90
93
|
'message-delivery' => ['Sisimai::Lhost::MailFoundry'],
|
|
@@ -23,8 +23,8 @@ module Sisimai
|
|
|
23
23
|
"spf check: fail",
|
|
24
24
|
].freeze
|
|
25
25
|
Pairs = [
|
|
26
|
-
[" is not allowed to send
|
|
27
|
-
["is not allowed to send
|
|
26
|
+
["spf: ", " is not allowed to send "],
|
|
27
|
+
["is not allowed to send ", " spf "],
|
|
28
28
|
].freeze
|
|
29
29
|
|
|
30
30
|
def text; return 'authfailure'; end
|
|
@@ -9,6 +9,7 @@ module Sisimai
|
|
|
9
9
|
module ContentError
|
|
10
10
|
class << self
|
|
11
11
|
Index = [
|
|
12
|
+
"charset not supported",
|
|
12
13
|
"executable files are not allowed in compressed files",
|
|
13
14
|
"header error",
|
|
14
15
|
"header size exceeds maximum permitted",
|
|
@@ -22,6 +23,7 @@ module Sisimai
|
|
|
22
23
|
"message mime complexity exceeds the policy maximum",
|
|
23
24
|
"message was blocked because its content presents a potential", # https://support.google.com/mail/answer/6590
|
|
24
25
|
"routing loop detected -- too many received: headers",
|
|
26
|
+
'too many "received" headers', # Exim/deliver.c:5425
|
|
25
27
|
"we do not accept messages containing images or other attachments",
|
|
26
28
|
].freeze
|
|
27
29
|
|
|
@@ -7,8 +7,8 @@ module Sisimai
|
|
|
7
7
|
module EmailTooLarge
|
|
8
8
|
class << self
|
|
9
9
|
Index = [
|
|
10
|
+
"exceeds the maximum size ",
|
|
10
11
|
"line limit exceeded",
|
|
11
|
-
"mail file size exceeds the maximum size allowed for mail delivery",
|
|
12
12
|
"message too large",
|
|
13
13
|
"size limit",
|
|
14
14
|
"taille limite du message atteinte",
|
|
@@ -10,22 +10,33 @@ module Sisimai
|
|
|
10
10
|
Index = [
|
|
11
11
|
"connection timed out",
|
|
12
12
|
"could not find a gateway for",
|
|
13
|
+
"delay reason: ", # Exim/deliver.c:7459
|
|
13
14
|
"delivery attempts will continue to be",
|
|
15
|
+
"envelope expired", # OpenSMTPD/smtpd/queue.c:221
|
|
14
16
|
"failed to deliver to domain ",
|
|
15
|
-
"
|
|
17
|
+
"frozen on arrival", # Exim/receive.c:4022
|
|
16
18
|
"has been delayed",
|
|
19
|
+
"has been frozen", # Exim/deliver.c:7586
|
|
20
|
+
"have been failing for a long time", # Exim/smtp.c:3508
|
|
21
|
+
"host not reachable",
|
|
17
22
|
"it has not been collected after",
|
|
18
23
|
"message could not be delivered for more than",
|
|
19
24
|
"message expired, ",
|
|
20
25
|
"message has been in the queue too long",
|
|
26
|
+
"message was not delivered within ",
|
|
21
27
|
"message timed out",
|
|
28
|
+
"retry timeout exceeded", # Exim/retry.c:902
|
|
29
|
+
"server did not accept our requests to connect",
|
|
22
30
|
"server did not respond",
|
|
23
31
|
"unable to deliver message after multiple retries",
|
|
24
32
|
].freeze
|
|
25
33
|
Pairs = [
|
|
26
34
|
["could not be delivered for", " days"],
|
|
35
|
+
["could not deliver for the last", "second"],
|
|
27
36
|
["delivery ", "expired"],
|
|
28
|
-
["
|
|
37
|
+
["delivery ", "delayed"],
|
|
38
|
+
["exceed", "time", "out"],
|
|
39
|
+
["not", "reach", "period"], # Exim/smtp.c:3508
|
|
29
40
|
].freeze
|
|
30
41
|
|
|
31
42
|
def text; return 'expired'; end
|
|
@@ -7,19 +7,28 @@ module Sisimai
|
|
|
7
7
|
module HostUnknown
|
|
8
8
|
class << self
|
|
9
9
|
Index = [
|
|
10
|
+
"all host address lookups failed", # Exim/transports/smtp.c:3524
|
|
11
|
+
"couldn't find any host ", # qmail-remote.c:78
|
|
12
|
+
"dns server returned answer with no data",
|
|
10
13
|
"domain is not reachable",
|
|
11
14
|
"domain mentioned in email address is unknown",
|
|
12
15
|
"domain must exist",
|
|
16
|
+
"domain name not found",
|
|
13
17
|
"host or domain name not found",
|
|
14
18
|
"host unknown",
|
|
15
19
|
"host unreachable",
|
|
20
|
+
"illegal host/domain name found",
|
|
21
|
+
"invalid domain name", # OpenSMTPD/smtpd/mta.c:976
|
|
22
|
+
"mx records point to non-existent hosts", # Exim/routers/dnslookup.c:331
|
|
16
23
|
"name or service not known",
|
|
17
24
|
"no such domain",
|
|
18
25
|
"recipient address rejected: unknown domain name",
|
|
26
|
+
"responded with code nxdomain",
|
|
19
27
|
"unknown host",
|
|
20
28
|
].freeze
|
|
21
29
|
Pairs = [
|
|
22
30
|
["domain ", "not exist"],
|
|
31
|
+
["host ", " not found"],
|
|
23
32
|
["unrout", "able ", "address"],
|
|
24
33
|
].freeze
|
|
25
34
|
|
|
@@ -13,6 +13,7 @@ module Sisimai
|
|
|
13
13
|
"boite du destinataire pleine",
|
|
14
14
|
"exceeded storage allocation",
|
|
15
15
|
"full mailbox",
|
|
16
|
+
"mailbox exceeds allowed size",
|
|
16
17
|
"mailbox size limit exceeded",
|
|
17
18
|
"mailbox would exceed maximum allowed storage",
|
|
18
19
|
"mailfolder is full",
|
|
@@ -29,11 +30,11 @@ module Sisimai
|
|
|
29
30
|
["disk", "quota"],
|
|
30
31
|
["enough ", " space"],
|
|
31
32
|
["mailbox ", "exceeded", " limit"],
|
|
32
|
-
["mailbox ", "full"],
|
|
33
|
+
["mailbox ", "full"], # Exim/transports/appendfile.c:2567
|
|
33
34
|
["mailbox ", "quota"],
|
|
34
35
|
["maildir ", "quota"],
|
|
35
36
|
["over ", "quota"],
|
|
36
|
-
["quota ", "exceeded"],
|
|
37
|
+
["quota ", "exceeded"], # Exim/transports/appendfile.c:3050
|
|
37
38
|
].freeze
|
|
38
39
|
|
|
39
40
|
def text; return 'mailboxfull'; end
|
|
@@ -11,13 +11,24 @@ module Sisimai
|
|
|
11
11
|
module NetworkError
|
|
12
12
|
class << self
|
|
13
13
|
Index = [
|
|
14
|
+
"address family mismatch on destination mxs", # OpenSMTPD/smtpd/mta.c
|
|
15
|
+
"all routes to destination blocked", # OpenSMTPD/smtpd/mta.c
|
|
16
|
+
"bad dns lookup error code", # OpenSMTPD/smtpd/mta.c
|
|
14
17
|
"could not connect and send the mail to",
|
|
18
|
+
"could not contact dns servers",
|
|
19
|
+
"could not retrieve source address", # OpenSMTPD/smtpd/mta.c
|
|
15
20
|
"dns records for the destination computer could not be found",
|
|
21
|
+
"establish an smtp connection",
|
|
22
|
+
"exceeded maximum hop count", # Courier
|
|
16
23
|
"host is unreachable",
|
|
17
24
|
"host name lookup failure",
|
|
18
25
|
"host not found, try again",
|
|
26
|
+
"listed as a best-preference mx",
|
|
27
|
+
"loop detected", # OpenSMTPD/smtpd/mta.c
|
|
19
28
|
"maximum forwarding loop count exceeded",
|
|
20
|
-
"
|
|
29
|
+
"network error on destination mxs", # OpenSMTPD/smtpd/mta.c
|
|
30
|
+
"no relevant answers",
|
|
31
|
+
"temporary failure in mx lookup", # OpenSMTPD/smtpd/mta.c
|
|
21
32
|
"too many hops",
|
|
22
33
|
"unable to resolve route ",
|
|
23
34
|
"unrouteable mail domain",
|
|
@@ -26,6 +37,7 @@ module Sisimai
|
|
|
26
37
|
["malformed", "name server reply"],
|
|
27
38
|
["mail ", "loop"],
|
|
28
39
|
["message ", "loop"],
|
|
40
|
+
["no ", "route to"],
|
|
29
41
|
].freeze
|
|
30
42
|
|
|
31
43
|
def text; return 'networkerror'; end
|
|
@@ -16,9 +16,10 @@ module Sisimai
|
|
|
16
16
|
"insecure mail relay",
|
|
17
17
|
"no relaying",
|
|
18
18
|
"not a gateway",
|
|
19
|
-
"not an open relay, so get lost",
|
|
20
19
|
"not local host",
|
|
20
|
+
"open relay",
|
|
21
21
|
"relay not permitted",
|
|
22
|
+
"relay prohibition",
|
|
22
23
|
"relaying denied", # Sendmail
|
|
23
24
|
"relaying mail to ",
|
|
24
25
|
"send to a non-local e-mail address", # MailEnable
|
|
@@ -28,7 +29,7 @@ module Sisimai
|
|
|
28
29
|
].freeze
|
|
29
30
|
Pairs = [
|
|
30
31
|
["relay ", "denied"],
|
|
31
|
-
["
|
|
32
|
+
["n", "t ", "to relay"],
|
|
32
33
|
].freeze
|
|
33
34
|
|
|
34
35
|
def text; return 'norelaying'; end
|
|
@@ -51,8 +52,8 @@ module Sisimai
|
|
|
51
52
|
# @see http://www.ietf.org/rfc/rfc2822.txt
|
|
52
53
|
def true(argvs)
|
|
53
54
|
r = argvs['reason'] || ''
|
|
55
|
+
return false if Sisimai::SMTP::Command::BeforeRCPT.include?(argvs['command'])
|
|
54
56
|
return false if r.start_with?('securityerror', 'systemerror', 'undefined')
|
|
55
|
-
return false if %w[CONN EHLO HELO].include?(argvs['command'])
|
|
56
57
|
return match(argvs['diagnosticcode'].downcase)
|
|
57
58
|
end
|
|
58
59
|
|
|
@@ -11,11 +11,17 @@ module Sisimai
|
|
|
11
11
|
class << self
|
|
12
12
|
# Destination mail server does not accept any message
|
|
13
13
|
Index = [
|
|
14
|
-
"
|
|
14
|
+
"destination seem to reject all mails", # OpenSMTPD/smtp/mta.c
|
|
15
|
+
"does not accept mail", # Sendmail, iCloud
|
|
15
16
|
"mail receiving disabled",
|
|
16
|
-
"
|
|
17
|
-
"
|
|
17
|
+
"mx or srv record indicated no smtp ", # Exim/routers/dnslookup.c:328
|
|
18
|
+
"name server: .: host not found", # Sendmail
|
|
19
|
+
"no host found for existing smtp ", # Exim/transports/smtp.c:3502
|
|
18
20
|
"no route for current request",
|
|
21
|
+
"null mx",
|
|
22
|
+
].freeze
|
|
23
|
+
Pairs = [
|
|
24
|
+
["no mx ", "found for "], # OpenSMTPD/smtp/mta.c
|
|
19
25
|
].freeze
|
|
20
26
|
|
|
21
27
|
def text; return 'notaccept'; end
|
|
@@ -27,6 +33,7 @@ module Sisimai
|
|
|
27
33
|
def match(argv1)
|
|
28
34
|
return false if argv1.nil? || argv1.empty?
|
|
29
35
|
return true if Index.any? { |a| argv1.include?(a) }
|
|
36
|
+
return true if Pairs.any? { |a| Sisimai::String.aligned(argv1, a) }
|
|
30
37
|
return false
|
|
31
38
|
end
|
|
32
39
|
|
|
@@ -27,6 +27,7 @@ module Sisimai
|
|
|
27
27
|
"message given low priority",
|
|
28
28
|
"message was rejected by organization policy",
|
|
29
29
|
"protocol violation",
|
|
30
|
+
"support.google.com/a/answer/172179",
|
|
30
31
|
"you're using a mass mailer",
|
|
31
32
|
].freeze
|
|
32
33
|
|
|
@@ -49,7 +50,11 @@ module Sisimai
|
|
|
49
50
|
# false: is not policy violation
|
|
50
51
|
# @since 4.22.0
|
|
51
52
|
# @see http://www.ietf.org/rfc/rfc2822.txt
|
|
52
|
-
def true(
|
|
53
|
+
def true(argvs)
|
|
54
|
+
return true if argvs['reason'] == 'policyviolation'
|
|
55
|
+
return false if argvs['command'] != '' && argvs['command'] != 'DATA'
|
|
56
|
+
return match(argvs['diagnosticcode'].downcase)
|
|
57
|
+
end
|
|
53
58
|
|
|
54
59
|
end
|
|
55
60
|
end
|
|
@@ -22,6 +22,7 @@ module Sisimai
|
|
|
22
22
|
"access denied (in reply to mail from command)",
|
|
23
23
|
"administrative prohibition",
|
|
24
24
|
"all recipient addresses rejected : access denied",
|
|
25
|
+
"badsendermx", # BadSenderMX
|
|
25
26
|
"backscatter protection detected an invalid or expired email address", # MDaemon
|
|
26
27
|
"by non-member to a members-only list",
|
|
27
28
|
"can't determine purported responsible address",
|
|
@@ -34,10 +35,12 @@ module Sisimai
|
|
|
34
35
|
"empty envelope senders not allowed",
|
|
35
36
|
"from: domain is invalid. please provide a valid from:",
|
|
36
37
|
"fully qualified email address required", # McAfee
|
|
38
|
+
"has an outgoing mail suspension",
|
|
37
39
|
"invalid sender",
|
|
38
40
|
"is not a registered gateway user",
|
|
39
41
|
"mail from not owned by user",
|
|
40
42
|
"mailfrom domain is listed in spamhaus",
|
|
43
|
+
"not member article from ", # FML
|
|
41
44
|
"null sender is not allowed",
|
|
42
45
|
"returned mail not accepted here",
|
|
43
46
|
"sending this from a different address or alias using the ",
|
|
@@ -46,8 +49,10 @@ module Sisimai
|
|
|
46
49
|
"sender domain is empty",
|
|
47
50
|
"sender domain listed at ",
|
|
48
51
|
"sender verify failed", # Exim callout
|
|
52
|
+
"sendernoa", # SenderNoA
|
|
49
53
|
"server does not accept mail from",
|
|
50
54
|
"spam reporting address", # SendGrid|a message to an address has previously been marked as Spam by the recipient.
|
|
55
|
+
"too many spam complaints",
|
|
51
56
|
"unroutable sender address",
|
|
52
57
|
"you are not allowed to post to this mailing list",
|
|
53
58
|
"your access to submit messages to this e-mail system has been rejected",
|
|
@@ -58,6 +63,7 @@ module Sisimai
|
|
|
58
63
|
["after mail from:", ".", " does not exist"],
|
|
59
64
|
["domain ", " is a dead domain"],
|
|
60
65
|
["email address ", "is not "],
|
|
66
|
+
["reject mail from ", "@"], # FML
|
|
61
67
|
["send", "blacklisted"],
|
|
62
68
|
["sender", " rejected"],
|
|
63
69
|
["sender is", " list"],
|
|
@@ -23,6 +23,7 @@ module Sisimai
|
|
|
23
23
|
"authentication failure",
|
|
24
24
|
"authentication required",
|
|
25
25
|
"authentication turned on in your email client",
|
|
26
|
+
"could not retrieve credentials", # OpenSMTPD/smtpd/mta.c
|
|
26
27
|
"unauthenticated senders not allowed",
|
|
27
28
|
"verification failure",
|
|
28
29
|
"you are not authorized to send mail, authentication is required",
|
|
@@ -22,13 +22,17 @@ module Sisimai
|
|
|
22
22
|
"mailbox unavailable or access denied",
|
|
23
23
|
"recipient rejected: temporarily inactive",
|
|
24
24
|
"recipient suspend the service",
|
|
25
|
+
"temporarily unavailable user",
|
|
26
|
+
"user is no longer with ",
|
|
25
27
|
"user or domain is disabled",
|
|
26
28
|
"user suspended", # http://mail.163.com/help/help_spam_16.htm
|
|
27
29
|
"vdelivermail: account is locked email bounced",
|
|
28
30
|
].freeze
|
|
29
31
|
Pairs = [
|
|
30
32
|
["account ", "disabled"],
|
|
33
|
+
["account ", "limited"],
|
|
31
34
|
["has been ", "suspended"],
|
|
35
|
+
["mailaddress ", "disabled"],
|
|
32
36
|
["mailbox ", "disabled"],
|
|
33
37
|
["not ", "active"],
|
|
34
38
|
].freeze
|
|
@@ -22,14 +22,7 @@ module Sisimai
|
|
|
22
22
|
# false: is not syntax error
|
|
23
23
|
# @since 4.1.25
|
|
24
24
|
# @see http://www.ietf.org/rfc/rfc2822.txt
|
|
25
|
-
def true(argvs)
|
|
26
|
-
return true if argvs['reason'] == 'syntaxerror'
|
|
27
|
-
|
|
28
|
-
reply = argvs['replycode'].to_i
|
|
29
|
-
return true if reply > 400 && reply < 408 || reply > 500 && reply < 508
|
|
30
|
-
return false
|
|
31
|
-
end
|
|
32
|
-
|
|
25
|
+
def true(argvs); return false; end
|
|
33
26
|
end
|
|
34
27
|
end
|
|
35
28
|
end
|
|
@@ -11,26 +11,44 @@ module Sisimai
|
|
|
11
11
|
class << self
|
|
12
12
|
Index = [
|
|
13
13
|
"aliasing/forwarding loop broken",
|
|
14
|
+
"automatic homedir creator crashed", # qmail-ldap-1.03-20040101.patch:19817 - 19866
|
|
14
15
|
"can't create user output file",
|
|
15
16
|
"cannot send e-mail to yourself",
|
|
16
17
|
"could not load ",
|
|
18
|
+
"delivery to file forbidden", # Exim/deliver.c:5614
|
|
19
|
+
"delivery to pipe forbidden", # Exim/deliver.c:5624
|
|
20
|
+
"input/output error",
|
|
17
21
|
"interrupted system call",
|
|
18
22
|
"it encountered an error while being processed",
|
|
19
23
|
"it would create a mail loop",
|
|
24
|
+
"ldap attribute", # qmail-ldap-1.03-20040101.patch:19817 - 19866
|
|
25
|
+
"ldap lookup", # qmail-ldap-1.03-20040101.patch:19817 - 19866
|
|
26
|
+
"ldap server", # qmail-ldap-1.03-20040101.patch:19817 - 19866
|
|
27
|
+
"lmtp error after ", # Exim/transports/lmtp.c:186
|
|
28
|
+
"local delivery failed", # Exim/transports/pipe.c:1156
|
|
29
|
+
"loop back warning:", # FML
|
|
20
30
|
"loop was found in the mail exchanger",
|
|
21
31
|
"loops back to myself",
|
|
32
|
+
"mail transport unavailable",
|
|
33
|
+
"may cause mail loop", # FML
|
|
34
|
+
"no such file or directory",
|
|
35
|
+
"error while executing qmail-forward", # qmail-ldap-1.03-20040101.patch:19817 - 19866
|
|
22
36
|
"queue file write error",
|
|
23
37
|
"recipient deferred because there is no mdb",
|
|
24
38
|
"remote server is misconfigured",
|
|
25
39
|
"service currently unavailable",
|
|
40
|
+
"several matches found in domino directory", # Donimo
|
|
26
41
|
"temporary local problem",
|
|
27
42
|
"timeout waiting for input",
|
|
43
|
+
"too many results returned but needs to be unique", # qmail-ldap-1.03-20040101.patch:19817 - 19866
|
|
28
44
|
"transaction failed ",
|
|
29
45
|
].freeze
|
|
30
46
|
Pairs = [
|
|
31
47
|
["config", " error"],
|
|
48
|
+
["fml ", "has detected a loop condition so that"], # FML
|
|
32
49
|
["internal ", "error"],
|
|
33
50
|
["local ", "error"],
|
|
51
|
+
["proxy", "broken pipe"],
|
|
34
52
|
["unable to connect ", "daemon"],
|
|
35
53
|
].freeze
|
|
36
54
|
|
|
@@ -103,8 +103,10 @@ module Sisimai
|
|
|
103
103
|
["unknown e", "mail address"],
|
|
104
104
|
["unknown local", "part"],
|
|
105
105
|
["user ", " not exist"],
|
|
106
|
+
["user ", "doesn't exist"],
|
|
106
107
|
["user ", "not found"],
|
|
107
108
|
["user (", ") unknown"],
|
|
109
|
+
["user <", "> unknown"],
|
|
108
110
|
].freeze
|
|
109
111
|
|
|
110
112
|
def text; return 'userunknown'; end
|
data/lib/sisimai/reason.rb
CHANGED
|
@@ -45,15 +45,15 @@ module Sisimai
|
|
|
45
45
|
ModulePath = Sisimai::Reason.path
|
|
46
46
|
GetRetried = Sisimai::Reason.retry
|
|
47
47
|
ClassOrder = [
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
# 0. true() meethod in the following reasons are called from Reason->find()
|
|
49
|
+
%w[MailboxFull EmailTooLarge Suspend HasMoved NoRelaying AuthFailure UserUnknown Filtered RequirePTR
|
|
50
|
+
NotCompliantRFC BadReputation ContentError Rejected HostUnknown SpamDetected RateLimited Blocked
|
|
51
|
+
FailedSTARTTLS NotAccept VirusDetected PolicyViolation
|
|
52
52
|
],
|
|
53
|
+
# 1. match() method in the following reasons are called from Reason->find()
|
|
53
54
|
%w[
|
|
54
|
-
MailboxFull
|
|
55
|
-
|
|
56
|
-
SecurityError Suppressed MailerError
|
|
55
|
+
MailboxFull SpamDetected VirusDetected NoRelaying SystemError NetworkError Suspend SystemFull
|
|
56
|
+
Suppressed MailerError SecurityError PolicyViolation SyntaxError Expired
|
|
57
57
|
],
|
|
58
58
|
%w[
|
|
59
59
|
MailboxFull EmailTooLarge Suspend UserUnknown Filtered Rejected HostUnknown SpamDetected
|