sisimai 5.4.1-java → 5.6.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/codecovio.yml +1 -1
- data/.github/workflows/rake-test.yml +1 -1
- data/ChangeLog.md +56 -0
- data/LICENSE +1 -1
- data/Makefile +2 -4
- data/README-JA.md +29 -23
- data/README.md +30 -24
- data/lib/sisimai/address.rb +92 -44
- data/lib/sisimai/arf.rb +7 -8
- data/lib/sisimai/datetime.rb +2 -2
- data/lib/sisimai/fact/json.rb +1 -2
- data/lib/sisimai/fact/yaml.rb +1 -2
- data/lib/sisimai/fact.rb +76 -36
- data/lib/sisimai/lda.rb +2 -2
- data/lib/sisimai/lhost/activehunter.rb +4 -5
- data/lib/sisimai/lhost/amazonses.rb +4 -5
- data/lib/sisimai/lhost/apachejames.rb +2 -2
- data/lib/sisimai/lhost/biglobe.rb +6 -6
- data/lib/sisimai/lhost/courier.rb +7 -7
- data/lib/sisimai/lhost/domino.rb +6 -6
- data/lib/sisimai/lhost/dragonfly.rb +5 -5
- data/lib/sisimai/lhost/einsundeins.rb +5 -5
- data/lib/sisimai/lhost/exchange2003.rb +7 -7
- data/lib/sisimai/lhost/exchange2007.rb +5 -5
- data/lib/sisimai/lhost/exim.rb +13 -15
- data/lib/sisimai/lhost/ezweb.rb +3 -2
- data/lib/sisimai/lhost/fml.rb +9 -9
- data/lib/sisimai/lhost/gmail.rb +9 -9
- data/lib/sisimai/lhost/gmx.rb +3 -3
- data/lib/sisimai/lhost/googlegroups.rb +6 -7
- data/lib/sisimai/lhost/googleworkspace.rb +5 -6
- data/lib/sisimai/lhost/imailserver.rb +4 -4
- data/lib/sisimai/lhost/kddi.rb +4 -4
- data/lib/sisimai/lhost/mailfoundry.rb +3 -3
- data/lib/sisimai/lhost/{mailmarshalsmtp.rb → mailmarshal.rb} +5 -5
- data/lib/sisimai/lhost/messagingserver.rb +8 -8
- data/lib/sisimai/lhost/mfilter.rb +8 -4
- data/lib/sisimai/lhost/mimecast.rb +105 -0
- data/lib/sisimai/lhost/notes.rb +5 -5
- data/lib/sisimai/lhost/opensmtpd.rb +5 -5
- data/lib/sisimai/lhost/postfix.rb +38 -32
- data/lib/sisimai/lhost/qmail.rb +11 -11
- data/lib/sisimai/lhost/sendmail.rb +13 -13
- data/lib/sisimai/lhost/{interscanmss.rb → trendmicro.rb} +8 -9
- data/lib/sisimai/lhost/v5sendmail.rb +7 -7
- data/lib/sisimai/lhost/verizon.rb +3 -3
- data/lib/sisimai/lhost/x1.rb +7 -4
- data/lib/sisimai/lhost/x2.rb +40 -12
- data/lib/sisimai/lhost/x3.rb +3 -3
- data/lib/sisimai/lhost/x6.rb +2 -2
- data/lib/sisimai/lhost/zoho.rb +5 -5
- data/lib/sisimai/lhost.rb +18 -17
- data/lib/sisimai/mail/maildir.rb +4 -4
- data/lib/sisimai/mail/mbox.rb +4 -4
- data/lib/sisimai/mail/memory.rb +1 -1
- data/lib/sisimai/mail/stdin.rb +2 -2
- data/lib/sisimai/message.rb +36 -34
- data/lib/sisimai/order.rb +5 -4
- data/lib/sisimai/reason/authfailure.rb +10 -14
- data/lib/sisimai/reason/badreputation.rb +8 -8
- data/lib/sisimai/reason/blocked.rb +58 -83
- data/lib/sisimai/reason/contenterror.rb +15 -10
- data/lib/sisimai/reason/{mesgtoobig.rb → emailtoolarge.rb} +23 -26
- data/lib/sisimai/reason/expired.rb +17 -24
- data/lib/sisimai/reason/failedstarttls.rb +1 -1
- data/lib/sisimai/reason/filtered.rb +14 -18
- data/lib/sisimai/reason/hasmoved.rb +3 -2
- data/lib/sisimai/reason/hostunknown.rb +18 -21
- data/lib/sisimai/reason/mailboxfull.rb +28 -50
- data/lib/sisimai/reason/mailererror.rb +1 -1
- data/lib/sisimai/reason/networkerror.rb +17 -17
- data/lib/sisimai/reason/norelaying.rb +20 -20
- data/lib/sisimai/reason/notaccept.rb +7 -10
- data/lib/sisimai/reason/notcompliantrfc.rb +6 -10
- data/lib/sisimai/reason/policyviolation.rb +12 -28
- data/lib/sisimai/reason/ratelimited.rb +62 -0
- data/lib/sisimai/reason/rejected.rb +46 -58
- data/lib/sisimai/reason/requireptr.rb +14 -26
- data/lib/sisimai/reason/securityerror.rb +14 -20
- data/lib/sisimai/reason/spamdetected.rb +52 -102
- data/lib/sisimai/reason/suspend.rb +27 -24
- data/lib/sisimai/reason/systemerror.rb +20 -24
- data/lib/sisimai/reason/systemfull.rb +2 -2
- data/lib/sisimai/reason/userunknown.rb +82 -114
- data/lib/sisimai/reason/vacation.rb +1 -1
- data/lib/sisimai/reason/virusdetected.rb +7 -9
- data/lib/sisimai/reason.rb +26 -26
- data/lib/sisimai/rfc1123.rb +58 -18
- data/lib/sisimai/rfc1894.rb +6 -8
- data/lib/sisimai/rfc2045.rb +25 -13
- data/lib/sisimai/rfc3464/thirdparty.rb +2 -3
- data/lib/sisimai/rfc3464.rb +6 -6
- data/lib/sisimai/rfc3834.rb +18 -8
- data/lib/sisimai/rfc5322.rb +9 -9
- data/lib/sisimai/rfc791.rb +2 -2
- data/lib/sisimai/rhost/aol.rb +4 -1
- data/lib/sisimai/rhost/apple.rb +15 -11
- data/lib/sisimai/rhost/cloudflare.rb +2 -0
- data/lib/sisimai/rhost/cox.rb +31 -25
- data/lib/sisimai/rhost/facebook.rb +24 -18
- data/lib/sisimai/rhost/franceptt.rb +92 -38
- data/lib/sisimai/rhost/godaddy.rb +34 -7
- data/lib/sisimai/rhost/google.rb +69 -70
- data/lib/sisimai/rhost/gsuite.rb +1 -1
- data/lib/sisimai/rhost/iua.rb +1 -1
- data/lib/sisimai/rhost/kddi.rb +1 -1
- data/lib/sisimai/rhost/messagelabs.rb +160 -2
- data/lib/sisimai/rhost/microsoft.rb +154 -107
- data/lib/sisimai/rhost/mimecast.rb +64 -55
- data/lib/sisimai/rhost/nttdocomo.rb +70 -90
- data/lib/sisimai/rhost/outlook.rb +1 -1
- data/lib/sisimai/rhost/spectrum.rb +8 -8
- data/lib/sisimai/rhost/tencent.rb +12 -13
- data/lib/sisimai/rhost/yahooinc.rb +9 -10
- data/lib/sisimai/rhost/zoho.rb +72 -0
- data/lib/sisimai/rhost.rb +4 -3
- data/lib/sisimai/smtp/command.rb +4 -2
- data/lib/sisimai/smtp/reply.rb +11 -4
- data/lib/sisimai/smtp/status.rb +67 -98
- data/lib/sisimai/smtp/transcript.rb +3 -3
- data/lib/sisimai/string.rb +4 -23
- data/lib/sisimai/version.rb +1 -1
- data/lib/sisimai.rb +1 -1
- data/set-of-emails/maildir/bsd/lhost-exim-56.eml +40 -40
- data/set-of-emails/maildir/bsd/lhost-mfilter-05.eml +41 -0
- data/set-of-emails/maildir/bsd/lhost-mimecast-01.eml +46 -0
- data/set-of-emails/maildir/bsd/lhost-mimecast-02.eml +59 -0
- data/set-of-emails/maildir/bsd/lhost-postfix-79.eml +81 -0
- data/set-of-emails/maildir/bsd/lhost-postfix-80.eml +84 -0
- data/set-of-emails/maildir/bsd/lhost-x1-03.eml +26 -0
- data/set-of-emails/maildir/bsd/lhost-x1-04.eml +45 -0
- data/set-of-emails/maildir/bsd/lhost-x2-07.eml +30 -0
- data/set-of-emails/maildir/bsd/rfc3464-66.eml +170 -0
- data/set-of-emails/maildir/bsd/rfc3834-06.eml +59 -0
- data/set-of-emails/maildir/bsd/rhost-zoho-01.eml +88 -0
- data/set-of-emails/maildir/bsd/rhost-zoho-02.eml +86 -0
- data/set-of-emails/maildir/bsd/rhost-zoho-03.eml +87 -0
- data/set-of-emails/maildir/bsd/rhost-zoho-04.eml +86 -0
- data/set-of-emails/maildir/not/rb-issue-368-bug.eml +39 -0
- data/sisimai-java.gemspec +1 -1
- data/sisimai.gemspec +1 -1
- metadata +28 -13
- data/lib/sisimai/reason/exceedlimit.rb +0 -47
- data/lib/sisimai/reason/speeding.rb +0 -47
- data/lib/sisimai/reason/toomanyconn.rb +0 -59
- /data/set-of-emails/maildir/bsd/{lhost-mailmarshalsmtp-02.eml → lhost-mailmarshal-02.eml} +0 -0
- /data/set-of-emails/maildir/bsd/{lhost-interscanmss-01.eml → lhost-trendmicro-01.eml} +0 -0
- /data/set-of-emails/maildir/bsd/{lhost-interscanmss-02.eml → lhost-trendmicro-02.eml} +0 -0
- /data/set-of-emails/maildir/bsd/{lhost-interscanmss-03.eml → lhost-trendmicro-03.eml} +0 -0
|
@@ -17,28 +17,22 @@ module Sisimai
|
|
|
17
17
|
#
|
|
18
18
|
module SecurityError
|
|
19
19
|
class << self
|
|
20
|
-
require 'sisimai/string'
|
|
21
|
-
|
|
22
20
|
Index = [
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"
|
|
32
|
-
'unauthenticated senders not allowed',
|
|
33
|
-
'verification failure',
|
|
34
|
-
'you are not authorized to send mail, authentication is required',
|
|
21
|
+
"account not subscribed to ses",
|
|
22
|
+
"authentication credentials invalid",
|
|
23
|
+
"authentication failure",
|
|
24
|
+
"authentication required",
|
|
25
|
+
"authentication turned on in your email client",
|
|
26
|
+
"unauthenticated senders not allowed",
|
|
27
|
+
"verification failure",
|
|
28
|
+
"you are not authorized to send mail, authentication is required",
|
|
29
|
+
"you don't authenticate or the domain isn't in my list of allowed rcpthosts",
|
|
35
30
|
].freeze
|
|
36
31
|
Pairs = [
|
|
37
|
-
[
|
|
38
|
-
[
|
|
39
|
-
[
|
|
40
|
-
[
|
|
41
|
-
['user ', ' is not authorized to perform ses:sendrawemail on resource'],
|
|
32
|
+
["authentication failed; server ", " said: "], # Postfix
|
|
33
|
+
["authentification invalide", "305"],
|
|
34
|
+
["authentification requise", "402"],
|
|
35
|
+
["user ", " is not authorized to perform ses:sendrawemail on resource"],
|
|
42
36
|
].freeze
|
|
43
37
|
|
|
44
38
|
def text; return 'securityerror'; end
|
|
@@ -48,7 +42,7 @@ module Sisimai
|
|
|
48
42
|
# @param [String] argv1 String to be matched with regular expressions
|
|
49
43
|
# @return [Boolean] false: Did not match, true: Matched
|
|
50
44
|
def match(argv1)
|
|
51
|
-
return false
|
|
45
|
+
return false if argv1.nil? || argv1.empty?
|
|
52
46
|
return true if Index.any? { |a| argv1.include?(a) }
|
|
53
47
|
return true if Pairs.any? { |a| Sisimai::String.aligned(argv1, a) }
|
|
54
48
|
return false
|
|
@@ -10,109 +10,59 @@ module Sisimai
|
|
|
10
10
|
# Last-Attempt-Date: Thu, 9 Apr 2008 23:34:45 +0900 (JST)
|
|
11
11
|
module SpamDetected
|
|
12
12
|
class << self
|
|
13
|
-
require 'sisimai/string'
|
|
14
|
-
|
|
15
13
|
Index = [
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
'message detected as spam',
|
|
43
|
-
'message filtered',
|
|
44
|
-
'message filtered. please see the faqs section on spam',
|
|
45
|
-
'message filtered. refer to the troubleshooting page at ',
|
|
46
|
-
'message looks like spam',
|
|
47
|
-
'message is being rejected as it seems to be a spam',
|
|
48
|
-
'message refused by mailmarshal spamprofiler',
|
|
49
|
-
'message refused by trustwave seg spamprofiler',
|
|
50
|
-
'message rejected as spam',
|
|
51
|
-
'message rejected because of unacceptable content',
|
|
52
|
-
'message rejected due to suspected spam content',
|
|
53
|
-
'message rejected for policy reasons',
|
|
54
|
-
'message was rejected for possible spam/virus content',
|
|
55
|
-
'our email server thinks this email is spam',
|
|
56
|
-
'our system has detected that this message is ',
|
|
57
|
-
'probable spam',
|
|
58
|
-
'reject bulk.advertising',
|
|
59
|
-
'rejected: spamassassin score ',
|
|
60
|
-
'rejected - bulk email',
|
|
61
|
-
'rejecting banned content',
|
|
62
|
-
'rejecting mail content',
|
|
63
|
-
'related to content with spam-like characteristics',
|
|
64
|
-
'sender domain listed at ',
|
|
65
|
-
'sending address not accepted due to spam filter',
|
|
66
|
-
'spam blocked',
|
|
67
|
-
'spam check',
|
|
68
|
-
'spam content matched',
|
|
69
|
-
'spam detected',
|
|
70
|
-
'spam email',
|
|
71
|
-
'spam email not accepted',
|
|
72
|
-
'spam message rejected.', # mail.ru
|
|
73
|
-
'spam not accepted',
|
|
74
|
-
'spam refused',
|
|
75
|
-
'spam rejection',
|
|
76
|
-
'spam score ',
|
|
77
|
-
'spambouncer identified spam', # SpamBouncer identified SPAM
|
|
78
|
-
'spamming not allowed',
|
|
79
|
-
'too many spam complaints',
|
|
80
|
-
'too much spam.', # Earthlink
|
|
81
|
-
'the email message was detected as spam',
|
|
82
|
-
'the message has been rejected by spam filtering engine',
|
|
83
|
-
'the message was rejected due to classification as bulk mail',
|
|
84
|
-
'the content of this message looked like spam', # SendGrid
|
|
85
|
-
'this message appears to be spam',
|
|
86
|
-
'this message has been identified as spam',
|
|
87
|
-
'this message has been scored as spam with a probability',
|
|
88
|
-
'this message was classified as spam',
|
|
89
|
-
'this message was rejected by recurrent pattern detection system',
|
|
90
|
-
'transaction failed spam message not queued', # SendGrid
|
|
91
|
-
'we dont accept spam',
|
|
92
|
-
'your email appears similar to spam we have received before',
|
|
93
|
-
'your email breaches local uribl policy',
|
|
94
|
-
'your email had spam-like ',
|
|
95
|
-
'your email is considered spam',
|
|
96
|
-
'your email is probably spam',
|
|
97
|
-
'your email was detected as spam',
|
|
98
|
-
'your message as spam and has prevented delivery',
|
|
99
|
-
'your message has been temporarily blocked by our filter',
|
|
100
|
-
'your message has been rejected because it appears to be spam',
|
|
101
|
-
'your message has triggered a spam block',
|
|
102
|
-
'your message may contain the spam contents',
|
|
103
|
-
'your message failed several antispam checks',
|
|
14
|
+
"blacklisted url in message",
|
|
15
|
+
"block for spam",
|
|
16
|
+
"blocked by policy: no spam please",
|
|
17
|
+
"blocked by spamassassin", # rejected by SpamAssassin
|
|
18
|
+
"classified as spam and is rejected",
|
|
19
|
+
"content filter rejection",
|
|
20
|
+
"denied due to spam list",
|
|
21
|
+
"identified spam", # 554 SpamBouncer identified SPAM, message permanently rejected (#5.3.0)
|
|
22
|
+
"may consider spam",
|
|
23
|
+
"message content rejected",
|
|
24
|
+
"message has been temporarily blocked by our filter",
|
|
25
|
+
"message is being rejected as it seems to be a spam",
|
|
26
|
+
"message was rejected by recurrent pattern detection system",
|
|
27
|
+
"our email server thinks this email is spam",
|
|
28
|
+
"reject bulk.advertising",
|
|
29
|
+
"spam check",
|
|
30
|
+
"spam content ",
|
|
31
|
+
"spam detected",
|
|
32
|
+
"spam email",
|
|
33
|
+
"spam-like header",
|
|
34
|
+
"spam message",
|
|
35
|
+
"spam not accepted",
|
|
36
|
+
"spam refused",
|
|
37
|
+
"spamming not allowed",
|
|
38
|
+
"unsolicited ",
|
|
39
|
+
"your email breaches local uribl policy",
|
|
104
40
|
].freeze
|
|
105
41
|
Pairs = [
|
|
106
|
-
[
|
|
107
|
-
[
|
|
108
|
-
[
|
|
109
|
-
[
|
|
110
|
-
[
|
|
111
|
-
[
|
|
112
|
-
[
|
|
113
|
-
[
|
|
114
|
-
[
|
|
115
|
-
[
|
|
42
|
+
["accept", " spam"],
|
|
43
|
+
["appears", " to ", "spam"],
|
|
44
|
+
["bulk", "mail"],
|
|
45
|
+
["considered", " spam"],
|
|
46
|
+
["contain", " spam"],
|
|
47
|
+
["detected", " spam"],
|
|
48
|
+
["greylisted", " please try again in"],
|
|
49
|
+
["mail score (", " over "],
|
|
50
|
+
["mail rejete. mail rejected. ", "506"],
|
|
51
|
+
["message ", "as spam"],
|
|
52
|
+
["message ", "like spam"],
|
|
53
|
+
["message ", "spamprofiler"],
|
|
54
|
+
["probab", " spam"],
|
|
55
|
+
["refused by", " spamprofiler"],
|
|
56
|
+
["reject", " content"],
|
|
57
|
+
["reject, id=", "spam"],
|
|
58
|
+
["rejected by ", " (spam)"],
|
|
59
|
+
["rejected due to spam ", "classification"],
|
|
60
|
+
["rule imposed as ", " is blacklisted on"],
|
|
61
|
+
["score", "spam"],
|
|
62
|
+
["spam ", "block"],
|
|
63
|
+
["spam ", "filter"],
|
|
64
|
+
["spam ", " exceeded"],
|
|
65
|
+
["spam ", "score"],
|
|
116
66
|
].freeze
|
|
117
67
|
|
|
118
68
|
def text; return 'spamdetected'; end
|
|
@@ -122,7 +72,7 @@ module Sisimai
|
|
|
122
72
|
# @param [String] argv1 String to be matched with regular expressions
|
|
123
73
|
# @return [Boolean] false: Did not match, true: Matched
|
|
124
74
|
def match(argv1)
|
|
125
|
-
return false
|
|
75
|
+
return false if argv1.nil? || argv1.empty?
|
|
126
76
|
return true if Index.any? { |a| argv1.include?(a) }
|
|
127
77
|
return true if Pairs.any? { |a| Sisimai::String.aligned(argv1, a) }
|
|
128
78
|
return false
|
|
@@ -141,7 +91,7 @@ module Sisimai
|
|
|
141
91
|
# The value of "reason" isn't "spamdetected" when the value of "command" is an SMTP command
|
|
142
92
|
# to be sent before the SMTP DATA command because all the MTAs read the headers and the
|
|
143
93
|
# entire message body after the DATA command.
|
|
144
|
-
return false if
|
|
94
|
+
return false if Sisimai::SMTP::Command::ExceptDATA.include?(argvs['command'])
|
|
145
95
|
return match(argvs['diagnosticcode'].downcase)
|
|
146
96
|
end
|
|
147
97
|
|
|
@@ -6,29 +6,31 @@ module Sisimai
|
|
|
6
6
|
module Suspend
|
|
7
7
|
class << self
|
|
8
8
|
Index = [
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
9
|
+
" currently suspended",
|
|
10
|
+
" temporary locked",
|
|
11
|
+
"address no longer accepts mail",
|
|
12
|
+
"archived recipient",
|
|
13
|
+
"boite du destinataire archivee",
|
|
14
|
+
"email account that you tried to reach is inactive",
|
|
15
|
+
"inactive account",
|
|
16
|
+
"inactivity new mail is not currently being accepted for this mailbox",
|
|
17
|
+
"invalid/inactive user",
|
|
18
|
+
"is a deactivated mailbox", # http://service.mail.qq.com/cgi-bin/help?subtype=1&&id=20022&&no=1000742
|
|
19
|
+
"is unavailable: user is terminated",
|
|
20
|
+
"mailbox is frozen",
|
|
21
|
+
"mailbox is inactive",
|
|
22
|
+
"mailbox unavailable or access denied",
|
|
23
|
+
"recipient rejected: temporarily inactive",
|
|
24
|
+
"recipient suspend the service",
|
|
25
|
+
"user or domain is disabled",
|
|
26
|
+
"user suspended", # http://mail.163.com/help/help_spam_16.htm
|
|
27
|
+
"vdelivermail: account is locked email bounced",
|
|
28
|
+
].freeze
|
|
29
|
+
Pairs = [
|
|
30
|
+
["account ", "disabled"],
|
|
31
|
+
["has been ", "suspended"],
|
|
32
|
+
["mailbox ", "disabled"],
|
|
33
|
+
["not ", "active"],
|
|
32
34
|
].freeze
|
|
33
35
|
|
|
34
36
|
def text; return 'suspend'; end
|
|
@@ -38,8 +40,9 @@ module Sisimai
|
|
|
38
40
|
# @param [String] argv1 String to be matched with regular expressions
|
|
39
41
|
# @return [Boolean] false: Did not match, true: Matched
|
|
40
42
|
def match(argv1)
|
|
41
|
-
return false
|
|
43
|
+
return false if argv1.nil? || argv1.empty?
|
|
42
44
|
return true if Index.any? { |a| argv1.include?(a) }
|
|
45
|
+
return true if Pairs.any? { |a| Sisimai::String.aligned(argv1, a) }
|
|
43
46
|
return false
|
|
44
47
|
end
|
|
45
48
|
|
|
@@ -9,33 +9,29 @@ module Sisimai
|
|
|
9
9
|
# message has been in the queue too long.
|
|
10
10
|
module SystemError
|
|
11
11
|
class << self
|
|
12
|
-
require 'sisimai/string'
|
|
13
12
|
Index = [
|
|
14
|
-
|
|
13
|
+
"aliasing/forwarding loop broken",
|
|
15
14
|
"can't create user output file",
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
'server configuration error',
|
|
31
|
-
'service currently unavailable',
|
|
32
|
-
'system config error',
|
|
33
|
-
'temporary local problem',
|
|
34
|
-
'timeout waiting for input',
|
|
35
|
-
'transaction failed ',
|
|
15
|
+
"cannot send e-mail to yourself",
|
|
16
|
+
"could not load ",
|
|
17
|
+
"interrupted system call",
|
|
18
|
+
"it encountered an error while being processed",
|
|
19
|
+
"it would create a mail loop",
|
|
20
|
+
"loop was found in the mail exchanger",
|
|
21
|
+
"loops back to myself",
|
|
22
|
+
"queue file write error",
|
|
23
|
+
"recipient deferred because there is no mdb",
|
|
24
|
+
"remote server is misconfigured",
|
|
25
|
+
"service currently unavailable",
|
|
26
|
+
"temporary local problem",
|
|
27
|
+
"timeout waiting for input",
|
|
28
|
+
"transaction failed ",
|
|
36
29
|
].freeze
|
|
37
30
|
Pairs = [
|
|
38
|
-
[
|
|
31
|
+
["config", " error"],
|
|
32
|
+
["internal ", "error"],
|
|
33
|
+
["local ", "error"],
|
|
34
|
+
["unable to connect ", "daemon"],
|
|
39
35
|
].freeze
|
|
40
36
|
|
|
41
37
|
def text; return 'systemerror'; end
|
|
@@ -45,7 +41,7 @@ module Sisimai
|
|
|
45
41
|
# @param [String] argv1 String to be matched with regular expressions
|
|
46
42
|
# @return [Boolean] false: Did not match, true: Matched
|
|
47
43
|
def match(argv1)
|
|
48
|
-
return false
|
|
44
|
+
return false if argv1.nil? || argv1.empty?
|
|
49
45
|
return true if Index.any? { |a| argv1.include?(a) }
|
|
50
46
|
return true if Pairs.any? { |a| Sisimai::String.aligned(argv1, a) }
|
|
51
47
|
return false
|
|
@@ -9,8 +9,8 @@ module Sisimai
|
|
|
9
9
|
module SystemFull
|
|
10
10
|
class << self
|
|
11
11
|
Index = [
|
|
12
|
+
'exceeded storage allocation', # MS Exchange
|
|
12
13
|
'mail system full',
|
|
13
|
-
'requested mail action aborted: exceeded storage allocation', # MS Exchange
|
|
14
14
|
].freeze
|
|
15
15
|
|
|
16
16
|
def text; return 'systemfull'; end
|
|
@@ -20,7 +20,7 @@ module Sisimai
|
|
|
20
20
|
# @param [String] argv1 String to be matched with regular expressions
|
|
21
21
|
# @return [Boolean] false: Did not match, true: Matched
|
|
22
22
|
def match(argv1)
|
|
23
|
-
return false
|
|
23
|
+
return false if argv1.nil? || argv1.empty?
|
|
24
24
|
return true if Index.any? { |a| argv1.include?(a) }
|
|
25
25
|
return false
|
|
26
26
|
end
|
|
@@ -14,8 +14,6 @@ module Sisimai
|
|
|
14
14
|
# RCPT TO command)
|
|
15
15
|
module UserUnknown
|
|
16
16
|
class << self
|
|
17
|
-
require 'sisimai/string'
|
|
18
|
-
|
|
19
17
|
PreMatches = %w[NoRelaying Blocked MailboxFull HasMoved Rejected NotAccept]
|
|
20
18
|
ModulePath = {
|
|
21
19
|
'Sisimai::Reason::NoRelaying' => 'sisimai/reason/norelaying',
|
|
@@ -26,118 +24,87 @@ module Sisimai
|
|
|
26
24
|
'Sisimai::Reason::NotAccept' => 'sisimai/reason/notaccept',
|
|
27
25
|
}
|
|
28
26
|
Index = [
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
27
|
+
"#5.1.1 bad address",
|
|
28
|
+
"550 address invalid",
|
|
29
|
+
"5.1.0 address rejected.",
|
|
30
|
+
"address not present in directory",
|
|
31
|
+
"address unknown",
|
|
32
|
+
"badrcptto",
|
|
35
33
|
"can't accept user",
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
'
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
'recipient not found',
|
|
84
|
-
'recipient not ok',
|
|
85
|
-
'recipient refuses to accept your mail',
|
|
86
|
-
'recipient unknown',
|
|
87
|
-
'requested action not taken: mailbox unavailable',
|
|
88
|
-
'resolver.adr.recipient notfound',
|
|
89
|
-
'sorry, user unknown',
|
|
90
|
-
'sorry, badrcptto',
|
|
91
|
-
'sorry, no mailbox here by that name',
|
|
92
|
-
'sorry, your envelope recipient has been denied',
|
|
93
|
-
"that domain or user isn't in my list of allowed rcpthosts",
|
|
94
|
-
'the email account that you tried to reach does not exist',
|
|
95
|
-
'the following recipients was undeliverable',
|
|
96
|
-
"the user's email name is not found",
|
|
97
|
-
'there is no one at this address',
|
|
98
|
-
'this address no longer accepts mail',
|
|
99
|
-
'this email address is wrong or no longer valid',
|
|
100
|
-
'this recipient is in my badrecipientto list',
|
|
101
|
-
'this recipient is not in my validrcptto list',
|
|
102
|
-
'this spectator does not exist',
|
|
103
|
-
'unknown mailbox',
|
|
104
|
-
'unknown recipient',
|
|
105
|
-
'unknown user',
|
|
106
|
-
'user does not exist',
|
|
107
|
-
'user missing home directory',
|
|
108
|
-
'user not active',
|
|
109
|
-
'user not exist',
|
|
110
|
-
'user not found',
|
|
111
|
-
'user not known',
|
|
112
|
-
'user unknown',
|
|
113
|
-
'utilisateur inconnu !',
|
|
114
|
-
'vdeliver: invalid or unknown virtual user',
|
|
115
|
-
'your envelope recipient is in my badrcptto list',
|
|
34
|
+
"destination addresses were unknown",
|
|
35
|
+
"destination server rejected recipients",
|
|
36
|
+
"domain or user isn't in my list of allowed rcpthosts",
|
|
37
|
+
"email account that you tried to reach does not exist",
|
|
38
|
+
"email address could not be found",
|
|
39
|
+
"invalid address",
|
|
40
|
+
"invalid mailbox",
|
|
41
|
+
"is not a known user",
|
|
42
|
+
"is not a valid mailbox",
|
|
43
|
+
"mailbox does not exist",
|
|
44
|
+
"mailbox invalid",
|
|
45
|
+
"mailbox not present",
|
|
46
|
+
"mailbox not found",
|
|
47
|
+
"nessun utente simile in questo indirizzo",
|
|
48
|
+
"no account by that name here",
|
|
49
|
+
"no existe dicha persona",
|
|
50
|
+
"no existe ese usuario ",
|
|
51
|
+
"no such recipient",
|
|
52
|
+
"no such user",
|
|
53
|
+
"no thank you rejected: account unavailable",
|
|
54
|
+
"no valid recipients, bye",
|
|
55
|
+
"not a valid recipient",
|
|
56
|
+
"not a valid user here",
|
|
57
|
+
"not a local address",
|
|
58
|
+
"not email addresses",
|
|
59
|
+
"recipient address rejected. (in reply to rcpt to command)",
|
|
60
|
+
"recipient address rejected: access denied",
|
|
61
|
+
"recipient address rejected: userunknown",
|
|
62
|
+
"recipient is in my badrecipientto list",
|
|
63
|
+
"recipient is not accepted",
|
|
64
|
+
"recipient is not in my validrcptto list",
|
|
65
|
+
"recipient is not local",
|
|
66
|
+
"recipient not ok",
|
|
67
|
+
"recipient refuses to accept your mail",
|
|
68
|
+
"recipient unknown",
|
|
69
|
+
"recipients was undeliverable",
|
|
70
|
+
"spectator does not exist",
|
|
71
|
+
"there is no one at this address",
|
|
72
|
+
"unknown mailbox",
|
|
73
|
+
"unknown recipient",
|
|
74
|
+
"unknown user",
|
|
75
|
+
"user missing home directory",
|
|
76
|
+
"user not known",
|
|
77
|
+
"user unknown",
|
|
78
|
+
"utilisateur inconnu !",
|
|
79
|
+
"weil die adresse nicht gefunden wurde oder keine e-mails empfangen kann",
|
|
80
|
+
"your envelope recipient has been denied",
|
|
116
81
|
].freeze
|
|
117
82
|
Pairs = [
|
|
118
|
-
[
|
|
119
|
-
[
|
|
120
|
-
[
|
|
121
|
-
[
|
|
122
|
-
[
|
|
123
|
-
[
|
|
124
|
-
[
|
|
125
|
-
[
|
|
126
|
-
[
|
|
127
|
-
[
|
|
128
|
-
[
|
|
129
|
-
[
|
|
130
|
-
[
|
|
131
|
-
[
|
|
132
|
-
[
|
|
133
|
-
[
|
|
134
|
-
[
|
|
83
|
+
["<", "> not found"],
|
|
84
|
+
["<", ">... blocked by "],
|
|
85
|
+
["account ", " does not exist at the organization"],
|
|
86
|
+
["address", " no longer"],
|
|
87
|
+
["address", " not exist"],
|
|
88
|
+
["bad", "recipient"],
|
|
89
|
+
["invalid", "recipient"],
|
|
90
|
+
["invalid", "user"],
|
|
91
|
+
["mailbox ", "does not exist"],
|
|
92
|
+
["mailbox ", "unavailable"],
|
|
93
|
+
["no ", " in name directory"],
|
|
94
|
+
["no ", "mail", "box "],
|
|
95
|
+
["no ", "such", "address"],
|
|
96
|
+
["non", "existent user"],
|
|
97
|
+
["rcpt <", " does not exist"],
|
|
98
|
+
["rcpt (", "t exist "],
|
|
99
|
+
["recipient no", "found"],
|
|
100
|
+
["recipient ", " not exist"],
|
|
101
|
+
["recipient ", " was not found in"],
|
|
135
102
|
["this user doesn't have a ", " account"],
|
|
136
|
-
[
|
|
137
|
-
[
|
|
138
|
-
[
|
|
139
|
-
[
|
|
140
|
-
[
|
|
103
|
+
["unknown e", "mail address"],
|
|
104
|
+
["unknown local", "part"],
|
|
105
|
+
["user ", " not exist"],
|
|
106
|
+
["user ", "not found"],
|
|
107
|
+
["user (", ") unknown"],
|
|
141
108
|
].freeze
|
|
142
109
|
|
|
143
110
|
def text; return 'userunknown'; end
|
|
@@ -147,7 +114,7 @@ module Sisimai
|
|
|
147
114
|
# @param [String] argv1 String to be matched with regular expressions
|
|
148
115
|
# @return [Boolean] false: Did not match, true: Matched
|
|
149
116
|
def match(argv1)
|
|
150
|
-
return false
|
|
117
|
+
return false if argv1.nil? || argv1.empty?
|
|
151
118
|
return true if Index.any? { |a| argv1.include?(a) }
|
|
152
119
|
return true if Pairs.any? { |a| Sisimai::String.aligned(argv1, a) }
|
|
153
120
|
return false
|
|
@@ -159,7 +126,8 @@ module Sisimai
|
|
|
159
126
|
# false: is not unknown user.
|
|
160
127
|
# @see http://www.ietf.org/rfc/rfc2822.txt
|
|
161
128
|
def true(argvs)
|
|
162
|
-
return true
|
|
129
|
+
return true if argvs['reason'] == 'userunknown'
|
|
130
|
+
return false if Sisimai::SMTP::Command::BeforeRCPT.include?(argvs['command'])
|
|
163
131
|
|
|
164
132
|
tempreason = Sisimai::SMTP::Status.name(argvs['deliverystatus'])
|
|
165
133
|
return false if tempreason == 'suspend'
|
|
@@ -183,12 +151,12 @@ module Sisimai
|
|
|
183
151
|
next
|
|
184
152
|
end
|
|
185
153
|
|
|
186
|
-
next
|
|
154
|
+
next if r.match(issuedcode) == false
|
|
187
155
|
# Match with reason defined in Sisimai::Reason::* except UserUnknown.
|
|
188
156
|
matchother = true
|
|
189
157
|
break
|
|
190
158
|
end
|
|
191
|
-
return true
|
|
159
|
+
return true if matchother == false # Did not match with other message patterns
|
|
192
160
|
|
|
193
161
|
elsif argvs['command'] == 'RCPT'
|
|
194
162
|
# When the SMTP command is not "RCPT", the session rejected by other
|
|
@@ -18,7 +18,7 @@ module Sisimai
|
|
|
18
18
|
# @param [String] argv1 String to be matched with regular expressions
|
|
19
19
|
# @return [Boolean] false: Did not match, true: Matched
|
|
20
20
|
def match(argv1)
|
|
21
|
-
return false
|
|
21
|
+
return false if argv1.nil? || argv1.empty?
|
|
22
22
|
return true if Index.any? { |a| argv1.include?(a) }
|
|
23
23
|
return false
|
|
24
24
|
end
|