sisimai 4.22.2-java → 4.22.3-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.

Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/ANALYTICAL-PRECISION +24 -23
  3. data/ChangeLog.md +39 -2
  4. data/README-JA.md +10 -10
  5. data/README.md +10 -10
  6. data/lib/sisimai.rb +0 -1
  7. data/lib/sisimai/bite/email.rb +1 -1
  8. data/lib/sisimai/bite/email/amazonses.rb +1 -2
  9. data/lib/sisimai/bite/email/exim.rb +46 -8
  10. data/lib/sisimai/bite/email/fml.rb +170 -0
  11. data/lib/sisimai/bite/email/imailserver.rb +1 -1
  12. data/lib/sisimai/bite/email/messagelabs.rb +6 -1
  13. data/lib/sisimai/bite/email/office365.rb +0 -1
  14. data/lib/sisimai/data.rb +34 -12
  15. data/lib/sisimai/datetime.rb +10 -4
  16. data/lib/sisimai/reason.rb +70 -55
  17. data/lib/sisimai/reason/blocked.rb +91 -21
  18. data/lib/sisimai/reason/expired.rb +7 -3
  19. data/lib/sisimai/reason/filtered.rb +1 -0
  20. data/lib/sisimai/reason/hostunknown.rb +9 -5
  21. data/lib/sisimai/reason/mailboxfull.rb +17 -9
  22. data/lib/sisimai/reason/mailererror.rb +5 -4
  23. data/lib/sisimai/reason/mesgtoobig.rb +2 -0
  24. data/lib/sisimai/reason/networkerror.rb +11 -3
  25. data/lib/sisimai/reason/norelaying.rb +5 -2
  26. data/lib/sisimai/reason/policyviolation.rb +9 -2
  27. data/lib/sisimai/reason/rejected.rb +41 -10
  28. data/lib/sisimai/reason/securityerror.rb +2 -0
  29. data/lib/sisimai/reason/spamdetected.rb +37 -20
  30. data/lib/sisimai/reason/suspend.rb +10 -4
  31. data/lib/sisimai/reason/systemerror.rb +1 -0
  32. data/lib/sisimai/reason/toomanyconn.rb +4 -0
  33. data/lib/sisimai/reason/userunknown.rb +40 -20
  34. data/lib/sisimai/reason/vacation.rb +20 -1
  35. data/lib/sisimai/reason/virusdetected.rb +3 -1
  36. data/lib/sisimai/rfc3464.rb +3 -4
  37. data/lib/sisimai/rfc3834.rb +37 -6
  38. data/lib/sisimai/rhost.rb +2 -1
  39. data/lib/sisimai/rhost/exchangeonline.rb +29 -0
  40. data/lib/sisimai/rhost/franceptt.rb +58 -0
  41. data/lib/sisimai/smtp/status.rb +1 -0
  42. data/lib/sisimai/version.rb +1 -1
  43. data/set-of-emails/jsonobj/json-amazonses-06.json +1 -0
  44. data/set-of-emails/maildir/bsd/email-exim-31.eml +39 -0
  45. data/set-of-emails/maildir/bsd/email-exim-32.eml +42 -0
  46. data/set-of-emails/maildir/bsd/email-exim-33.eml +42 -0
  47. data/set-of-emails/maildir/bsd/email-exim-34.eml +41 -0
  48. data/set-of-emails/maildir/bsd/email-exim-35.eml +41 -0
  49. data/set-of-emails/maildir/bsd/email-exim-36.eml +41 -0
  50. data/set-of-emails/maildir/bsd/email-exim-37.eml +41 -0
  51. data/set-of-emails/maildir/bsd/email-exim-38.eml +32 -0
  52. data/set-of-emails/maildir/bsd/email-exim-39.eml +47 -0
  53. data/set-of-emails/maildir/bsd/email-exim-40.eml +41 -0
  54. data/set-of-emails/maildir/bsd/email-exim-41.eml +32 -0
  55. data/set-of-emails/maildir/bsd/email-exim-42.eml +41 -0
  56. data/set-of-emails/maildir/bsd/email-exim-43.eml +60 -0
  57. data/set-of-emails/maildir/bsd/email-exim-44.eml +64 -0
  58. data/set-of-emails/maildir/bsd/email-exim-45.eml +43 -0
  59. data/set-of-emails/maildir/bsd/email-exim-46.eml +41 -0
  60. data/set-of-emails/maildir/bsd/email-exim-47.eml +42 -0
  61. data/set-of-emails/maildir/bsd/email-exim-48.eml +59 -0
  62. data/set-of-emails/maildir/bsd/email-exim-49.eml +59 -0
  63. data/set-of-emails/maildir/bsd/email-exim-50.eml +41 -0
  64. data/set-of-emails/maildir/bsd/email-exim-51.eml +41 -0
  65. data/set-of-emails/maildir/bsd/email-exim-52.eml +34 -0
  66. data/set-of-emails/maildir/bsd/email-exim-53.eml +48 -0
  67. data/set-of-emails/maildir/bsd/email-exim-54.eml +40 -0
  68. data/set-of-emails/maildir/bsd/email-exim-55.eml +38 -0
  69. data/set-of-emails/maildir/bsd/email-exim-56.eml +40 -0
  70. data/set-of-emails/maildir/bsd/email-exim-57.eml +39 -0
  71. data/set-of-emails/maildir/bsd/email-exim-58.eml +43 -0
  72. data/set-of-emails/maildir/bsd/email-fml-01.eml +70 -0
  73. data/set-of-emails/maildir/bsd/email-fml-02.eml +44 -0
  74. data/set-of-emails/maildir/bsd/email-office365-03.eml +117 -0
  75. data/set-of-emails/maildir/bsd/email-postfix-31.eml +94 -0
  76. data/set-of-emails/maildir/bsd/email-sendmail-45.eml +102 -0
  77. data/set-of-emails/maildir/bsd/email-sendmail-46.eml +103 -0
  78. data/set-of-emails/maildir/bsd/email-sendmail-47.eml +102 -0
  79. data/set-of-emails/maildir/bsd/email-sendmail-48.eml +101 -0
  80. data/set-of-emails/maildir/bsd/rfc3464-33.eml +38 -0
  81. data/set-of-emails/maildir/bsd/rfc3464-34.eml +53 -0
  82. data/set-of-emails/maildir/bsd/rhost-exchange-online-02.eml +89 -0
  83. data/set-of-emails/maildir/bsd/rhost-exchange-online-03.eml +205 -0
  84. data/set-of-emails/maildir/bsd/rhost-franceptt-01.eml +102 -0
  85. data/set-of-emails/maildir/bsd/rhost-franceptt-02.eml +103 -0
  86. metadata +47 -2
@@ -20,18 +20,22 @@ module Sisimai
20
20
  # true: Matched
21
21
  def match(argv1)
22
22
  return nil unless argv1
23
- regex = %r{(?:
23
+ regex = %r{(?>
24
24
  connection[ ]timed[ ]out
25
25
  |could[ ]not[ ]find[ ]a[ ]gateway[ ]for
26
26
  |delivery[ ]time[ ]expired
27
+ |Failed[ ]to[ ]deliver[ ]to[ ]domain[ ].+[ ]after[ ]\d+[ ]tries
27
28
  |giving[ ]up[ ]on
28
29
  |it[ ]has[ ]not[ ]been[ ]collected[ ]after
29
- |message[ ]expired[ ]after[ ]sitting[ ]in[ ]queue[ ]for
30
- |Message[ ]timed[ ]out
30
+ |message[ ](?:
31
+ expired[ ]after[ ]sitting[ ]in[ ]queue[ ]for
32
+ |timed[ ]out
33
+ )
31
34
  |retry[ ]time[ ]not[ ]reached[ ]for[ ]any[ ]host[ ]after[ ]a[ ]long[ ]failure[ ]period
32
35
  |server[ ]did[ ]not[ ]respond
33
36
  |this[ ]message[ ]has[ ]been[ ]in[ ]the[ ]queue[ ]too[ ]long
34
37
  |was[ ]not[ ]reachable[ ]within[ ]the[ ]allowed[ ]queue[ ]period
38
+ |Your[ ]message[ ]could[ ]not[ ]be[ ]delivered[ ]for[ ]more[ ]than
35
39
  )
36
40
  }ix
37
41
 
@@ -42,6 +42,7 @@ module Sisimai
42
42
  |we[ ]failed[ ]to[ ]deliver[ ]mail[ ]because[ ]the[ ]following[ ]address
43
43
  [ ]recipient[ ]id[ ]refuse[ ]to[ ]receive[ ]mail # Willcom
44
44
  )
45
+ |You[ ]have[ ]been[ ]blocked[ ]by[ ]the[ ]recipient
45
46
  }ix
46
47
 
47
48
  return true if argv1 =~ regex
@@ -16,14 +16,15 @@ module Sisimai
16
16
  # Try to match that the given text and regular expressions
17
17
  # @param [String] argv1 String to be matched with regular expressions
18
18
  # @return [True,False] false: Did not match
19
- # true: Matched
19
+ # true: Matched
20
+ # @since v4.0.0
20
21
  def match(argv1)
21
22
  return nil unless argv1
22
23
  regex = %r{(?>
23
24
  domain[ ](?:
24
25
  does[ ]not[ ]exist
25
- |must[ ]exist
26
26
  |is[ ]not[ ]reachable
27
+ |must[ ]exist
27
28
  )
28
29
  |host[ ](?:
29
30
  or[ ]domain[ ]name[ ]not[ ]found
@@ -34,10 +35,12 @@ module Sisimai
34
35
  |name[ ]or[ ]service[ ]not[ ]known
35
36
  |no[ ]such[ ]domain
36
37
  |recipient[ ](?:
37
- address[ ]rejected:[ ]unknown[ ]domain[ ]name
38
- domain[ ]must[ ]exist
38
+ address[ ]rejected:[ ]unknown[ ]domain[ ]name
39
+ |domain[ ]must[ ]exist
39
40
  )
41
+ |The[ ]account[ ]or[ ]domain[ ]may[ ]not[ ]exist
40
42
  |unknown[ ]host
43
+ |Unrouteable[ ]address
41
44
  )
42
45
  }ix
43
46
 
@@ -65,7 +68,8 @@ module Sisimai
65
68
  if tempreason == reasontext
66
69
  # Status: 5.1.2
67
70
  # Diagnostic-Code: SMTP; 550 Host unknown
68
- v = true
71
+ require 'sisimai/reason/networkerror'
72
+ v = true unless Sisimai::Reason::NetworkError.match(diagnostic)
69
73
  else
70
74
  # Check the value of Diagnosic-Code: header with patterns
71
75
  v = true if Sisimai::Reason::HostUnknown.match(diagnostic)
@@ -21,19 +21,23 @@ module Sisimai
21
21
  def match(argv1)
22
22
  return nil unless argv1
23
23
  regex = %r{(?>
24
- account[ ]is[ ](?:
24
+ Account[ ]disabled[ ]temporarly[ ]for[ ]exceeding[ ]receiving[ ]limits
25
+ |account[ ]is[ ](?:
25
26
  exceeding[ ]their[ ]quota
26
27
  |over[ ]quota
27
28
  |temporarily[ ]over[ ]quota
28
29
  )
30
+ |Boite[ ]du[ ]destinataire[ ]pleine.+[A-Z]{3}.+417
29
31
  |delivery[ ]failed:[ ]over[ ]quota
30
32
  |disc[ ]quota[ ]exceeded
31
33
  |does[ ]not[ ]have[ ]enough[ ]space
32
34
  |exceeded[ ]storage[ ]allocation
33
35
  |exceeding[ ]its[ ]mailbox[ ]quota
34
36
  |full[ ]mailbox
35
- |is[ ]over[ ]quota[ ]temporarily
36
- |is[ ]over[ ]disk[ ]quota
37
+ |is[ ]over[ ](?:
38
+ disk[ ]quota
39
+ |quota[ ]temporarily
40
+ )
37
41
  |mail[ ](?:
38
42
  file[ ]size[ ]exceeds[ ]the[ ]maximum[ ]size[ ]allowed[ ]for[ ]mail[ ]delivery
39
43
  |quota[ ]exceeded
@@ -54,22 +58,26 @@ module Sisimai
54
58
  |mailfolder[ ]is[ ]full
55
59
  |not[ ]enough[ ]storage[ ]space[ ]in
56
60
  |over[ ]the[ ]allowed[ ]quota
57
- |quota[ ]exceeded
58
- |quota[ ]violation[ ]for
61
+ |quota[ ](?:
62
+ exceeded
63
+ |violation[ ]for
64
+ )
59
65
  |recipient[ ](?:
60
66
  reached[ ]disk[ ]quota
61
67
  |rejected:[ ]mailbox[ ]would[ ]exceed[ ]maximum[ ]allowed[ ]storage
62
68
  )
63
- |The[ ]recipient[ ]mailbox[ ]has[ ]exceeded[ ]its[ ]disk[ ]space[ ]limit
64
- |The[ ]user[']s[ ]space[ ]has[ ]been[ ]used[ ]up
69
+ |The[ ](?:
70
+ recipient[ ]mailbox[ ]has[ ]exceeded[ ]its[ ]disk[ ]space[ ]limit
71
+ |user[']s[ ]space[ ]has[ ]been[ ]used[ ]up
72
+ |user[ ]you[ ]are[ ]trying[ ]to[ ]reach[ ]is[ ]over[ ]quota
73
+ )
65
74
  |too[ ]much[ ]mail[ ]data # @docomo.ne.jp
66
75
  |user[ ](?:
67
76
  has[ ](?:
68
77
  exceeded[ ]quota,[ ]bouncing[ ]mail
69
78
  |too[ ]many[ ]messages[ ]on[ ]the[ ]server
70
79
  )
71
- |is[ ]over[ ]quota
72
- |is[ ]over[ ]the[ ]quota
80
+ |is[ ]over[ ](?:the[ ])?quota
73
81
  |over[ ]quota
74
82
  |over[ ]quota[.][ ][(][#]5[.]1[.]1[)] # qmail-toaster
75
83
  )
@@ -23,16 +23,17 @@ module Sisimai
23
23
  def match(argv1)
24
24
  return nil unless argv1
25
25
  regex = %r{(?>
26
- command[ ](?:
26
+ \Aprocmail:[ ] # procmail
27
+ |bin/(?:procmail|maildrop)
28
+ |command[ ](?:
27
29
  failed:[ ]
28
30
  |died[ ]with[ ]status[ ]\d+
29
31
  |output:
30
32
  )
31
- |\Aprocmail:[ ] # procmail
32
- |bin/(?:procmail|maildrop)
33
+ |exit[ ]\d+
33
34
  |mailer[ ]error
35
+ |pipe[ ]to[ ][|][/].+
34
36
  |X[-]UNIX[;][ ]\d+ # X-UNIX; 127
35
- |exit[ ]\d+
36
37
  )
37
38
  }ix
38
39
 
@@ -21,6 +21,7 @@ module Sisimai
21
21
  return nil unless argv1
22
22
  regex = %r{(?>
23
23
  exceeded[ ]maximum[ ]inbound[ ]message[ ]size
24
+ |Line[ ]limit[ ]exceeded
24
25
  |max[ ]message[ ]size[ ]exceeded
25
26
  |message[ ](?:
26
27
  file[ ]too[ ]big
@@ -34,6 +35,7 @@ module Sisimai
34
35
  |too[ ]large[ ]for[ ]this[ ].+
35
36
  )
36
37
  |size[ ]limit
38
+ |Taille[ ]limite[ ]du[ ]message[ ]atteinte.+[A-Z]{3}.+514
37
39
  )
38
40
  }ix
39
41
 
@@ -24,7 +24,7 @@ module Sisimai
24
24
  # true: Matched
25
25
  def match(argv1)
26
26
  return nil unless argv1
27
- regex = %r{(?:
27
+ regex = %r{(?>
28
28
  could[ ]not[ ]connect[ ]and[ ]send[ ]the[ ]mail[ ]to
29
29
  |DNS[ ]records[ ]for[ ]the[ ]destination[ ]computer[ ]could[ ]not[ ]be[ ]found
30
30
  |Hop[ ]count[ ]exceeded[ ]-[ ]possible[ ]mail[ ]loop
@@ -32,9 +32,17 @@ module Sisimai
32
32
  |mail[ ]forwarding[ ]loop[ ]for[ ]
33
33
  |malformed[ ]name[ ]server[ ]reply
34
34
  |maximum[ ]forwarding[ ]loop[ ]count[ ]exceeded
35
- |message[ ]looping
36
- |name[ ]service[ ]error
35
+ |message[ ](?:
36
+ looping
37
+ |probably[ ]in[ ]a[ ]routing[ ]loop
38
+ )
39
+ |name[ ]service[ ]error[ ]for[ ].+[ ](?:
40
+ Malformed[ ]or[ ]unexpected[ ]name[ ]server[ ]reply
41
+ |Host[ ]not[ ]found,[ ]try[ ]again
42
+ )
43
+ |No[ ]route[ ]to[ ]host
37
44
  |too[ ]many[ ]hops
45
+ |Unable[ ]to[ ]resolve[ ]route[ ].+[ ]
38
46
  |unrouteable[ ]mail[ ]domain
39
47
  )
40
48
  }ix
@@ -29,8 +29,10 @@ module Sisimai
29
29
  |Insecure[ ]Mail[ ]Relay
30
30
  |mail[ ]server[ ]requires[ ]authentication[ ]when[ ]attempting[ ]to[ ]
31
31
  send[ ]to[ ]a[ ]non-local[ ]e-mail[ ]address # MailEnable
32
- |not[ ]allowed[ ]to[ ]relay[ ]through[ ]this[ ]machine
33
- |Not[ ]an[ ]open[ ]relay,[ ]so[ ]get[ ]lost
32
+ |not[ ](?:
33
+ allowed[ ]to[ ]relay[ ]through[ ]this[ ]machine
34
+ |an[ ]open[ ]relay,[ ]so[ ]get[ ]lost
35
+ )
34
36
  |relay[ ](?:
35
37
  access[ ]denied
36
38
  |denied
@@ -38,6 +40,7 @@ module Sisimai
38
40
  )
39
41
  |relaying[ ]denied # Sendmail
40
42
  |that[ ]domain[ ]isn[']t[ ]in[ ]my[ ]list[ ]of[ ]allowed[ ]rcpthost
43
+ |This[ ]system[ ]is[ ]not[ ]configured[ ]to[ ]relay[ ]mail
41
44
  |Unable[ ]to[ ]relay[ ]for
42
45
  )
43
46
  }ix
@@ -31,15 +31,22 @@ module Sisimai
31
31
  regex = %r{(?>
32
32
  because[ ]the[ ]recipient[ ]is[ ]not[ ]accepting[ ]mail[ ]with[ ](?:attachments|embedded[ ]images) # AOL Phoenix
33
33
  |closed[ ]mailing[ ]list
34
+ |Denied[ ]by[ ]policy
34
35
  |email[ ](?:
35
36
  not[ ]accepted[ ]for[ ]policy[ ]reasons
36
37
  # http://kb.mimecast.com/Mimecast_Knowledge_Base/Administration_Console/Monitoring/Mimecast_SMTP_Error_Codes#554
37
38
  |rejected[ ]due[ ]to[ ]security[ ]policies
38
39
  )
39
- |header[ ]are[ ]not[ ]accepted
40
- |Header[ ]error
40
+ |header[ ](?:are[ ]not[ ]accepted|error)
41
+ |Mail[ ]from[ ].+[ ]rejected[ ]for[ ]policy[ ]reasons
42
+ |message[ ](?:
43
+ given[ ]low[ ]priority
44
+ |not[ ]accepted[ ]for[ ]policy[ ]reasons
45
+ )
41
46
  |Messages[ ]with[ ]multiple[ ]addresses
42
47
  |You[ ]have[ ]exceeded[ ]the[ ]the[ ]allowable[ ]number[ ]of[ ]posts[ ]without[ ]solving[ ]a[ ]captcha
48
+ |Protocol[ ]violation
49
+ |The[ ]email[ ]address[ ]used[ ]to[ ]send[ ]your[ ]message[ ]is[ ]not[ ]subscribed[ ]to[ ]this[ ]group
43
50
  )
44
51
  }ix
45
52
 
@@ -26,43 +26,58 @@ module Sisimai
26
26
  # true: Matched
27
27
  def match(argv1)
28
28
  return nil unless argv1
29
+ isnot = %r{(?:5[.]1[.]0[ ]Address
30
+ |Recipient[ ]address
31
+ |Sender[ ]IP[ ]address
32
+ )[ ]rejected
33
+ }xi
29
34
  regex = %r{(?>
30
35
  [<][>][ ]invalid[ ]sender
31
36
  |address[ ]rejected
37
+ |Administrative[ ]prohibition
32
38
  |batv[ ](?:
33
39
  failed[ ]to[ ]verify # SoniWall
34
40
  |validation[ ]failure # SoniWall
35
41
  )
36
42
  |backscatter[ ]protection[ ]detected[ ]an[ ]invalid[ ]or[ ]expired[ ]email[ ]address # MDaemon
37
43
  |bogus[ ]mail[ ]from # IMail - block empty sender
38
- |closed[ ]mailing[ ]list # Exim test mail
44
+ |Connections[ ]not[ ]accepted[ ]from[ ]servers[ ]without[ ]a[ ]valid[ ]sender[ ]domain
39
45
  |denied[ ]\[bouncedeny\] # McAfee
46
+ |Delivery[ ]not[ ]authorized,[ ]message[ ]refused
47
+ |does[ ]not[ ]exist[ ]E2110
40
48
  |domain[ ]of[ ]sender[ ]address[ ].+[ ]does[ ]not[ ]exist
49
+ |Emetteur[ ]invalide.+[A-Z]{3}.+(?:403|405|415)
41
50
  |empty[ ]envelope[ ]senders[ ]not[ ]allowed
42
51
  |error:[ ]no[ ]third-party[ ]dsns # SpamWall - block empty sender
52
+ |From:[ ]Domain[ ]is[ ]invalid[.][ ]Please[ ]provide[ ]a[ ]valid[ ]From:
43
53
  |fully[ ]qualified[ ]email[ ]address[ ]required # McAfee
44
54
  |invalid[ ]domain,[ ]see[ ][<]url:.+[>]
55
+ |Mail[ ]from[ ]not[ ]owned[ ]by[ ]user.+[A-Z]{3}.+421
45
56
  |Message[ ]rejected:[ ]Email[ ]address[ ]is[ ]not[ ]verified
46
57
  |mx[ ]records[ ]for[ ].+[ ]violate[ ]section[ ].+
47
- |name[ ]service[ ]error[ ]for[ ] # Malformed MX RR or host not found
48
58
  |Null[ ]Sender[ ]is[ ]not[ ]allowed
49
59
  |recipient[ ]not[ ]accepted[.][ ][(]batv:[ ]no[ ]tag
50
60
  |returned[ ]mail[ ]not[ ]accepted[ ]here
51
61
  |rfc[ ]1035[ ]violation:[ ]recursive[ ]cname[ ]records[ ]for
52
62
  |rule[ ]imposed[ ]mailbox[ ]access[ ]for # MailMarshal
53
63
  |sender[ ](?:
54
- verify[ ]failed # Exim callout
64
+ email[ ]address[ ]rejected
65
+ |is[ ]Spammer
55
66
  |not[ ]pre[-]approved
56
67
  |rejected
57
68
  |domain[ ]is[ ]empty
69
+ |verify[ ]failed # Exim callout
58
70
  )
59
71
  |syntax[ ]error:[ ]empty[ ]email[ ]address
60
72
  |the[ ]message[ ]has[ ]been[ ]rejected[ ]by[ ]batv[ ]defense
61
73
  |transaction[ ]failed[ ]unsigned[ ]dsn[ ]for
74
+ |Unroutable[ ]sender[ ]address
75
+ |you[ ]are[ ]sending[ ]to[/]from[ ]an[ ]address[ ]that[ ]has[ ]been[ ]blacklisted
62
76
  )
63
77
  }ix
64
78
 
65
- return true if argv1 =~ regex
79
+ return false if argv1 =~ isnot
80
+ return true if argv1 =~ regex
66
81
  return false
67
82
  end
68
83
 
@@ -74,23 +89,39 @@ module Sisimai
74
89
  def true(argvs)
75
90
  return nil unless argvs
76
91
  return nil unless argvs.is_a? Sisimai::Data
77
- return nil unless argvs.deliverystatus.size > 0
78
- return true if argvs.reason == Sisimai::Reason::Rejected.text
79
92
 
80
93
  require 'sisimai/smtp/status'
81
94
  statuscode = argvs.deliverystatus || ''
82
- diagnostic = argvs.diagnosticcode || ''
83
95
  reasontext = Sisimai::Reason::Rejected.text
96
+
97
+ return true if argvs.reason == reasontext
98
+
99
+ tempreason = Sisimai::SMTP::Status.name(statuscode)
100
+ tempreason = 'undefined' if tempreason.empty?
101
+ diagnostic = argvs.diagnosticcode || ''
84
102
  v = false
85
103
 
86
- if Sisimai::SMTP::Status.name(statuscode) == reasontext
87
- # Delivery status code points C<rejected>.
104
+ if tempreason == reasontext
105
+ # Delivery status code points "rejected".
88
106
  v = true
89
107
  else
90
108
  # Check the value of Diagnosic-Code: header with patterns
91
109
  if argvs.smtpcommand == 'MAIL'
92
- # Matched with a pattern in this class
110
+ # The session was rejected at 'MAIL FROM' command
93
111
  v = true if Sisimai::Reason::Rejected.match(diagnostic)
112
+
113
+ elsif argvs.smtpcommand == 'DATA'
114
+ # The session was rejected at 'DATA' command
115
+ if tempreason != 'userunknown'
116
+ # Except "userunknown"
117
+ v = true if Sisimai::Reason::Rejected.match(diagnostic)
118
+ end
119
+ else
120
+ if tempreason =~ /\A(?:onhold|undefined|securityerror|systemerror)\z/
121
+ # Try to match with message patterns when the temporary reason
122
+ # is "onhold", "undefined", "securityerror", or "systemerror"
123
+ v = true if Sisimai::Reason::Rejected.match(diagnostic)
124
+ end
94
125
  end
95
126
  end
96
127
 
@@ -32,6 +32,7 @@ module Sisimai
32
32
  return nil unless argv1
33
33
  regex = %r{(?>
34
34
  Account[ ]not[ ]subscribed[ ]to[ ]SES
35
+ |Authentification[ ]requise.+[A-Z]{3}.+402
35
36
  |authentication[ ](?:
36
37
  Credentials Invalid
37
38
  |failure
@@ -40,6 +41,7 @@ module Sisimai
40
41
  |turned[ ]on[ ]in[ ]your[ ]email[ ]client
41
42
  )
42
43
  |\d+[ ]denied[ ]\[[a-z]+\][ ].+[(]Mode:[ ].+[)]
44
+ |Codes?[ ]d'?[ ]*authentification[ ]invalide.+[A-Z]{3}.+305
43
45
  |domain[ ].+[ ]is[ ]a[ ]dead[ ]domain
44
46
  |Executable[ ]files[ ]are[ ]not[ ]allowed[ ]in[ ]compressed[ ]files
45
47
  |insecure[ ]mail[ ]relay
@@ -45,34 +45,40 @@ module Sisimai
45
45
  |denied[ ]due[ ]to[ ]spam[ ]list
46
46
  |dt:spm[ ]mx.+[ ]http://mail[.]163[.]com/help/help_spam_16[.]htm
47
47
  |greylisted.?.[ ]please[ ]try[ ]again[ ]in
48
- |http://(?:
49
- www[.]spamhaus[.]org
50
- |dsbl[.]org
51
- |www[.]sorbs[.]net
52
- )
48
+ |http://(?:www[.]spamhaus[.]org|dsbl[.]org)
53
49
  |listed[ ]in[ ]work[.]drbl[.]imedia[.]ru
54
50
  |mail[ ](?:
55
51
  appears[ ]to[ ]be[ ]unsolicited # rejected due to spam
56
52
  |content[ ]denied # http://service.mail.qq.com/cgi-bin/help?subtype=1&&id=20022&&no=1000726
53
+ |rejete.+[A-Z]{3}.+506
57
54
  )
58
55
  |may[ ]consider[ ]spam
59
56
  |message[ ](?:
60
- content[ ]rejected
57
+ considered[ ]as[ ]spam[ ]or[ ]virus
58
+ |content[ ]rejected
61
59
  |filtered
62
- |filtered[.][ ]please[ ]see[ ]the[ ]faqs[ ]section[ ]on[ ]spam
63
- |filtered[.][ ]Refer[ ]to[ ]the[ ]Troubleshooting[ ]page[ ]at[ ]
60
+ |filtered[.][ ](?:
61
+ please[ ]see[ ]the[ ]faqs[ ]section[ ]on[ ]spam
62
+ |Refer[ ]to[ ]the[ ]Troubleshooting[ ]page[ ]at[ ]
63
+ )
64
64
  |looks[ ]like[ ]spam
65
65
  |not[ ]accepted[ ]for[ ]policy[ ]reasons[.][ ]See[ ]http: # Yahoo!
66
66
  |refused[ ]by[ ]mailmarshal[ ]spamprofiler
67
- |rejected[ ]as[ ]spam
68
- |rejected[ ]as[ ]spam[ ]by[ ]Content[ ]Filtering
69
- |rejected[ ]due[ ]to[ ]suspected[ ]spam[ ]content
70
- |rejected[ ]for[ ]policy[ ]reasons
67
+ |rejected[ ](?:
68
+ as[ ]spam
69
+ |because[ ]of[ ]unacceptable[ ]content
70
+ |due[ ]to[ ]suspected[ ]spam[ ]content
71
+ |for[ ]policy[ ]reasons
72
+ )
73
+ )
74
+ |our[ ](?:
75
+ email[ ]server[ ]thinks[ ]this[ ]email[ ]is[ ]spam
76
+ |filters[ ]rate[ ]at[ ]and[ ]above[ ].+[ ]percent[ ]probability[ ]of[ ]being[ ]spam
77
+ |system[ ]has[ ]detected[ ]that[ ]this[ ]message[ ]is
71
78
  )
72
- |our[ ]email[ ]server[ ]thinks[ ]this[ ]email[ ]is[ ]spam
73
- |our[ ]filters[ ]rate[ ]at[ ]and[ ]above[ ].+[ ]percent[ ]probability[ ]of[ ]being[ ]spam
74
- |our[ ]system[ ]has[ ]detected[ ]that[ ]this[ ]message[ ]is
75
79
  |probable[ ]spam
80
+ |REJECT[ ]bulk[.]advertising
81
+ |Reject,.+[ ][-][ ]SPAM[.][ ]
76
82
  |rejected(?:
77
83
  :[ ]spamassassin[ ]score[ ]
78
84
  |[ ]by[ ].+[ ][(]spam[)]
@@ -101,13 +107,24 @@ module Sisimai
101
107
  |spambouncer[ ]identified[ ]spam # SpamBouncer identified SPAM
102
108
  |spamming[ ]not[ ]allowed
103
109
  |Too[ ]much[ ]spam[.] # Earthlink
104
- |the[ ]message[ ]was[ ]rejected[ ]due[ ]to[ ]classification[ ]as[ ]bulk[ ]mail
110
+ |the[ ]message[ ](?:
111
+ has[ ]been[ ]rejected[ ]by[ ]spam[ ]filtering[ ]engine
112
+ |was[ ]rejected[ ]due[ ]to[ ]classification[ ]as[ ]bulk[ ]mail
113
+ )
105
114
  |The[ ]content[ ]of[ ]this[ ]message[ ]looked[ ]like[ ]spam # SendGrid
115
+ |This[ ](?:e-mail|mail)[ ](?:
116
+ cannot[ ]be[ ]forwarded[ ]because[ ]it[ ]was[ ]detected[ ]as[ ]spam
117
+ |is[ ]classified[ ]as[ ]spam[ ]and[ ]is[ ]rejected
118
+ )
106
119
  |this[ ]message[ ](?:
107
120
  appears[ ]to[ ]be[ ]spam
108
- |has[ ]been[ ]identified[ ]as[ ]spam
121
+ |has[ ]been[ ](?:
122
+ identified[ ]as[ ]spam
123
+ |scored[ ]as[ ]spam[ ]with[ ]a[ ]probability
124
+ )
109
125
  |scored[ ].+[ ]spam[ ]points
110
126
  |was[ ]classified[ ]as[ ]spam
127
+ |was[ ]rejected[ ]by[ ]Recurrent[ ]Pattern[ ]Detection[ ]System
111
128
  )
112
129
  |transaction[ ]failed[ ]spam[ ]message[ ]not[ ]queued # SendGrid
113
130
  |we[ ]dont[ ]accept[ ]spam
@@ -117,12 +134,12 @@ module Sisimai
117
134
  appears[ ]similar[ ]to[ ]spam[ ]we[ ]have[ ]received[ ]before
118
135
  |breaches[ ]local[ ]URIBL[ ]policy
119
136
  |had[ ]spam[-]like[ ]
120
- |is[ ]considered[ ]spam
121
- |is[ ]probably[ ]spam
137
+ |is[ ](?:considered|probably)[ ]spam
122
138
  |was[ ]detected[ ]as[ ]spam
123
139
  )
124
140
  |message[ ](?:
125
- has[ ]been[ ](?:
141
+ as[ ]spam[ ]and[ ]has[ ]prevented[ ]delivery
142
+ |has[ ]been[ ](?:
126
143
  temporarily[ ]blocked[ ]by[ ]our[ ]filter
127
144
  |rejected[ ]because[ ]it[ ]appears[ ]to[ ]be[ ]SPAM
128
145
  )