sisimai 5.5.0 → 5.7.0
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 +53 -0
- data/LICENSE +1 -1
- data/README-JA.md +26 -20
- data/README.md +30 -25
- data/lib/sisimai/address.rb +8 -31
- data/lib/sisimai/arf.rb +3 -5
- data/lib/sisimai/fact.rb +26 -36
- data/lib/sisimai/lhost/activehunter.rb +0 -2
- data/lib/sisimai/lhost/amazonses.rb +7 -9
- 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 +5 -6
- data/lib/sisimai/lhost/exim.rb +35 -85
- 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 +3 -1
- data/lib/sisimai/order.rb +4 -1
- data/lib/sisimai/reason/authfailure.rb +9 -13
- data/lib/sisimai/reason/badreputation.rb +7 -7
- data/lib/sisimai/reason/blocked.rb +57 -83
- data/lib/sisimai/reason/contenterror.rb +16 -8
- data/lib/sisimai/reason/{mesgtoobig.rb → emailtoolarge.rb} +22 -25
- data/lib/sisimai/reason/expired.rb +27 -23
- data/lib/sisimai/reason/filtered.rb +13 -17
- data/lib/sisimai/reason/hasmoved.rb +2 -1
- data/lib/sisimai/reason/hostunknown.rb +25 -19
- data/lib/sisimai/reason/mailboxfull.rb +28 -49
- data/lib/sisimai/reason/networkerror.rb +28 -16
- data/lib/sisimai/reason/norelaying.rb +21 -20
- data/lib/sisimai/reason/notaccept.rb +13 -8
- data/lib/sisimai/reason/notcompliantrfc.rb +6 -9
- data/lib/sisimai/reason/policyviolation.rb +17 -26
- data/lib/sisimai/reason/ratelimited.rb +62 -0
- data/lib/sisimai/reason/rejected.rb +51 -59
- data/lib/sisimai/reason/requireptr.rb +13 -25
- data/lib/sisimai/reason/securityerror.rb +14 -19
- data/lib/sisimai/reason/spamdetected.rb +51 -101
- data/lib/sisimai/reason/suspend.rb +30 -24
- data/lib/sisimai/reason/syntaxerror.rb +1 -8
- data/lib/sisimai/reason/systemerror.rb +37 -23
- data/lib/sisimai/reason/systemfull.rb +1 -1
- data/lib/sisimai/reason/userunknown.rb +81 -112
- data/lib/sisimai/reason/virusdetected.rb +6 -8
- data/lib/sisimai/reason.rb +15 -15
- 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/apple.rb +5 -5
- data/lib/sisimai/rhost/cloudflare.rb +2 -0
- data/lib/sisimai/rhost/cox.rb +22 -20
- data/lib/sisimai/rhost/facebook.rb +16 -16
- data/lib/sisimai/rhost/franceptt.rb +8 -3
- data/lib/sisimai/rhost/godaddy.rb +33 -15
- data/lib/sisimai/rhost/google.rb +63 -64
- data/lib/sisimai/rhost/iua.rb +1 -1
- data/lib/sisimai/rhost/messagelabs.rb +12 -12
- data/lib/sisimai/rhost/microsoft.rb +86 -86
- data/lib/sisimai/rhost/mimecast.rb +34 -34
- data/lib/sisimai/rhost/nttdocomo.rb +2 -2
- data/lib/sisimai/rhost/spectrum.rb +7 -7
- data/lib/sisimai/rhost/tencent.rb +9 -11
- data/lib/sisimai/rhost/yahooinc.rb +7 -8
- data/lib/sisimai/rhost.rb +1 -1
- data/lib/sisimai/smtp/command.rb +2 -0
- data/lib/sisimai/smtp/status.rb +73 -109
- data/lib/sisimai/string.rb +0 -27
- 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 +10 -6
- data/lib/sisimai/reason/exceedlimit.rb +0 -47
- data/lib/sisimai/reason/speeding.rb +0 -47
- data/lib/sisimai/reason/toomanyconn.rb +0 -59
|
@@ -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
|
|
@@ -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,30 +6,35 @@ 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
|
-
|
|
32
|
-
|
|
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
|
+
"temporarily unavailable user",
|
|
26
|
+
"user is no longer with ",
|
|
27
|
+
"user or domain is disabled",
|
|
28
|
+
"user suspended", # http://mail.163.com/help/help_spam_16.htm
|
|
29
|
+
"vdelivermail: account is locked email bounced",
|
|
30
|
+
].freeze
|
|
31
|
+
Pairs = [
|
|
32
|
+
["account ", "disabled"],
|
|
33
|
+
["account ", "limited"],
|
|
34
|
+
["has been ", "suspended"],
|
|
35
|
+
["mailaddress ", "disabled"],
|
|
36
|
+
["mailbox ", "disabled"],
|
|
37
|
+
["not ", "active"],
|
|
33
38
|
].freeze
|
|
34
39
|
|
|
35
40
|
def text; return 'suspend'; end
|
|
@@ -41,6 +46,7 @@ module Sisimai
|
|
|
41
46
|
def match(argv1)
|
|
42
47
|
return false if argv1.nil? || argv1.empty?
|
|
43
48
|
return true if Index.any? { |a| argv1.include?(a) }
|
|
49
|
+
return true if Pairs.any? { |a| Sisimai::String.aligned(argv1, a) }
|
|
44
50
|
return false
|
|
45
51
|
end
|
|
46
52
|
|
|
@@ -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
|
|
@@ -9,33 +9,47 @@ 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",
|
|
14
|
+
"automatic homedir creator crashed", # qmail-ldap-1.03-20040101.patch:19817 - 19866
|
|
15
15
|
"can't create user output file",
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
16
|
+
"cannot send e-mail to yourself",
|
|
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",
|
|
21
|
+
"interrupted system call",
|
|
22
|
+
"it encountered an error while being processed",
|
|
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
|
|
30
|
+
"loop was found in the mail exchanger",
|
|
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
|
|
36
|
+
"queue file write error",
|
|
37
|
+
"recipient deferred because there is no mdb",
|
|
38
|
+
"remote server is misconfigured",
|
|
39
|
+
"service currently unavailable",
|
|
40
|
+
"several matches found in domino directory", # Donimo
|
|
41
|
+
"temporary local problem",
|
|
42
|
+
"timeout waiting for input",
|
|
43
|
+
"too many results returned but needs to be unique", # qmail-ldap-1.03-20040101.patch:19817 - 19866
|
|
44
|
+
"transaction failed ",
|
|
36
45
|
].freeze
|
|
37
46
|
Pairs = [
|
|
38
|
-
[
|
|
47
|
+
["config", " error"],
|
|
48
|
+
["fml ", "has detected a loop condition so that"], # FML
|
|
49
|
+
["internal ", "error"],
|
|
50
|
+
["local ", "error"],
|
|
51
|
+
["proxy", "broken pipe"],
|
|
52
|
+
["unable to connect ", "daemon"],
|
|
39
53
|
].freeze
|
|
40
54
|
|
|
41
55
|
def text; return 'systemerror'; end
|
|
@@ -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
|
|
@@ -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,119 +24,89 @@ 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
|
-
'weil die adresse nicht gefunden wurde oder keine e-mails empfangen kann',
|
|
116
|
-
'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",
|
|
117
81
|
].freeze
|
|
118
82
|
Pairs = [
|
|
119
|
-
[
|
|
120
|
-
[
|
|
121
|
-
[
|
|
122
|
-
[
|
|
123
|
-
[
|
|
124
|
-
[
|
|
125
|
-
[
|
|
126
|
-
[
|
|
127
|
-
[
|
|
128
|
-
[
|
|
129
|
-
[
|
|
130
|
-
[
|
|
131
|
-
[
|
|
132
|
-
[
|
|
133
|
-
[
|
|
134
|
-
[
|
|
135
|
-
[
|
|
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"],
|
|
136
102
|
["this user doesn't have a ", " account"],
|
|
137
|
-
[
|
|
138
|
-
[
|
|
139
|
-
[
|
|
140
|
-
[
|
|
141
|
-
[
|
|
103
|
+
["unknown e", "mail address"],
|
|
104
|
+
["unknown local", "part"],
|
|
105
|
+
["user ", " not exist"],
|
|
106
|
+
["user ", "doesn't exist"],
|
|
107
|
+
["user ", "not found"],
|
|
108
|
+
["user (", ") unknown"],
|
|
109
|
+
["user <", "> unknown"],
|
|
142
110
|
].freeze
|
|
143
111
|
|
|
144
112
|
def text; return 'userunknown'; end
|
|
@@ -160,7 +128,8 @@ module Sisimai
|
|
|
160
128
|
# false: is not unknown user.
|
|
161
129
|
# @see http://www.ietf.org/rfc/rfc2822.txt
|
|
162
130
|
def true(argvs)
|
|
163
|
-
return true
|
|
131
|
+
return true if argvs['reason'] == 'userunknown'
|
|
132
|
+
return false if Sisimai::SMTP::Command::BeforeRCPT.include?(argvs['command'])
|
|
164
133
|
|
|
165
134
|
tempreason = Sisimai::SMTP::Status.name(argvs['deliverystatus'])
|
|
166
135
|
return false if tempreason == 'suspend'
|
|
@@ -14,13 +14,10 @@ module Sisimai
|
|
|
14
14
|
#
|
|
15
15
|
module VirusDetected
|
|
16
16
|
class << self
|
|
17
|
-
Index = [
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
'virus detected',
|
|
22
|
-
'virus phishing/malicious_url detected',
|
|
23
|
-
'your message was infected with a virus',
|
|
17
|
+
Index = ["it has a potentially executable attachment"].freeze
|
|
18
|
+
Pairs = [
|
|
19
|
+
["message was ", "ected", " virus"],
|
|
20
|
+
["virus", " detected"],
|
|
24
21
|
].freeze
|
|
25
22
|
|
|
26
23
|
def text; return 'virusdetected'; end
|
|
@@ -33,6 +30,7 @@ module Sisimai
|
|
|
33
30
|
def match(argv1)
|
|
34
31
|
return false if argv1.nil? || argv1.empty?
|
|
35
32
|
return true if Index.any? { |a| argv1.include?(a) }
|
|
33
|
+
return true if Pairs.any? { |a| Sisimai::String.aligned(argv1, a) }
|
|
36
34
|
return false
|
|
37
35
|
end
|
|
38
36
|
|
|
@@ -47,7 +45,7 @@ module Sisimai
|
|
|
47
45
|
# to be sent before the SMTP DATA command because all the MTAs read the headers and the
|
|
48
46
|
# entire message body after the DATA command.
|
|
49
47
|
return true if argvs['reason'] == 'virusdetected'
|
|
50
|
-
return false if
|
|
48
|
+
return false if Sisimai::SMTP::Command::ExceptDATA.include?(argvs['command'])
|
|
51
49
|
return match(argvs['diagnosticcode'].downcase)
|
|
52
50
|
end
|
|
53
51
|
|