sisimai 5.5.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 +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,27 +10,27 @@ module Sisimai
|
|
|
10
10
|
module NoRelaying
|
|
11
11
|
class << self
|
|
12
12
|
Index = [
|
|
13
|
-
|
|
14
|
-
'
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
'specified domain is not allowed',
|
|
29
|
-
"that domain isn't in my list of allowed rcpthost",
|
|
30
|
-
'this system is not configured to relay mail',
|
|
31
|
-
'unable to relay ',
|
|
13
|
+
"as a relay",
|
|
14
|
+
"domain isn't in my list of allowed rcpthost",
|
|
15
|
+
"email address is not verified.",
|
|
16
|
+
"insecure mail relay",
|
|
17
|
+
"no relaying",
|
|
18
|
+
"not a gateway",
|
|
19
|
+
"not local host",
|
|
20
|
+
"open relay",
|
|
21
|
+
"relay not permitted",
|
|
22
|
+
"relay prohibition",
|
|
23
|
+
"relaying denied", # Sendmail
|
|
24
|
+
"relaying mail to ",
|
|
25
|
+
"send to a non-local e-mail address", # MailEnable
|
|
26
|
+
"specified domain is not allowed",
|
|
27
|
+
"unable to relay ",
|
|
32
28
|
"we don't handle mail for",
|
|
33
29
|
].freeze
|
|
30
|
+
Pairs = [
|
|
31
|
+
["relay ", "denied"],
|
|
32
|
+
["n", "t ", "to relay"],
|
|
33
|
+
].freeze
|
|
34
34
|
|
|
35
35
|
def text; return 'norelaying'; end
|
|
36
36
|
def description; return 'Email rejected with error message "Relaying Denied"'; end
|
|
@@ -41,6 +41,7 @@ module Sisimai
|
|
|
41
41
|
def match(argv1)
|
|
42
42
|
return false if argv1.nil? || argv1.empty?
|
|
43
43
|
return true if Index.any? { |a| argv1.include?(a) }
|
|
44
|
+
return true if Pairs.any? { |a| Sisimai::String.aligned(argv1, a) }
|
|
44
45
|
return false
|
|
45
46
|
end
|
|
46
47
|
|
|
@@ -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,13 +11,17 @@ module Sisimai
|
|
|
11
11
|
class << self
|
|
12
12
|
# Destination mail server does not accept any message
|
|
13
13
|
Index = [
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
"destination seem to reject all mails", # OpenSMTPD/smtp/mta.c
|
|
15
|
+
"does not accept mail", # Sendmail, iCloud
|
|
16
|
+
"mail receiving disabled",
|
|
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
|
|
20
|
+
"no route for current request",
|
|
21
|
+
"null mx",
|
|
22
|
+
].freeze
|
|
23
|
+
Pairs = [
|
|
24
|
+
["no mx ", "found for "], # OpenSMTPD/smtp/mta.c
|
|
21
25
|
].freeze
|
|
22
26
|
|
|
23
27
|
def text; return 'notaccept'; end
|
|
@@ -29,6 +33,7 @@ module Sisimai
|
|
|
29
33
|
def match(argv1)
|
|
30
34
|
return false if argv1.nil? || argv1.empty?
|
|
31
35
|
return true if Index.any? { |a| argv1.include?(a) }
|
|
36
|
+
return true if Pairs.any? { |a| Sisimai::String.aligned(argv1, a) }
|
|
32
37
|
return false
|
|
33
38
|
end
|
|
34
39
|
|
|
@@ -40,7 +45,7 @@ module Sisimai
|
|
|
40
45
|
def true(argvs)
|
|
41
46
|
return true if argvs['reason'] == 'notaccept'
|
|
42
47
|
return true if [521, 556].index(argvs['replycode'].to_i) # SMTP Reply Code is 554 or 556
|
|
43
|
-
return false if argvs['command']
|
|
48
|
+
return false if Sisimai::SMTP::Command::BeforeRCPT.include?(argvs['command'])
|
|
44
49
|
return match(argvs['diagnosticcode'].downcase)
|
|
45
50
|
end
|
|
46
51
|
|
|
@@ -7,16 +7,14 @@ module Sisimai
|
|
|
7
7
|
# example, there are multiple "Subject" headers in the email.
|
|
8
8
|
module NotCompliantRFC
|
|
9
9
|
class << self
|
|
10
|
-
require 'sisimai/string'
|
|
11
10
|
Index = [
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
"duplicate header",
|
|
12
|
+
"duplicated message-id",
|
|
13
|
+
"message is not rfc 5322 compliant",
|
|
14
|
+
"multiple addresses in from: header are not accepted",
|
|
15
|
+
"rfc 1035 violation",
|
|
16
|
+
"https://support.google.com/mail/?p=rfcmessagenoncompliant",
|
|
15
17
|
].freeze
|
|
16
|
-
Pairs = [
|
|
17
|
-
[' multiple ', ' header'],
|
|
18
|
-
].freeze
|
|
19
|
-
|
|
20
18
|
|
|
21
19
|
def text; return 'notcompliantrfc'; end
|
|
22
20
|
def description; return 'Email rejected due to non-compliance with RFC'; end
|
|
@@ -27,7 +25,6 @@ module Sisimai
|
|
|
27
25
|
def match(argv1)
|
|
28
26
|
return false if argv1.nil? || argv1.empty?
|
|
29
27
|
return true if Index.any? { |a| argv1.include?(a) }
|
|
30
|
-
return true if Pairs.any? { |a| Sisimai::String.aligned(argv1, a) }
|
|
31
28
|
return false
|
|
32
29
|
end
|
|
33
30
|
|
|
@@ -14,34 +14,22 @@ module Sisimai
|
|
|
14
14
|
#
|
|
15
15
|
module PolicyViolation
|
|
16
16
|
class << self
|
|
17
|
-
require 'sisimai/string'
|
|
18
|
-
|
|
19
17
|
Index = [
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
'email not accepted for policy reasons',
|
|
18
|
+
"because the recipient is not accepting mail with ", # AOL Phoenix
|
|
19
|
+
"closed mailing list",
|
|
20
|
+
"delivery not authorized, message refused",
|
|
21
|
+
"denied by policy",
|
|
25
22
|
# http://kb.mimecast.com/Mimecast_Knowledge_Base/Administration_Console/Monitoring/Mimecast_SMTP_Error_Codes#554
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
'messages with multiple addresses',
|
|
35
|
-
'rejected for policy reasons',
|
|
36
|
-
'protocol violation',
|
|
37
|
-
'the message was rejected by organization policy',
|
|
38
|
-
'this message was blocked because its content presents a potential', # https://support.google.com/mail/answer/6590
|
|
39
|
-
'we do not accept messages containing images or other attachments',
|
|
23
|
+
"email rejected due to security policies",
|
|
24
|
+
"for policy reasons",
|
|
25
|
+
"local policy violation",
|
|
26
|
+
"message bounced due to organizational settings",
|
|
27
|
+
"message given low priority",
|
|
28
|
+
"message was rejected by organization policy",
|
|
29
|
+
"protocol violation",
|
|
30
|
+
"support.google.com/a/answer/172179",
|
|
40
31
|
"you're using a mass mailer",
|
|
41
32
|
].freeze
|
|
42
|
-
Pairs = [
|
|
43
|
-
['you have exceeded the', 'allowable number of posts without solving a captcha'],
|
|
44
|
-
].freeze
|
|
45
33
|
|
|
46
34
|
def text; return 'policyviolation'; end
|
|
47
35
|
def description; return 'Email rejected due to policy violation on a destination host'; end
|
|
@@ -53,7 +41,6 @@ module Sisimai
|
|
|
53
41
|
def match(argv1)
|
|
54
42
|
return false if argv1.nil? || argv1.empty?
|
|
55
43
|
return true if Index.any? { |a| argv1.include?(a) }
|
|
56
|
-
return true if Pairs.any? { |a| Sisimai::String.aligned(argv1, a) }
|
|
57
44
|
return false
|
|
58
45
|
end
|
|
59
46
|
|
|
@@ -63,7 +50,11 @@ module Sisimai
|
|
|
63
50
|
# false: is not policy violation
|
|
64
51
|
# @since 4.22.0
|
|
65
52
|
# @see http://www.ietf.org/rfc/rfc2822.txt
|
|
66
|
-
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
|
|
67
58
|
|
|
68
59
|
end
|
|
69
60
|
end
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
module Sisimai
|
|
2
|
+
module Reason
|
|
3
|
+
# Sisimai::Reason::RateLimited checks the bounce reason is "ratelimited" or not. This class is
|
|
4
|
+
# called only Sisimai::Reason class.
|
|
5
|
+
#
|
|
6
|
+
# This is the error that SMTP connection was rejected temporarily due to too many recipients or
|
|
7
|
+
# too many concurrency connections to the remote server. This reason has added in Sisimai 4.1.26.
|
|
8
|
+
#
|
|
9
|
+
# <kijitora@example.ne.jp>: host mx02.example.ne.jp[192.0.1.20] said:
|
|
10
|
+
# 452 4.3.2 Connection rate limit exceeded. (in reply to MAIL FROM command)
|
|
11
|
+
module RateLimited
|
|
12
|
+
class << self
|
|
13
|
+
Index = [
|
|
14
|
+
"has exceeded the max emails per hour ",
|
|
15
|
+
"please try again slower",
|
|
16
|
+
"receiving mail at a rate that prevents additional messages from being delivered",
|
|
17
|
+
"temporarily deferred due to unexpected volume or user complaints",
|
|
18
|
+
"throttling failure: ",
|
|
19
|
+
"too many errors from your ip", # Free.fr
|
|
20
|
+
"too many recipients", # ntt docomo
|
|
21
|
+
"too many smtp sessions for this host", # Sendmail(daemon.c)
|
|
22
|
+
"trop de connexions, ",
|
|
23
|
+
"we have already made numerous attempts to deliver this message",
|
|
24
|
+
].freeze
|
|
25
|
+
Pairs = [
|
|
26
|
+
["exceeded ", "allowable number of posts without solving a captcha"],
|
|
27
|
+
["connection ", "limit"],
|
|
28
|
+
["temporarily", "rate limited"],
|
|
29
|
+
["too many con", "s"],
|
|
30
|
+
].freeze
|
|
31
|
+
|
|
32
|
+
def text; return 'ratelimited'; end
|
|
33
|
+
def description; return 'SMTP connection rejected temporarily due to too many concurrency connections to the remote host'; end
|
|
34
|
+
|
|
35
|
+
# Try to match that the given text and regular expressions
|
|
36
|
+
# @param [String] argv1 String to be matched with regular expressions
|
|
37
|
+
# @return [Boolean] false: Did not match, true: Matched
|
|
38
|
+
def match(argv1)
|
|
39
|
+
return false if argv1.nil? || argv1.empty?
|
|
40
|
+
return true if Index.any? { |a| argv1.include?(a) }
|
|
41
|
+
return true if Pairs.any? { |a| Sisimai::String.aligned(argv1, a) }
|
|
42
|
+
return false
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Rejected by domain or address filter ?
|
|
46
|
+
# @param [Sisimai::Fact] argvs Object to be detected the reason
|
|
47
|
+
# @return [Boolean] true: is rate limited
|
|
48
|
+
# false: is not rate limited
|
|
49
|
+
# @see http://www.ietf.org/rfc/rfc2822.txt
|
|
50
|
+
def true(argvs)
|
|
51
|
+
return true if argvs['reason'] == 'ratelimited'
|
|
52
|
+
return true if Sisimai::SMTP::Status.name(argvs['deliverystatus']) == 'ratelimited'
|
|
53
|
+
return match(argvs['diagnosticcode'].downcase)
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
@@ -14,68 +14,59 @@ module Sisimai
|
|
|
14
14
|
module Rejected
|
|
15
15
|
class << self
|
|
16
16
|
IsNot = [
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
"5.1.0 address rejected",
|
|
18
|
+
"ip address ",
|
|
19
|
+
"recipient address rejected",
|
|
20
20
|
].freeze
|
|
21
21
|
Index = [
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
'backscatter protection detected an invalid or expired email address', # MDaemon
|
|
29
|
-
"because the sender isn't on the recipient's list of senders to accept mail from",
|
|
30
|
-
'bogus mail from', # IMail - block empty sender
|
|
31
|
-
'by non-member to a members-only list',
|
|
22
|
+
"access denied (in reply to mail from command)",
|
|
23
|
+
"administrative prohibition",
|
|
24
|
+
"all recipient addresses rejected : access denied",
|
|
25
|
+
"badsendermx", # BadSenderMX
|
|
26
|
+
"backscatter protection detected an invalid or expired email address", # MDaemon
|
|
27
|
+
"by non-member to a members-only list",
|
|
32
28
|
"can't determine purported responsible address",
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
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
|
-
'unroutable sender address',
|
|
75
|
-
'you are not allowed to post to this mailing list',
|
|
76
|
-
'you are sending to/from an address that has been blacklisted',
|
|
77
|
-
'your access to submit messages to this e-mail system has been rejected',
|
|
78
|
-
'your email address has been blacklisted', # MessageLabs
|
|
29
|
+
"connections not accepted from servers without a valid sender domain",
|
|
30
|
+
"denied by secumail valid-address-filter", # SecuMail
|
|
31
|
+
"domain of sender address ",
|
|
32
|
+
"email address is on senderfilterconfig list",
|
|
33
|
+
"emetteur invalide",
|
|
34
|
+
"empty email address",
|
|
35
|
+
"empty envelope senders not allowed",
|
|
36
|
+
"from: domain is invalid. please provide a valid from:",
|
|
37
|
+
"fully qualified email address required", # McAfee
|
|
38
|
+
"has an outgoing mail suspension",
|
|
39
|
+
"invalid sender",
|
|
40
|
+
"is not a registered gateway user",
|
|
41
|
+
"mail from not owned by user",
|
|
42
|
+
"mailfrom domain is listed in spamhaus",
|
|
43
|
+
"not member article from ", # FML
|
|
44
|
+
"null sender is not allowed",
|
|
45
|
+
"returned mail not accepted here",
|
|
46
|
+
"sending this from a different address or alias using the ",
|
|
47
|
+
"sender is spammer",
|
|
48
|
+
"sender not pre-approved",
|
|
49
|
+
"sender domain is empty",
|
|
50
|
+
"sender domain listed at ",
|
|
51
|
+
"sender verify failed", # Exim callout
|
|
52
|
+
"sendernoa", # SenderNoA
|
|
53
|
+
"server does not accept mail from",
|
|
54
|
+
"spam reporting address", # SendGrid|a message to an address has previously been marked as Spam by the recipient.
|
|
55
|
+
"too many spam complaints",
|
|
56
|
+
"unroutable sender address",
|
|
57
|
+
"you are not allowed to post to this mailing list",
|
|
58
|
+
"your access to submit messages to this e-mail system has been rejected",
|
|
59
|
+
"your email address has been blacklisted", # MessageLabs
|
|
60
|
+
].freeze
|
|
61
|
+
Pairs = [
|
|
62
|
+
["after end of data:", ".", " does not exist"],
|
|
63
|
+
["after mail from:", ".", " does not exist"],
|
|
64
|
+
["domain ", " is a dead domain"],
|
|
65
|
+
["email address ", "is not "],
|
|
66
|
+
["reject mail from ", "@"], # FML
|
|
67
|
+
["send", "blacklisted"],
|
|
68
|
+
["sender", " rejected"],
|
|
69
|
+
["sender is", " list"],
|
|
79
70
|
].freeze
|
|
80
71
|
|
|
81
72
|
def text; return 'rejected'; end
|
|
@@ -88,6 +79,7 @@ module Sisimai
|
|
|
88
79
|
return false if argv1.nil? || argv1.empty?
|
|
89
80
|
return false if IsNot.any? { |a| argv1.include?(a) }
|
|
90
81
|
return true if Index.any? { |a| argv1.include?(a) }
|
|
82
|
+
return true if Pairs.any? { |a| Sisimai::String.aligned(argv1, a) }
|
|
91
83
|
return false
|
|
92
84
|
end
|
|
93
85
|
|
|
@@ -6,35 +6,23 @@ module Sisimai
|
|
|
6
6
|
# SMTP connection.
|
|
7
7
|
module RequirePTR
|
|
8
8
|
class << self
|
|
9
|
-
require 'sisimai/string'
|
|
10
|
-
|
|
11
9
|
Index = [
|
|
12
|
-
|
|
13
|
-
'all mail servers must have a ptr record with a valid reverse dns entry',
|
|
14
|
-
'bad dns ptr resource record',
|
|
15
|
-
'cannot find your hostname',
|
|
10
|
+
"cannot find your hostname",
|
|
16
11
|
"cannot resolve your address.",
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
'ptr record setup',
|
|
23
|
-
'reverse dns failed',
|
|
24
|
-
'reverse dns required',
|
|
25
|
-
'sender ip reverse lookup rejected',
|
|
26
|
-
'the ip address sending this message does not have a ptr record setup', # Google
|
|
27
|
-
'the corresponding forward dns entry does not point to the sending ip', # Google
|
|
28
|
-
'this system will not accept messages from servers/devices with no reverse dns',
|
|
29
|
-
'unresolvable relay host name',
|
|
30
|
-
'we do not accept mail from hosts with dynamic ip or generic dns ptr-records',
|
|
12
|
+
"corresponding forward dns entry does not point to the sending ip", # Google
|
|
13
|
+
"ip name lookup failed",
|
|
14
|
+
"no matches to nameserver query",
|
|
15
|
+
"sender ip reverse lookup rejected",
|
|
16
|
+
"unresolvable relay host name",
|
|
31
17
|
].freeze
|
|
32
18
|
Pairs = [
|
|
33
|
-
[
|
|
34
|
-
[
|
|
35
|
-
[
|
|
36
|
-
[
|
|
37
|
-
[
|
|
19
|
+
["domain "," mismatches client ip"],
|
|
20
|
+
["domain name verification on your ip address ", "failed"],
|
|
21
|
+
["dns lookup failure: ", " try again later"],
|
|
22
|
+
["ptr", "record"],
|
|
23
|
+
["reverse", " dns"],
|
|
24
|
+
["server access ", " forbidden by invalid rdns record of your mail server"],
|
|
25
|
+
["service permits ", " unverifyable sending ips"],
|
|
38
26
|
].freeze
|
|
39
27
|
|
|
40
28
|
def text; return 'requireptr'; end
|
|
@@ -17,28 +17,23 @@ 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
|
-
'
|
|
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
|
+
"could not retrieve credentials", # OpenSMTPD/smtpd/mta.c
|
|
27
|
+
"unauthenticated senders not allowed",
|
|
28
|
+
"verification failure",
|
|
29
|
+
"you are not authorized to send mail, authentication is required",
|
|
30
|
+
"you don't authenticate or the domain isn't in my list of allowed rcpthosts",
|
|
35
31
|
].freeze
|
|
36
32
|
Pairs = [
|
|
37
|
-
[
|
|
38
|
-
[
|
|
39
|
-
[
|
|
40
|
-
[
|
|
41
|
-
['user ', ' is not authorized to perform ses:sendrawemail on resource'],
|
|
33
|
+
["authentication failed; server ", " said: "], # Postfix
|
|
34
|
+
["authentification invalide", "305"],
|
|
35
|
+
["authentification requise", "402"],
|
|
36
|
+
["user ", " is not authorized to perform ses:sendrawemail on resource"],
|
|
42
37
|
].freeze
|
|
43
38
|
|
|
44
39
|
def text; return 'securityerror'; end
|