sisimai 4.24.1-java → 4.25.0-java
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of sisimai might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.travis.yml +3 -2
- data/ANALYTICAL-PRECISION +16 -25
- data/ChangeLog.md +41 -0
- data/Developers.mk +2 -2
- data/README-JA.md +13 -13
- data/README.md +13 -13
- data/lib/sisimai.rb +3 -7
- data/lib/sisimai/address.rb +25 -41
- data/lib/sisimai/arf.rb +58 -59
- data/lib/sisimai/bite.rb +0 -1
- data/lib/sisimai/bite/email.rb +7 -7
- data/lib/sisimai/bite/email/activehunter.rb +4 -3
- data/lib/sisimai/bite/email/amavis.rb +133 -0
- data/lib/sisimai/bite/email/amazonses.rb +53 -87
- data/lib/sisimai/bite/email/amazonworkmail.rb +51 -57
- data/lib/sisimai/bite/email/aol.rb +50 -76
- data/lib/sisimai/bite/email/apachejames.rb +2 -2
- data/lib/sisimai/bite/email/bigfoot.rb +47 -74
- data/lib/sisimai/bite/email/biglobe.rb +8 -9
- data/lib/sisimai/bite/email/courier.rb +56 -101
- data/lib/sisimai/bite/email/domino.rb +7 -8
- data/lib/sisimai/bite/email/einsundeins.rb +4 -5
- data/lib/sisimai/bite/email/exchange2003.rb +21 -22
- data/lib/sisimai/bite/email/exchange2007.rb +26 -28
- data/lib/sisimai/bite/email/exim.rb +48 -47
- data/lib/sisimai/bite/email/ezweb.rb +24 -36
- data/lib/sisimai/bite/email/facebook.rb +54 -79
- data/lib/sisimai/bite/email/fml.rb +10 -10
- data/lib/sisimai/bite/email/gmx.rb +6 -6
- data/lib/sisimai/bite/email/google.rb +12 -13
- data/lib/sisimai/bite/email/gsuite.rb +80 -108
- data/lib/sisimai/bite/email/imailserver.rb +16 -16
- data/lib/sisimai/bite/email/interscanmss.rb +4 -6
- data/lib/sisimai/bite/email/kddi.rb +9 -11
- data/lib/sisimai/bite/email/mailfoundry.rb +2 -2
- data/lib/sisimai/bite/email/mailmarshalsmtp.rb +2 -2
- data/lib/sisimai/bite/email/mailru.rb +12 -13
- data/lib/sisimai/bite/email/mcafee.rb +31 -25
- data/lib/sisimai/bite/email/messagelabs.rb +48 -87
- data/lib/sisimai/bite/email/messagingserver.rb +9 -10
- data/lib/sisimai/bite/email/mfilter.rb +16 -16
- data/lib/sisimai/bite/email/mxlogic.rb +11 -11
- data/lib/sisimai/bite/email/notes.rb +5 -6
- data/lib/sisimai/bite/email/office365.rb +25 -42
- data/lib/sisimai/bite/email/opensmtpd.rb +8 -8
- data/lib/sisimai/bite/email/outlook.rb +49 -67
- data/lib/sisimai/bite/email/postfix.rb +78 -112
- data/lib/sisimai/bite/email/qmail.rb +23 -23
- data/lib/sisimai/bite/email/receivingses.rb +53 -86
- data/lib/sisimai/bite/email/sendgrid.rb +65 -84
- data/lib/sisimai/bite/email/sendmail.rb +89 -117
- data/lib/sisimai/bite/email/surfcontrol.rb +15 -18
- data/lib/sisimai/bite/email/userdefined.rb +1 -1
- data/lib/sisimai/bite/email/v5sendmail.rb +3 -4
- data/lib/sisimai/bite/email/verizon.rb +7 -8
- data/lib/sisimai/bite/email/x1.rb +2 -2
- data/lib/sisimai/bite/email/x2.rb +2 -2
- data/lib/sisimai/bite/email/x3.rb +3 -3
- data/lib/sisimai/bite/email/x4.rb +22 -22
- data/lib/sisimai/bite/email/x5.rb +40 -49
- data/lib/sisimai/bite/email/yahoo.rb +3 -3
- data/lib/sisimai/bite/email/yandex.rb +54 -82
- data/lib/sisimai/bite/email/zoho.rb +6 -6
- data/lib/sisimai/bite/json/amazonses.rb +20 -20
- data/lib/sisimai/bite/json/sendgrid.rb +2 -2
- data/lib/sisimai/data.rb +27 -40
- data/lib/sisimai/datetime.rb +146 -162
- data/lib/sisimai/mda.rb +30 -31
- data/lib/sisimai/message/email.rb +83 -123
- data/lib/sisimai/message/json.rb +2 -4
- data/lib/sisimai/mime.rb +31 -34
- data/lib/sisimai/order/email.rb +23 -22
- data/lib/sisimai/reason.rb +61 -61
- data/lib/sisimai/reason/blocked.rb +139 -135
- data/lib/sisimai/reason/contenterror.rb +11 -10
- data/lib/sisimai/reason/exceedlimit.rb +4 -4
- data/lib/sisimai/reason/expired.rb +20 -20
- data/lib/sisimai/reason/filtered.rb +19 -18
- data/lib/sisimai/reason/hasmoved.rb +3 -3
- data/lib/sisimai/reason/hostunknown.rb +19 -19
- data/lib/sisimai/reason/mailboxfull.rb +49 -49
- data/lib/sisimai/reason/mailererror.rb +16 -16
- data/lib/sisimai/reason/mesgtoobig.rb +17 -17
- data/lib/sisimai/reason/networkerror.rb +19 -19
- data/lib/sisimai/reason/norelaying.rb +16 -16
- data/lib/sisimai/reason/notaccept.rb +9 -10
- data/lib/sisimai/reason/onhold.rb +1 -1
- data/lib/sisimai/reason/policyviolation.rb +21 -20
- data/lib/sisimai/reason/rejected.rb +53 -53
- data/lib/sisimai/reason/securityerror.rb +29 -29
- data/lib/sisimai/reason/spamdetected.rb +127 -127
- data/lib/sisimai/reason/suspend.rb +17 -17
- data/lib/sisimai/reason/systemerror.rb +22 -21
- data/lib/sisimai/reason/systemfull.rb +6 -6
- data/lib/sisimai/reason/toomanyconn.rb +19 -18
- data/lib/sisimai/reason/userunknown.rb +122 -121
- data/lib/sisimai/reason/vacation.rb +8 -8
- data/lib/sisimai/reason/virusdetected.rb +8 -8
- data/lib/sisimai/rfc1894.rb +142 -0
- data/lib/sisimai/rfc3464.rb +70 -70
- data/lib/sisimai/rfc3834.rb +15 -15
- data/lib/sisimai/rfc5322.rb +20 -36
- data/lib/sisimai/rhost.rb +1 -0
- data/lib/sisimai/rhost/exchangeonline.rb +31 -33
- data/lib/sisimai/rhost/franceptt.rb +23 -23
- data/lib/sisimai/rhost/godaddy.rb +28 -28
- data/lib/sisimai/rhost/googleapps.rb +39 -41
- data/lib/sisimai/rhost/kddi.rb +3 -3
- data/lib/sisimai/rhost/tencentqq.rb +51 -0
- data/lib/sisimai/smtp/error.rb +14 -21
- data/lib/sisimai/smtp/reply.rb +14 -13
- data/lib/sisimai/smtp/status.rb +178 -179
- data/lib/sisimai/string.rb +13 -12
- data/lib/sisimai/version.rb +1 -1
- data/set-of-emails/README.md +1 -5
- data/set-of-emails/maildir/bsd/arf-23.eml +49 -0
- data/set-of-emails/maildir/bsd/email-amavis-01.eml +78 -0
- data/set-of-emails/maildir/bsd/email-amavis-02.eml +78 -0
- data/set-of-emails/maildir/bsd/email-exchange2007-04.eml +146 -0
- data/set-of-emails/maildir/bsd/email-exim-60.eml +94 -0
- data/set-of-emails/maildir/bsd/email-ezweb-08.eml +49 -0
- data/set-of-emails/maildir/bsd/email-google-19.eml +67 -0
- data/set-of-emails/maildir/bsd/email-mcafee-05.eml +74 -0
- data/set-of-emails/maildir/bsd/email-messagingserver-12.eml +99 -0
- data/set-of-emails/maildir/bsd/email-postfix-46.eml +81 -0
- data/set-of-emails/maildir/bsd/email-postfix-47.eml +79 -0
- data/set-of-emails/maildir/bsd/email-postfix-48.eml +79 -0
- data/set-of-emails/maildir/bsd/email-postfix-49.eml +141 -0
- data/set-of-emails/maildir/bsd/email-postfix-50.eml +143 -0
- data/set-of-emails/maildir/bsd/email-postfix-51.eml +73 -0
- data/set-of-emails/maildir/bsd/email-postfix-52.eml +79 -0
- data/set-of-emails/maildir/bsd/email-postfix-53.eml +76 -0
- data/set-of-emails/maildir/bsd/email-postfix-54.eml +73 -0
- data/set-of-emails/maildir/bsd/email-postfix-55.eml +74 -0
- data/set-of-emails/maildir/bsd/email-postfix-56.eml +78 -0
- data/set-of-emails/maildir/bsd/email-qmail-10.eml +50 -0
- data/set-of-emails/maildir/bsd/email-x2-05.eml +38 -0
- data/set-of-emails/maildir/bsd/rhost-google-apps-02.eml +88 -0
- data/set-of-emails/maildir/bsd/rhost-tencentqq-01.eml +84 -0
- data/set-of-emails/maildir/bsd/rhost-tencentqq-02.eml +84 -0
- data/set-of-emails/maildir/bsd/rhost-tencentqq-03.eml +81 -0
- data/set-of-emails/maildir/dos/email-amavis-01.eml +78 -0
- data/set-of-emails/maildir/dos/email-apachejames-01.eml +1 -2
- data/set-of-emails/maildir/dos/email-messagelabs-01.eml +67 -50
- data/set-of-emails/maildir/dos/email-x4-01.eml +31 -76
- data/set-of-emails/maildir/dos/rhost-tencentqq-01.eml +84 -0
- data/set-of-emails/maildir/mac/email-amavis-01.eml +1 -4
- data/set-of-emails/maildir/mac/email-apachejames-01.eml +1 -9
- data/set-of-emails/maildir/mac/email-messagelabs-01.eml +1 -9
- data/set-of-emails/maildir/mac/email-x4-01.eml +1 -5
- data/set-of-emails/maildir/mac/rhost-tencentqq-01.eml +1 -4
- metadata +35 -4
- data/set-of-emails/logo/horizontalversions.png +0 -0
- data/set-of-emails/logo/icon.png +0 -0
@@ -13,6 +13,24 @@ module Sisimai
|
|
13
13
|
module NetworkError
|
14
14
|
# Imported from p5-Sisimail/lib/Sisimai/Reason/NetworkError.pm
|
15
15
|
class << self
|
16
|
+
Index = [
|
17
|
+
'could not connect and send the mail to',
|
18
|
+
'dns records for the destination computer could not be found',
|
19
|
+
'hop count exceeded - possible mail loop',
|
20
|
+
'host is unreachable',
|
21
|
+
'host not found, try again',
|
22
|
+
'mail forwarding loop for ',
|
23
|
+
'malformed name server reply',
|
24
|
+
'malformed or unexpected name server reply',
|
25
|
+
'maximum forwarding loop count exceeded',
|
26
|
+
'message looping',
|
27
|
+
'message probably in a routing loop',
|
28
|
+
'no route to host',
|
29
|
+
'too many hops',
|
30
|
+
'unable to resolve route ',
|
31
|
+
'unrouteable mail domain',
|
32
|
+
]
|
33
|
+
|
16
34
|
def text; return 'networkerror'; end
|
17
35
|
def description; return 'SMTP connection failed due to DNS look up failure or other network problems'; end
|
18
36
|
|
@@ -22,25 +40,7 @@ module Sisimai
|
|
22
40
|
# true: Matched
|
23
41
|
def match(argv1)
|
24
42
|
return nil unless argv1
|
25
|
-
|
26
|
-
'could not connect and send the mail to',
|
27
|
-
'dns records for the destination computer could not be found',
|
28
|
-
'hop count exceeded - possible mail loop',
|
29
|
-
'host is unreachable',
|
30
|
-
'host not found, try again',
|
31
|
-
'mail forwarding loop for ',
|
32
|
-
'malformed name server reply',
|
33
|
-
'malformed or unexpected name server reply',
|
34
|
-
'maximum forwarding loop count exceeded',
|
35
|
-
'message looping',
|
36
|
-
'message probably in a routing loop',
|
37
|
-
'no route to host',
|
38
|
-
'too many hops',
|
39
|
-
'unable to resolve route ',
|
40
|
-
'unrouteable mail domain',
|
41
|
-
]
|
42
|
-
|
43
|
-
return true if index.any? { |a| argv1.include?(a) }
|
43
|
+
return true if Index.any? { |a| argv1.include?(a) }
|
44
44
|
return false
|
45
45
|
end
|
46
46
|
|
@@ -13,6 +13,21 @@ module Sisimai
|
|
13
13
|
module NoRelaying
|
14
14
|
# Imported from p5-Sisimail/lib/Sisimai/Reason/NoRelaying.pm
|
15
15
|
class << self
|
16
|
+
Index = [
|
17
|
+
'as a relay',
|
18
|
+
'insecure mail relay',
|
19
|
+
'mail server requires authentication when attempting to send to a non-local e-mail address', # MailEnable
|
20
|
+
'not allowed to relay through this machine',
|
21
|
+
'not an open relay, so get lost',
|
22
|
+
'relay access denied',
|
23
|
+
'relay denied',
|
24
|
+
'relay not permitted',
|
25
|
+
'relaying denied', # Sendmail
|
26
|
+
"that domain isn't in my list of allowed rcpthost",
|
27
|
+
'this system is not configured to relay mail',
|
28
|
+
'unable to relay for',
|
29
|
+
]
|
30
|
+
|
16
31
|
def text; return 'norelaying'; end
|
17
32
|
def description; return 'Email rejected with error message "Relaying Denied"'; end
|
18
33
|
|
@@ -22,22 +37,7 @@ module Sisimai
|
|
22
37
|
# true: Matched
|
23
38
|
def match(argv1)
|
24
39
|
return nil unless argv1
|
25
|
-
|
26
|
-
'as a relay',
|
27
|
-
'insecure mail relay',
|
28
|
-
'mail server requires authentication when attempting to send to a non-local e-mail address', # MailEnable
|
29
|
-
'not allowed to relay through this machine',
|
30
|
-
'not an open relay, so get lost',
|
31
|
-
'relay access denied',
|
32
|
-
'relay denied',
|
33
|
-
'relay not permitted',
|
34
|
-
'relaying denied', # Sendmail
|
35
|
-
"that domain isn't in my list of allowed rcpthost",
|
36
|
-
'this system is not configured to relay mail',
|
37
|
-
'unable to relay for',
|
38
|
-
]
|
39
|
-
|
40
|
-
return true if index.any? { |a| argv1.include?(a) }
|
40
|
+
return true if Index.any? { |a| argv1.include?(a) }
|
41
41
|
return false
|
42
42
|
end
|
43
43
|
|
@@ -11,6 +11,14 @@ module Sisimai
|
|
11
11
|
module NotAccept
|
12
12
|
# Imported from p5-Sisimail/lib/Sisimai/Reason/NotAccept.pm
|
13
13
|
class << self
|
14
|
+
# Destination mail server does not accept any message
|
15
|
+
Index = [
|
16
|
+
'host/domain does not accept mail', # iCloud
|
17
|
+
'name server: .: host not found', # Sendmail
|
18
|
+
'no mx record found for domain=', # Oath(Yahoo!)
|
19
|
+
'smtp protocol returned a permanent error',
|
20
|
+
]
|
21
|
+
|
14
22
|
def text; return 'notaccept'; end
|
15
23
|
def description; return 'Delivery failed due to a destination mail server does not accept any email'; end
|
16
24
|
|
@@ -20,16 +28,7 @@ module Sisimai
|
|
20
28
|
# true: Matched
|
21
29
|
def match(argv1)
|
22
30
|
return nil unless argv1
|
23
|
-
|
24
|
-
# Destination mail server does not accept any message
|
25
|
-
index = [
|
26
|
-
'host/domain does not accept mail', # iCloud
|
27
|
-
'name server: .: host not found', # Sendmail
|
28
|
-
'no mx record found for domain=', # Oath(Yahoo!)
|
29
|
-
'smtp protocol returned a permanent error',
|
30
|
-
]
|
31
|
-
|
32
|
-
return true if index.any? { |a| argv1.include?(a) }
|
31
|
+
return true if Index.any? { |a| argv1.include?(a) }
|
33
32
|
return false
|
34
33
|
end
|
35
34
|
|
@@ -27,7 +27,7 @@ module Sisimai
|
|
27
27
|
def true(argvs)
|
28
28
|
return nil if argvs.deliverystatus.empty?
|
29
29
|
return true if argvs.reason == 'onhold'
|
30
|
-
return true if Sisimai::SMTP::Status.name(argvs.deliverystatus) == 'onhold'
|
30
|
+
return true if Sisimai::SMTP::Status.name(argvs.deliverystatus).to_s == 'onhold'
|
31
31
|
return false
|
32
32
|
end
|
33
33
|
end
|
@@ -16,6 +16,26 @@ module Sisimai
|
|
16
16
|
module PolicyViolation
|
17
17
|
# Imported from p5-Sisimail/lib/Sisimai/Reason/PolicyViolation.pm
|
18
18
|
class << self
|
19
|
+
Index = [
|
20
|
+
'because the recipient is not accepting mail with ', # AOL Phoenix
|
21
|
+
'closed mailing list',
|
22
|
+
'denied by policy',
|
23
|
+
'email not accepted for policy reasons',
|
24
|
+
# http://kb.mimecast.com/Mimecast_Knowledge_Base/Administration_Console/Monitoring/Mimecast_SMTP_Error_Codes#554
|
25
|
+
'email rejected due to security policies',
|
26
|
+
'header are not accepted',
|
27
|
+
'header error',
|
28
|
+
'local policy violation',
|
29
|
+
'message given low priority',
|
30
|
+
'message not accepted for policy reasons',
|
31
|
+
'messages with multiple addresses',
|
32
|
+
'rejected for policy reasons',
|
33
|
+
'protocol violation',
|
34
|
+
'the email address used to send your message is not subscribed to this group',
|
35
|
+
'you have exceeded the allowable number of posts without solving a captcha',
|
36
|
+
'you have exceeded the the allowable number of posts without solving a captcha',
|
37
|
+
]
|
38
|
+
|
19
39
|
def text; return 'policyviolation'; end
|
20
40
|
def description; return 'Email rejected due to policy violation on a destination host'; end
|
21
41
|
|
@@ -26,26 +46,7 @@ module Sisimai
|
|
26
46
|
# @since 4.22.0
|
27
47
|
def match(argv1)
|
28
48
|
return nil unless argv1
|
29
|
-
|
30
|
-
'because the recipient is not accepting mail with ', # AOL Phoenix
|
31
|
-
'closed mailing list',
|
32
|
-
'denied by policy',
|
33
|
-
'email not accepted for policy reasons',
|
34
|
-
# http://kb.mimecast.com/Mimecast_Knowledge_Base/Administration_Console/Monitoring/Mimecast_SMTP_Error_Codes#554
|
35
|
-
'email rejected due to security policies',
|
36
|
-
'header are not accepted',
|
37
|
-
'header error',
|
38
|
-
'message given low priority',
|
39
|
-
'message not accepted for policy reasons',
|
40
|
-
'messages with multiple addresses',
|
41
|
-
'rejected for policy reasons',
|
42
|
-
'protocol violation',
|
43
|
-
'the email address used to send your message is not subscribed to this group',
|
44
|
-
'you have exceeded the allowable number of posts without solving a captcha',
|
45
|
-
'you have exceeded the the allowable number of posts without solving a captcha',
|
46
|
-
]
|
47
|
-
|
48
|
-
return true if index.any? { |a| argv1.include?(a) }
|
49
|
+
return true if Index.any? { |a| argv1.include?(a) }
|
49
50
|
return false
|
50
51
|
end
|
51
52
|
|
@@ -15,6 +15,52 @@ module Sisimai
|
|
15
15
|
module Rejected
|
16
16
|
# Imported from p5-Sisimail/lib/Sisimai/Reason/Rejected.pm
|
17
17
|
class << self
|
18
|
+
IsNot = [
|
19
|
+
'5.1.0 address rejected',
|
20
|
+
'recipient address rejected',
|
21
|
+
'sender ip address rejected',
|
22
|
+
]
|
23
|
+
Index = [
|
24
|
+
'<> invalid sender',
|
25
|
+
'access denied (in reply to mail from command)',
|
26
|
+
'address rejected',
|
27
|
+
'administrative prohibition',
|
28
|
+
'batv failed to verify', # SoniWall
|
29
|
+
'batv validation failure', # SoniWall
|
30
|
+
'backscatter protection detected an invalid or expired email address', # MDaemon
|
31
|
+
'bogus mail from', # IMail - block empty sender
|
32
|
+
'connections not accepted from servers without a valid sender domain',
|
33
|
+
'denied [bouncedeny]', # McAfee
|
34
|
+
'delivery not authorized, message refused',
|
35
|
+
'does not exist e2110',
|
36
|
+
'domain of sender address ',
|
37
|
+
'emetteur invalide',
|
38
|
+
'empty envelope senders not allowed',
|
39
|
+
'error: no third-party dsns', # SpamWall - block empty sender
|
40
|
+
'from: domain is invalid. please provide a valid from:',
|
41
|
+
'fully qualified email address required', # McAfee
|
42
|
+
'invalid domain, see <url:',
|
43
|
+
'mail from not owned by user',
|
44
|
+
'message rejected: email address is not verified',
|
45
|
+
'mx records for ',
|
46
|
+
'null sender is not allowed',
|
47
|
+
'recipient not accepted. (batv: no tag',
|
48
|
+
'returned mail not accepted here',
|
49
|
+
'rfc 1035 violation: recursive cname records for',
|
50
|
+
'rule imposed mailbox access for', # MailMarshal
|
51
|
+
'sender email address rejected',
|
52
|
+
'sender is spammer',
|
53
|
+
'sender not pre-approved',
|
54
|
+
'sender rejected',
|
55
|
+
'sender domain is empty',
|
56
|
+
'sender verify failed', # Exim callout
|
57
|
+
'syntax error: empty email address',
|
58
|
+
'the message has been rejected by batv defense',
|
59
|
+
'transaction failed unsigned dsn for',
|
60
|
+
'unroutable sender address',
|
61
|
+
'you are sending to/from an address that has been blacklisted',
|
62
|
+
]
|
63
|
+
|
18
64
|
def text; return 'rejected'; end
|
19
65
|
def description; return "Email rejected due to a sender's email address (envelope from)"; end
|
20
66
|
|
@@ -24,53 +70,8 @@ module Sisimai
|
|
24
70
|
# true: Matched
|
25
71
|
def match(argv1)
|
26
72
|
return nil unless argv1
|
27
|
-
|
28
|
-
|
29
|
-
'recipient address rejected',
|
30
|
-
'sender ip address rejected',
|
31
|
-
]
|
32
|
-
index = [
|
33
|
-
'<> invalid sender',
|
34
|
-
'address rejected',
|
35
|
-
'administrative prohibition',
|
36
|
-
'batv failed to verify', # SoniWall
|
37
|
-
'batv validation failure', # SoniWall
|
38
|
-
'backscatter protection detected an invalid or expired email address', # MDaemon
|
39
|
-
'bogus mail from', # IMail - block empty sender
|
40
|
-
'connections not accepted from servers without a valid sender domain',
|
41
|
-
'denied [bouncedeny]', # McAfee
|
42
|
-
'delivery not authorized, message refused',
|
43
|
-
'does not exist e2110',
|
44
|
-
'domain of sender address ',
|
45
|
-
'emetteur invalide',
|
46
|
-
'empty envelope senders not allowed',
|
47
|
-
'error: no third-party dsns', # SpamWall - block empty sender
|
48
|
-
'from: domain is invalid. please provide a valid from:',
|
49
|
-
'fully qualified email address required', # McAfee
|
50
|
-
'invalid domain, see <url:',
|
51
|
-
'mail from not owned by user',
|
52
|
-
'message rejected: email address is not verified',
|
53
|
-
'mx records for ',
|
54
|
-
'null sender is not allowed',
|
55
|
-
'recipient not accepted. (batv: no tag',
|
56
|
-
'returned mail not accepted here',
|
57
|
-
'rfc 1035 violation: recursive cname records for',
|
58
|
-
'rule imposed mailbox access for', # MailMarshal
|
59
|
-
'sender email address rejected',
|
60
|
-
'sender is spammer',
|
61
|
-
'sender not pre-approved',
|
62
|
-
'sender rejected',
|
63
|
-
'sender domain is empty',
|
64
|
-
'sender verify failed', # Exim callout
|
65
|
-
'syntax error: empty email address',
|
66
|
-
'the message has been rejected by batv defense',
|
67
|
-
'transaction failed unsigned dsn for',
|
68
|
-
'unroutable sender address',
|
69
|
-
'you are sending to/from an address that has been blacklisted',
|
70
|
-
]
|
71
|
-
|
72
|
-
return false if isnot.any? { |a| argv1.include?(a) }
|
73
|
-
return true if index.any? { |a| argv1.include?(a) }
|
73
|
+
return false if IsNot.any? { |a| argv1.include?(a) }
|
74
|
+
return true if Index.any? { |a| argv1.include?(a) }
|
74
75
|
return false
|
75
76
|
end
|
76
77
|
|
@@ -80,19 +81,18 @@ module Sisimai
|
|
80
81
|
# false: is not rejected by the sender
|
81
82
|
# @see http://www.ietf.org/rfc/rfc2822.txt
|
82
83
|
def true(argvs)
|
83
|
-
tempreason = Sisimai::SMTP::Status.name(argvs.deliverystatus)
|
84
|
-
tempreason = 'undefined' if tempreason.empty?
|
85
|
-
diagnostic = argvs.diagnosticcode.downcase
|
86
|
-
|
87
84
|
return true if argvs.reason == 'rejected'
|
85
|
+
tempreason = Sisimai::SMTP::Status.name(argvs.deliverystatus) || 'undefined'
|
88
86
|
return true if tempreason == 'rejected' # Delivery status code points "rejected".
|
89
87
|
|
90
88
|
# Check the value of Diagnosic-Code: header with patterns
|
91
|
-
|
89
|
+
diagnostic = argvs.diagnosticcode.downcase
|
90
|
+
commandtxt = argvs.smtpcommand
|
91
|
+
if commandtxt == 'MAIL'
|
92
92
|
# The session was rejected at 'MAIL FROM' command
|
93
93
|
return true if match(diagnostic)
|
94
94
|
|
95
|
-
elsif
|
95
|
+
elsif commandtxt == 'DATA'
|
96
96
|
# The session was rejected at 'DATA' command
|
97
97
|
if tempreason != 'userunknown'
|
98
98
|
# Except "userunknown"
|
@@ -19,6 +19,34 @@ module Sisimai
|
|
19
19
|
module SecurityError
|
20
20
|
# Imported from p5-Sisimail/lib/Sisimai/Reason/SecurityError.pm
|
21
21
|
class << self
|
22
|
+
Regex = %r{(?>
|
23
|
+
account[ ]not[ ]subscribed[ ]to[ ]ses
|
24
|
+
|authentification[ ]requise.+[a-z]{3}.+402
|
25
|
+
|authentication[ ](?:
|
26
|
+
credentials invalid
|
27
|
+
|failure
|
28
|
+
|failed;[ ]server[ ].+[ ]said: # Postfix
|
29
|
+
|required
|
30
|
+
|turned[ ]on[ ]in[ ]your[ ]email[ ]client
|
31
|
+
)
|
32
|
+
|\d+[ ]denied[ ]\[[a-z]+\][ ].+[(]mode:[ ].+[)]
|
33
|
+
|codes?[ ]d'?[ ]*authentification[ ]invalide.+[a-z]{3}.+305
|
34
|
+
|domain[ ].+[ ]is[ ]a[ ]dead[ ]domain
|
35
|
+
|executable[ ]files[ ]are[ ]not[ ]allowed[ ]in[ ]compressed[ ]files
|
36
|
+
|insecure[ ]mail[ ]relay
|
37
|
+
|recipient[ ]address[ ]rejected:[ ]access[ ]denied
|
38
|
+
|sorry,[ ]you[ ]don'?t[ ]authenticate[ ]or[ ]the[ ]domain[ ]isn'?t[ ]in[ ]
|
39
|
+
my[ ]list[ ]of[ ]allowed[ ]rcpthosts
|
40
|
+
|tls[ ]required[ ]but[ ]not[ ]supported # SendGrid:the recipient mailserver does not support TLS or have a valid certificate
|
41
|
+
|user[ ].+[ ]is[ ]not[ ]authorized[ ]to[ ]perform[ ]ses:sendrawemail[ ]on[ ]resource
|
42
|
+
|tls[ ]required[ ]but[ ]not[ ]supported # SendGrid:the recipient mailserver does not support TLS or have a valid certificate
|
43
|
+
|unauthenticated[ ]senders[ ]not[ ]allowed
|
44
|
+
|user[ ].+[ ]is[ ]not[ ]authorized[ ]to[ ]perform[ ]ses:sendrawemail[ ]on[ ]resource
|
45
|
+
|you[ ]are[ ]not[ ]authorized[ ]to[ ]send[ ]mail,[ ]authentication[ ]is[ ]required
|
46
|
+
|verification[ ]failure
|
47
|
+
)
|
48
|
+
}x
|
49
|
+
|
22
50
|
def text; return 'securityerror'; end
|
23
51
|
def description; return 'Email rejected due to security violation was detected on a destination host'; end
|
24
52
|
|
@@ -28,35 +56,7 @@ module Sisimai
|
|
28
56
|
# true: Matched
|
29
57
|
def match(argv1)
|
30
58
|
return nil unless argv1
|
31
|
-
|
32
|
-
account[ ]not[ ]subscribed[ ]to[ ]ses
|
33
|
-
|authentification[ ]requise.+[a-z]{3}.+402
|
34
|
-
|authentication[ ](?:
|
35
|
-
credentials invalid
|
36
|
-
|failure
|
37
|
-
|failed;[ ]server[ ].+[ ]said: # Postfix
|
38
|
-
|required
|
39
|
-
|turned[ ]on[ ]in[ ]your[ ]email[ ]client
|
40
|
-
)
|
41
|
-
|\d+[ ]denied[ ]\[[a-z]+\][ ].+[(]mode:[ ].+[)]
|
42
|
-
|codes?[ ]d'?[ ]*authentification[ ]invalide.+[a-z]{3}.+305
|
43
|
-
|domain[ ].+[ ]is[ ]a[ ]dead[ ]domain
|
44
|
-
|executable[ ]files[ ]are[ ]not[ ]allowed[ ]in[ ]compressed[ ]files
|
45
|
-
|insecure[ ]mail[ ]relay
|
46
|
-
|recipient[ ]address[ ]rejected:[ ]access[ ]denied
|
47
|
-
|sorry,[ ]you[ ]don'?t[ ]authenticate[ ]or[ ]the[ ]domain[ ]isn'?t[ ]in[ ]
|
48
|
-
my[ ]list[ ]of[ ]allowed[ ]rcpthosts
|
49
|
-
|tls[ ]required[ ]but[ ]not[ ]supported # SendGrid:the recipient mailserver does not support TLS or have a valid certificate
|
50
|
-
|user[ ].+[ ]is[ ]not[ ]authorized[ ]to[ ]perform[ ]ses:sendrawemail[ ]on[ ]resource
|
51
|
-
|tls[ ]required[ ]but[ ]not[ ]supported # SendGrid:the recipient mailserver does not support TLS or have a valid certificate
|
52
|
-
|unauthenticated[ ]senders[ ]not[ ]allowed
|
53
|
-
|user[ ].+[ ]is[ ]not[ ]authorized[ ]to[ ]perform[ ]ses:sendrawemail[ ]on[ ]resource
|
54
|
-
|you[ ]are[ ]not[ ]authorized[ ]to[ ]send[ ]mail,[ ]authentication[ ]is[ ]required
|
55
|
-
|verification[ ]failure
|
56
|
-
)
|
57
|
-
}x
|
58
|
-
|
59
|
-
return true if argv1 =~ regex
|
59
|
+
return true if argv1 =~ Regex
|
60
60
|
return false
|
61
61
|
end
|
62
62
|
|
@@ -16,141 +16,141 @@ module Sisimai
|
|
16
16
|
module SpamDetected
|
17
17
|
# Imported from p5-Sisimail/lib/Sisimai/Reason/SpamDetected.pm
|
18
18
|
class << self
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|content[ ]
|
42
|
-
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
50
|
-
|
51
|
-
|
|
52
|
-
)
|
53
|
-
|may[ ]consider[ ]spam
|
54
|
-
|message[ ](?:
|
55
|
-
considered[ ]as[ ]spam[ ]or[ ]virus
|
56
|
-
|content[ ]rejected
|
57
|
-
|filtered
|
58
|
-
|filtered[.][ ](?:
|
59
|
-
please[ ]see[ ]the[ ]faqs[ ]section[ ]on[ ]spam
|
60
|
-
|refer[ ]to[ ]the[ ]troubleshooting[ ]page[ ]at[ ]
|
61
|
-
)
|
62
|
-
|looks[ ]like[ ]spam
|
63
|
-
|not[ ]accepted[ ]for[ ]policy[ ]reasons[.][ ]see[ ]http: # Yahoo!
|
64
|
-
|refused[ ]by[ ]mailmarshal[ ]spamprofiler
|
65
|
-
|rejected[ ](?:
|
66
|
-
as[ ]spam
|
67
|
-
|because[ ]of[ ]unacceptable[ ]content
|
68
|
-
|due[ ]to[ ]suspected[ ]spam[ ]content
|
69
|
-
|for[ ]policy[ ]reasons
|
70
|
-
)
|
71
|
-
)
|
72
|
-
|our[ ](?:
|
73
|
-
email[ ]server[ ]thinks[ ]this[ ]email[ ]is[ ]spam
|
74
|
-
|filters[ ]rate[ ]at[ ]and[ ]above[ ].+[ ]percent[ ]probability[ ]of[ ]being[ ]spam
|
75
|
-
|system[ ]has[ ]detected[ ]that[ ]this[ ]message[ ]is
|
76
|
-
)
|
77
|
-
|permanent[ ]failure[ ]for[ ]one[ ]or[ ]more[ ]recipients[ ][(].+:blocked[)]
|
78
|
-
|probable[ ]spam
|
79
|
-
|reject[ ]bulk[.]advertising
|
80
|
-
|reject,.+[ ][-][ ]spam[.][ ]
|
81
|
-
|rejected(?:
|
82
|
-
:[ ]spamassassin[ ]score[ ]
|
83
|
-
|[ ]by[ ].+[ ][(]spam[)]
|
84
|
-
|[ ]due[ ]to[ ]spam[ ](?:classification|content)
|
19
|
+
Regex = %r{(?>
|
20
|
+
["]the[ ]mail[ ]server[ ]detected[ ]your[ ]message[ ]as[ ]spam[ ]and[ ]
|
21
|
+
has[ ]prevented[ ]delivery[.]["] # CPanel/Exim with SA rejections on
|
22
|
+
|(?:\d[.]\d[.]\d|\d{3})[ ]spam\z
|
23
|
+
|appears[ ]to[ ]be[ ]unsolicited
|
24
|
+
|blacklisted[ ]url[ ]in[ ]message
|
25
|
+
|block[ ]for[ ]spam
|
26
|
+
|blocked[ ]by[ ](?:
|
27
|
+
policy:[ ]no[ ]spam[ ]please
|
28
|
+
|spamassassin # rejected by SpamAssassin
|
29
|
+
)
|
30
|
+
|blocked[ ]for[ ]abuse[.][ ]see[ ]http://att[.]net/blocks # AT&T
|
31
|
+
|bulk[ ]email
|
32
|
+
|content[ ]filter[ ]rejection
|
33
|
+
|cyberoam[ ]anti[ ]spam[ ]engine[ ]has[ ]identified[ ]this[ ]email[ ]as[ ]a[ ]bulk[ ]email
|
34
|
+
|denied[ ]due[ ]to[ ]spam[ ]list
|
35
|
+
|dt:spm[ ]mx.+[ ]http://mail[.]163[.]com/help/help_spam_16[.]htm
|
36
|
+
|greylisted.?.[ ]please[ ]try[ ]again[ ]in
|
37
|
+
|http://(?:www[.]spamhaus[.]org|dsbl[.]org)
|
38
|
+
|listed[ ]in[ ]work[.]drbl[.]imedia[.]ru
|
39
|
+
|mail[ ](?:
|
40
|
+
appears[ ]to[ ]be[ ]unsolicited # rejected due to spam
|
41
|
+
|content[ ]denied # http://service.mail.qq.com/cgi-bin/help?subtype=1&&id=20022&&no=1000726
|
42
|
+
|rejete.+[a-z]{3}.+506
|
43
|
+
)
|
44
|
+
|may[ ]consider[ ]spam
|
45
|
+
|message[ ](?:
|
46
|
+
considered[ ]as[ ]spam[ ]or[ ]virus
|
47
|
+
|content[ ]rejected
|
48
|
+
|filtered
|
49
|
+
|filtered[.][ ](?:
|
50
|
+
please[ ]see[ ]the[ ]faqs[ ]section[ ]on[ ]spam
|
51
|
+
|refer[ ]to[ ]the[ ]troubleshooting[ ]page[ ]at[ ]
|
85
52
|
)
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
|
94
|
-
|check
|
95
|
-
|content[ ]matched
|
96
|
-
|detected
|
97
|
-
|email
|
98
|
-
|email[ ]not[ ]accepted
|
99
|
-
|message[ ]rejected[.] # mail.ru
|
100
|
-
|not[ ]accepted
|
101
|
-
|refused
|
102
|
-
|rejection
|
103
|
-
|reporting[ ]address # SendGrid: a message to an address has previously been marked as Spam by the recipient.
|
104
|
-
|score[ ]
|
53
|
+
|looks[ ]like[ ]spam
|
54
|
+
|not[ ]accepted[ ]for[ ]policy[ ]reasons[.][ ]see[ ]http: # Yahoo!
|
55
|
+
|refused[ ]by[ ]mailmarshal[ ]spamprofiler
|
56
|
+
|rejected[ ](?:
|
57
|
+
as[ ]spam
|
58
|
+
|because[ ]of[ ]unacceptable[ ]content
|
59
|
+
|due[ ]to[ ]suspected[ ]spam[ ]content
|
60
|
+
|for[ ]policy[ ]reasons
|
105
61
|
)
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
|
110
|
-
|
111
|
-
|
62
|
+
)
|
63
|
+
|our[ ](?:
|
64
|
+
email[ ]server[ ]thinks[ ]this[ ]email[ ]is[ ]spam
|
65
|
+
|filters[ ]rate[ ]at[ ]and[ ]above[ ].+[ ]percent[ ]probability[ ]of[ ]being[ ]spam
|
66
|
+
|system[ ]has[ ]detected[ ]that[ ]this[ ]message[ ]is
|
67
|
+
)
|
68
|
+
|permanent[ ]failure[ ]for[ ]one[ ]or[ ]more[ ]recipients[ ][(].+:blocked[)]
|
69
|
+
|probable[ ]spam
|
70
|
+
|reject[ ]bulk[.]advertising
|
71
|
+
|reject,.+[ ][-][ ]spam[.][ ]
|
72
|
+
|rejected(?:
|
73
|
+
:[ ]spamassassin[ ]score[ ]
|
74
|
+
|[ ]by[ ].+[ ][(]spam[)]
|
75
|
+
|[ ]due[ ]to[ ]spam[ ](?:classification|content)
|
76
|
+
)
|
77
|
+
|rejecting[ ]banned[ ]content
|
78
|
+
|related[ ]to[ ]content[ ]with[ ]spam[-]like[ ]characteristics
|
79
|
+
|rule[ ]imposed[ ]as[ ].+is[ ]blacklisted[ ]on # Mailmarshal RBLs
|
80
|
+
|sender[ ]domain[ ]listed[ ]at[ ].+
|
81
|
+
|sending[ ]address[ ]not[ ]accepted[ ]due[ ]to[ ]spam[ ]filter
|
82
|
+
|spam[ ](?:
|
83
|
+
.+[ ]exceeded
|
84
|
+
|blocked
|
85
|
+
|check
|
86
|
+
|content[ ]matched
|
87
|
+
|detected
|
88
|
+
|email
|
89
|
+
|email[ ]not[ ]accepted
|
90
|
+
|message[ ]rejected[.] # mail.ru
|
91
|
+
|not[ ]accepted
|
92
|
+
|refused
|
93
|
+
|rejection
|
94
|
+
|reporting[ ]address # SendGrid: a message to an address has previously been marked as Spam by the recipient.
|
95
|
+
|score[ ]
|
96
|
+
)
|
97
|
+
|spambouncer[ ]identified[ ]spam # SpamBouncer identified SPAM
|
98
|
+
|spamming[ ]not[ ]allowed
|
99
|
+
|too[ ]much[ ]spam[.] # Earthlink
|
100
|
+
|the[ ]message[ ](?:
|
101
|
+
has[ ]been[ ]rejected[ ]by[ ]spam[ ]filtering[ ]engine
|
102
|
+
|was[ ]rejected[ ]due[ ]to[ ]classification[ ]as[ ]bulk[ ]mail
|
103
|
+
)
|
104
|
+
|the[ ]content[ ]of[ ]this[ ]message[ ]looked[ ]like[ ]spam # SendGrid
|
105
|
+
|this[ ](?:e-mail|mail)[ ](?:
|
106
|
+
cannot[ ]be[ ]forwarded[ ]because[ ]it[ ]was[ ]detected[ ]as[ ]spam
|
107
|
+
|is[ ]classified[ ]as[ ]spam[ ]and[ ]is[ ]rejected
|
108
|
+
)
|
109
|
+
|this[ ]message[ ](?:
|
110
|
+
appears[ ]to[ ]be[ ]spam
|
111
|
+
|has[ ]been[ ](?:
|
112
|
+
identified[ ]as[ ]spam
|
113
|
+
|scored[ ]as[ ]spam[ ]with[ ]a[ ]probability
|
112
114
|
)
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
116
|
-
|
115
|
+
|scored[ ].+[ ]spam[ ]points
|
116
|
+
|was[ ]classified[ ]as[ ]spam
|
117
|
+
|was[ ]rejected[ ]by[ ]recurrent[ ]pattern[ ]detection[ ]system
|
118
|
+
)
|
119
|
+
|transaction[ ]failed[ ]spam[ ]message[ ]not[ ]queued # SendGrid
|
120
|
+
|we[ ]dont[ ]accept[ ]spam
|
121
|
+
|you're[ ]using[ ]a[ ]mass[ ]mailer
|
122
|
+
|your[ ](?:
|
123
|
+
email[ ](?:
|
124
|
+
appears[ ]similar[ ]to[ ]spam[ ]we[ ]have[ ]received[ ]before
|
125
|
+
|breaches[ ]local[ ]uribl[ ]policy
|
126
|
+
|had[ ]spam[-]like[ ]
|
127
|
+
|is[ ](?:considered|probably)[ ]spam
|
128
|
+
|was[ ]detected[ ]as[ ]spam
|
117
129
|
)
|
118
|
-
|
|
119
|
-
|
130
|
+
|message[ ](?:
|
131
|
+
as[ ]spam[ ]and[ ]has[ ]prevented[ ]delivery
|
120
132
|
|has[ ]been[ ](?:
|
121
|
-
|
122
|
-
|
|
123
|
-
)
|
124
|
-
|scored[ ].+[ ]spam[ ]points
|
125
|
-
|was[ ]classified[ ]as[ ]spam
|
126
|
-
|was[ ]rejected[ ]by[ ]recurrent[ ]pattern[ ]detection[ ]system
|
127
|
-
)
|
128
|
-
|transaction[ ]failed[ ]spam[ ]message[ ]not[ ]queued # SendGrid
|
129
|
-
|we[ ]dont[ ]accept[ ]spam
|
130
|
-
|you're[ ]using[ ]a[ ]mass[ ]mailer
|
131
|
-
|your[ ](?:
|
132
|
-
email[ ](?:
|
133
|
-
appears[ ]similar[ ]to[ ]spam[ ]we[ ]have[ ]received[ ]before
|
134
|
-
|breaches[ ]local[ ]uribl[ ]policy
|
135
|
-
|had[ ]spam[-]like[ ]
|
136
|
-
|is[ ](?:considered|probably)[ ]spam
|
137
|
-
|was[ ]detected[ ]as[ ]spam
|
138
|
-
)
|
139
|
-
|message[ ](?:
|
140
|
-
as[ ]spam[ ]and[ ]has[ ]prevented[ ]delivery
|
141
|
-
|has[ ]been[ ](?:
|
142
|
-
temporarily[ ]blocked[ ]by[ ]our[ ]filter
|
143
|
-
|rejected[ ]because[ ]it[ ]appears[ ]to[ ]be[ ]spam
|
144
|
-
)
|
145
|
-
|has[ ]triggered[ ]a[ ]spam[ ]block
|
146
|
-
|may[ ]contain[ ]the[ ]spam[ ]contents
|
147
|
-
|failed[ ]several[ ]antispam[ ]checks
|
133
|
+
temporarily[ ]blocked[ ]by[ ]our[ ]filter
|
134
|
+
|rejected[ ]because[ ]it[ ]appears[ ]to[ ]be[ ]spam
|
148
135
|
)
|
136
|
+
|has[ ]triggered[ ]a[ ]spam[ ]block
|
137
|
+
|may[ ]contain[ ]the[ ]spam[ ]contents
|
138
|
+
|failed[ ]several[ ]antispam[ ]checks
|
149
139
|
)
|
150
140
|
)
|
151
|
-
|
141
|
+
)
|
142
|
+
}x
|
152
143
|
|
153
|
-
|
144
|
+
def text; return 'spamdetected'; end
|
145
|
+
def description; return 'Email rejected by spam filter running on the remote host'; end
|
146
|
+
|
147
|
+
# Try to match that the given text and regular expressions
|
148
|
+
# @param [String] argv1 String to be matched with regular expressions
|
149
|
+
# @return [True,False] false: Did not match
|
150
|
+
# true: Matched
|
151
|
+
def match(argv1)
|
152
|
+
return nil unless argv1
|
153
|
+
return true if argv1 =~ Regex
|
154
154
|
return false
|
155
155
|
end
|
156
156
|
|
@@ -162,7 +162,7 @@ module Sisimai
|
|
162
162
|
def true(argvs)
|
163
163
|
return nil if argvs.deliverystatus.empty?
|
164
164
|
return true if argvs.reason == 'spamdetected'
|
165
|
-
return true if Sisimai::SMTP::Status.name(argvs.deliverystatus) == 'spamdetected'
|
165
|
+
return true if Sisimai::SMTP::Status.name(argvs.deliverystatus).to_s == 'spamdetected'
|
166
166
|
return true if match(argvs.diagnosticcode.downcase)
|
167
167
|
return false
|
168
168
|
end
|