sisimai 4.22.4-java → 4.22.5-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 (115) hide show
  1. checksums.yaml +4 -4
  2. data/ChangeLog.md +13 -0
  3. data/README-JA.md +2 -2
  4. data/README.md +2 -2
  5. data/lib/sisimai.rb +2 -2
  6. data/lib/sisimai/arf.rb +1 -1
  7. data/lib/sisimai/bite/email.rb +11 -0
  8. data/lib/sisimai/bite/email/amazonses.rb +1 -1
  9. data/lib/sisimai/bite/email/ezweb.rb +4 -2
  10. data/lib/sisimai/bite/email/google.rb +3 -3
  11. data/lib/sisimai/bite/email/gsuite.rb +2 -2
  12. data/lib/sisimai/bite/email/interscanmss.rb +1 -1
  13. data/lib/sisimai/bite/email/kddi.rb +1 -0
  14. data/lib/sisimai/bite/email/mcafee.rb +1 -1
  15. data/lib/sisimai/bite/email/opensmtpd.rb +4 -4
  16. data/lib/sisimai/bite/email/outlook.rb +1 -1
  17. data/lib/sisimai/bite/email/x1.rb +1 -1
  18. data/lib/sisimai/bite/email/x3.rb +2 -2
  19. data/lib/sisimai/bite/json/amazonses.rb +1 -1
  20. data/lib/sisimai/data/json.rb +1 -1
  21. data/lib/sisimai/message/email.rb +8 -22
  22. data/lib/sisimai/order/email.rb +9 -27
  23. data/lib/sisimai/reason/contenterror.rb +10 -16
  24. data/lib/sisimai/reason/exceedlimit.rb +2 -2
  25. data/lib/sisimai/reason/expired.rb +17 -19
  26. data/lib/sisimai/reason/hasmoved.rb +2 -2
  27. data/lib/sisimai/reason/hostunknown.rb +17 -24
  28. data/lib/sisimai/reason/mailboxfull.rb +47 -66
  29. data/lib/sisimai/reason/mesgtoobig.rb +15 -20
  30. data/lib/sisimai/reason/networkerror.rb +18 -23
  31. data/lib/sisimai/reason/norelaying.rb +15 -21
  32. data/lib/sisimai/reason/notaccept.rb +5 -6
  33. data/lib/sisimai/reason/policyviolation.rb +19 -22
  34. data/lib/sisimai/reason/rejected.rb +46 -51
  35. data/lib/sisimai/reason/suspend.rb +16 -23
  36. data/lib/sisimai/reason/systemerror.rb +20 -29
  37. data/lib/sisimai/reason/systemfull.rb +5 -6
  38. data/lib/sisimai/reason/toomanyconn.rb +16 -21
  39. data/lib/sisimai/reason/vacation.rb +7 -9
  40. data/lib/sisimai/reason/virusdetected.rb +7 -8
  41. data/lib/sisimai/version.rb +1 -1
  42. data/set-of-emails/maildir/bsd/arf-14.eml +58 -319
  43. data/set-of-emails/maildir/bsd/email-postfix-32.eml +72 -0
  44. data/set-of-emails/maildir/bsd/rfc3834-01.eml +22 -36
  45. metadata +3 -72
  46. data/set-of-emails/maildir/bsd/README.md +0 -327
  47. data/set-of-emails/maildir/bsd/arf-15.eml +0 -66
  48. data/set-of-emails/maildir/bsd/email-exchange2007-02.eml +0 -252
  49. data/set-of-emails/maildir/bsd/email-exchange2007-03.eml +0 -1178
  50. data/set-of-emails/maildir/bsd/email-exim-09.eml +0 -169
  51. data/set-of-emails/maildir/bsd/email-exim-10.eml +0 -718
  52. data/set-of-emails/maildir/bsd/email-exim-11.eml +0 -718
  53. data/set-of-emails/maildir/bsd/email-exim-12.eml +0 -75
  54. data/set-of-emails/maildir/bsd/email-exim-13.eml +0 -145
  55. data/set-of-emails/maildir/bsd/email-exim-14.eml +0 -32
  56. data/set-of-emails/maildir/bsd/email-exim-15.eml +0 -49
  57. data/set-of-emails/maildir/bsd/email-exim-16.eml +0 -98
  58. data/set-of-emails/maildir/bsd/email-exim-17.eml +0 -50
  59. data/set-of-emails/maildir/bsd/email-exim-18.eml +0 -96
  60. data/set-of-emails/maildir/bsd/email-exim-19.eml +0 -52
  61. data/set-of-emails/maildir/bsd/email-exim-20.eml +0 -159
  62. data/set-of-emails/maildir/bsd/email-exim-21.eml +0 -150
  63. data/set-of-emails/maildir/bsd/email-exim-22.eml +0 -50
  64. data/set-of-emails/maildir/bsd/email-exim-23.eml +0 -57
  65. data/set-of-emails/maildir/bsd/email-exim-24.eml +0 -107
  66. data/set-of-emails/maildir/bsd/email-exim-25.eml +0 -18
  67. data/set-of-emails/maildir/bsd/email-exim-26.eml +0 -111
  68. data/set-of-emails/maildir/bsd/email-exim-27.eml +0 -120
  69. data/set-of-emails/maildir/bsd/email-exim-28.eml +0 -148
  70. data/set-of-emails/maildir/bsd/email-google-12.eml +0 -76
  71. data/set-of-emails/maildir/bsd/email-google-13.eml +0 -79
  72. data/set-of-emails/maildir/bsd/email-imailserver-05.eml +0 -92
  73. data/set-of-emails/maildir/bsd/email-interscanmss-02.eml +0 -259
  74. data/set-of-emails/maildir/bsd/email-notes-04.eml +0 -181
  75. data/set-of-emails/maildir/bsd/email-postfix-18.eml +0 -121
  76. data/set-of-emails/maildir/bsd/email-postfix-19.eml +0 -105
  77. data/set-of-emails/maildir/bsd/email-postfix-20.eml +0 -231
  78. data/set-of-emails/maildir/bsd/email-postfix-22.eml +0 -73
  79. data/set-of-emails/maildir/bsd/email-postfix-23.eml +0 -75
  80. data/set-of-emails/maildir/bsd/email-postfix-24.eml +0 -73
  81. data/set-of-emails/maildir/bsd/email-postfix-25.eml +0 -73
  82. data/set-of-emails/maildir/bsd/email-postfix-26.eml +0 -73
  83. data/set-of-emails/maildir/bsd/email-postfix-27.eml +0 -66
  84. data/set-of-emails/maildir/bsd/email-qmail-09.eml +0 -103
  85. data/set-of-emails/maildir/bsd/email-qmail-10.eml +0 -32
  86. data/set-of-emails/maildir/bsd/email-qmail-11.eml +0 -73
  87. data/set-of-emails/maildir/bsd/email-qmail-12.eml +0 -24
  88. data/set-of-emails/maildir/bsd/email-sendmail-23.eml +0 -137
  89. data/set-of-emails/maildir/bsd/email-x2-05.eml +0 -98
  90. data/set-of-emails/maildir/bsd/email-x4-01.eml +0 -92
  91. data/set-of-emails/maildir/bsd/email-x4-02.eml +0 -112
  92. data/set-of-emails/maildir/bsd/email-x4-03.eml +0 -245
  93. data/set-of-emails/maildir/bsd/email-x4-04.eml +0 -81
  94. data/set-of-emails/maildir/bsd/email-x4-05.eml +0 -121
  95. data/set-of-emails/maildir/bsd/email-x4-06.eml +0 -32
  96. data/set-of-emails/maildir/bsd/rfc3464-10.eml +0 -467
  97. data/set-of-emails/maildir/bsd/rfc3464-11.eml +0 -1171
  98. data/set-of-emails/maildir/bsd/rfc3464-12.eml +0 -101
  99. data/set-of-emails/maildir/bsd/rfc3464-13.eml +0 -131
  100. data/set-of-emails/maildir/bsd/rfc3464-14.eml +0 -121
  101. data/set-of-emails/maildir/bsd/rfc3464-15.eml +0 -144
  102. data/set-of-emails/maildir/bsd/rfc3464-16.eml +0 -36
  103. data/set-of-emails/maildir/bsd/rfc3464-17.eml +0 -109
  104. data/set-of-emails/maildir/bsd/rfc3464-18.eml +0 -149
  105. data/set-of-emails/maildir/bsd/rfc3464-19.eml +0 -65
  106. data/set-of-emails/maildir/bsd/rfc3464-20.eml +0 -145
  107. data/set-of-emails/maildir/bsd/rfc3464-21.eml +0 -146
  108. data/set-of-emails/maildir/bsd/rfc3464-24.eml +0 -27
  109. data/set-of-emails/maildir/bsd/rfc3464-30.eml +0 -1173
  110. data/set-of-emails/maildir/bsd/rfc3464-31.eml +0 -141
  111. data/set-of-emails/maildir/bsd/rfc3464-32.eml +0 -158
  112. data/set-of-emails/maildir/bsd/rfc3834-02.eml +0 -51
  113. data/set-of-emails/maildir/bsd/rfc3834-03.eml +0 -33
  114. data/set-of-emails/maildir/bsd/rfc3834-04.eml +0 -29
  115. data/set-of-emails/maildir/bsd/rfc3834-05.eml +0 -29
@@ -19,22 +19,16 @@ module Sisimai
19
19
  # true: Matched
20
20
  def match(argv1)
21
21
  return nil unless argv1
22
- regex = %r{(?>
23
- improper[ ]use[ ]of[ ]8-bit[ ]data[ ]in[ ]message[ ]header
24
- |message[ ](?:
25
- header[ ]size,[ ]or[ ]recipient[ ]list,[ ]exceeds[ ]policy[ ]limit
26
- |mime[ ]complexity[ ]exceeds[ ]the[ ]policy[ ]maximum
27
- )
28
- |routing[ ]loop[ ]detected[ ][-][-][ ]too[ ]many[ ]received:[ ]headers
29
- |this[ ]message[ ]contains?[ ](?:
30
- invalid[ ]mime[ ]headers
31
- |improperly[-]formatted[ ]binary[ ]content
32
- |text[ ]that[ ]uses[ ]unnecessary[ ]base64[ ]encoding
33
- )
34
- )
35
- }x
36
-
37
- return true if argv1 =~ regex
22
+ index = [
23
+ 'improper use of 8-bit data in message header',
24
+ 'message header size, or recipient list, exceeds policy limit',
25
+ 'message mime complexity exceeds the policy maximum',
26
+ 'routing loop detected -- too many received: headers',
27
+ 'this message contain invalid mime headers',
28
+ 'this message contain improperly-formatted binary content',
29
+ 'this message contain text that uses unnecessary base64 encoding',
30
+ ]
31
+ return true if index.find { |a| argv1.include?(a) }
38
32
  return false
39
33
  end
40
34
 
@@ -18,9 +18,9 @@ module Sisimai
18
18
  # true: Matched
19
19
  def match(argv1)
20
20
  return nil unless argv1
21
- regex = %r/message too large/
21
+ index = ['message too large']
22
22
 
23
- return true if argv1 =~ regex
23
+ return true if index.find { |a| argv1.include?(a) }
24
24
  return false
25
25
  end
26
26
 
@@ -18,26 +18,24 @@ module Sisimai
18
18
  # true: Matched
19
19
  def match(argv1)
20
20
  return nil unless argv1
21
- regex = %r{(?>
22
- connection[ ]timed[ ]out
23
- |could[ ]not[ ]find[ ]a[ ]gateway[ ]for
24
- |delivery[ ]time[ ]expired
25
- |failed[ ]to[ ]deliver[ ]to[ ]domain[ ].+[ ]after[ ]\d+[ ]tries
26
- |giving[ ]up[ ]on
27
- |it[ ]has[ ]not[ ]been[ ]collected[ ]after
28
- |message[ ](?:
29
- expired[ ]after[ ]sitting[ ]in[ ]queue[ ]for
30
- |timed[ ]out
31
- )
32
- |retry[ ]time[ ]not[ ]reached[ ]for[ ]any[ ]host[ ]after[ ]a[ ]long[ ]failure[ ]period
33
- |server[ ]did[ ]not[ ]respond
34
- |this[ ]message[ ]has[ ]been[ ]in[ ]the[ ]queue[ ]too[ ]long
35
- |was[ ]not[ ]reachable[ ]within[ ]the[ ]allowed[ ]queue[ ]period
36
- |your[ ]message[ ]could[ ]not[ ]be[ ]delivered[ ]for[ ]more[ ]than
37
- )
38
- }x
21
+ index = [
22
+ 'connection timed out',
23
+ 'could not find a gateway for',
24
+ 'delivery time expired',
25
+ 'failed to deliver to domain ',
26
+ 'giving up on',
27
+ 'has been delayed',
28
+ 'it has not been collected after',
29
+ 'message expired after sitting in queue for',
30
+ 'message timed out',
31
+ 'retry time not reached for any host after a long failure period',
32
+ 'server did not respond',
33
+ 'this message has been in the queue too long',
34
+ 'was not reachable within the allowed queue period',
35
+ 'your message could not be delivered for more than',
36
+ ]
39
37
 
40
- return true if argv1 =~ regex
38
+ return true if index.find { |a| argv1.include?(a) }
41
39
  return false
42
40
  end
43
41
 
@@ -18,9 +18,9 @@ module Sisimai
18
18
  # true: Matched
19
19
  def match(argv1)
20
20
  return nil unless argv1
21
- regex = %r/address[ ].+ has been replaced by /
21
+ index = [' has been replaced by ']
22
22
 
23
- return true if argv1 =~ regex
23
+ return true if index.find { |a| argv1.include?(a) }
24
24
  return false
25
25
  end
26
26
 
@@ -18,31 +18,24 @@ module Sisimai
18
18
  # @since v4.0.0
19
19
  def match(argv1)
20
20
  return nil unless argv1
21
- regex = %r{(?>
22
- domain[ ](?:
23
- does[ ]not[ ]exist
24
- |is[ ]not[ ]reachable
25
- |must[ ]exist
26
- )
27
- |host[ ](?:
28
- or[ ]domain[ ]name[ ]not[ ]found
29
- |unknown
30
- |unreachable
31
- )
32
- |mail[ ]domain[ ]mentioned[ ]in[ ]email[ ]address[ ]is[ ]unknown
33
- |name[ ]or[ ]service[ ]not[ ]known
34
- |no[ ]such[ ]domain
35
- |recipient[ ](?:
36
- address[ ]rejected:[ ]unknown[ ]domain[ ]name
37
- |domain[ ]must[ ]exist
38
- )
39
- |the[ ]account[ ]or[ ]domain[ ]may[ ]not[ ]exist
40
- |unknown[ ]host
41
- |unrouteable[ ]address
42
- )
43
- }x
21
+ index = [
22
+ 'domain does not exist',
23
+ 'domain is not reachable',
24
+ 'domain must exist',
25
+ 'host or domain name not found',
26
+ 'host unknown',
27
+ 'host unreachable',
28
+ 'mail domain mentioned in email address is unknown',
29
+ 'name or service not known',
30
+ 'no such domain',
31
+ 'recipient address rejected: unknown domain name',
32
+ 'recipient domain must exist',
33
+ 'the account or domain may not exist',
34
+ 'unknown host',
35
+ 'unrouteable address',
36
+ ]
44
37
 
45
- return true if argv1 =~ regex
38
+ return true if index.find { |a| argv1.include?(a) }
46
39
  return false
47
40
  end
48
41
 
@@ -18,73 +18,54 @@ module Sisimai
18
18
  # true: Matched
19
19
  def match(argv1)
20
20
  return nil unless argv1
21
- regex = %r{(?>
22
- account[ ]disabled[ ]temporarly[ ]for[ ]exceeding[ ]receiving[ ]limits
23
- |account[ ]is[ ](?:
24
- exceeding[ ]their[ ]quota
25
- |over[ ]quota
26
- |temporarily[ ]over[ ]quota
27
- )
28
- |boite[ ]du[ ]destinataire[ ]pleine.+[a-z]{3}.+417
29
- |delivery[ ]failed:[ ]over[ ]quota
30
- |disc[ ]quota[ ]exceeded
31
- |does[ ]not[ ]have[ ]enough[ ]space
32
- |exceeded[ ]storage[ ]allocation
33
- |exceeding[ ]its[ ]mailbox[ ]quota
34
- |full[ ]mailbox
35
- |is[ ]over[ ](?:
36
- disk[ ]quota
37
- |quota[ ]temporarily
38
- )
39
- |mail[ ](?:
40
- file[ ]size[ ]exceeds[ ]the[ ]maximum[ ]size[ ]allowed[ ]for[ ]mail[ ]delivery
41
- |quota[ ]exceeded
42
- )
43
- |mailbox[ ](?:
44
- exceeded[ ]the[ ]local[ ]limit
45
- |full
46
- |has[ ]exceeded[ ]its[ ]disk[ ]space[ ]limit
47
- |is[ ]full
48
- |over[ ]quota
49
- |quota[ ]usage[ ]exceeded
50
- |size[ ]limit[ ]exceeded
51
- )
52
- |maildir[ ](?:
53
- delivery[ ]failed:[ ](?:user|domain)disk[ ]quota[ ]?.*[ ]exceeded
54
- |over[ ]quota
55
- )
56
- |mailfolder[ ]is[ ]full
57
- |not[ ]enough[ ]storage[ ]space[ ]in
58
- |over[ ]the[ ]allowed[ ]quota
59
- |quota[ ](?:
60
- exceeded
61
- |violation[ ]for
62
- )
63
- |recipient[ ](?:
64
- reached[ ]disk[ ]quota
65
- |rejected:[ ]mailbox[ ]would[ ]exceed[ ]maximum[ ]allowed[ ]storage
66
- )
67
- |the[ ](?:
68
- recipient[ ]mailbox[ ]has[ ]exceeded[ ]its[ ]disk[ ]space[ ]limit
69
- |user[']s[ ]space[ ]has[ ]been[ ]used[ ]up
70
- |user[ ]you[ ]are[ ]trying[ ]to[ ]reach[ ]is[ ]over[ ]quota
71
- )
72
- |too[ ]much[ ]mail[ ]data # @docomo.ne.jp
73
- |user[ ](?:
74
- has[ ](?:
75
- exceeded[ ]quota,[ ]bouncing[ ]mail
76
- |too[ ]many[ ]messages[ ]on[ ]the[ ]server
77
- )
78
- |is[ ]over[ ](?:the[ ])?quota
79
- |over[ ]quota
80
- |over[ ]quota[.][ ][(][#]5[.]1[.]1[)] # qmail-toaster
81
- )
82
- |was[ ]automatically[ ]rejected:[ ]quota[ ]exceeded
83
- |would[ ]be[ ]over[ ]the[ ]allowed[ ]quota
84
- )
85
- }x
21
+ index = [
22
+ 'account disabled temporarly for exceeding receiving limits',
23
+ 'account is exceeding their quota',
24
+ 'account is over quota',
25
+ 'account is temporarily over quota',
26
+ 'boite du destinataire pleine',
27
+ 'delivery failed: over quota',
28
+ 'disc quota exceeded',
29
+ 'does not have enough space',
30
+ 'exceeded storage allocation',
31
+ 'exceeding its mailbox quota',
32
+ 'full mailbox',
33
+ 'is over disk quota',
34
+ 'is over quota temporarily',
35
+ 'mail file size exceeds the maximum size allowed for mail delivery',
36
+ 'mail quota exceeded',
37
+ 'mailbox exceeded the local limit',
38
+ 'mailbox full',
39
+ 'mailbox has exceeded its disk space limit',
40
+ 'mailbox is full',
41
+ 'mailbox over quota',
42
+ 'mailbox quota usage exceeded',
43
+ 'mailbox size limit exceeded',
44
+ 'maildir over quota',
45
+ 'maildir delivery failed: userdisk quota ',
46
+ 'maildir delivery failed: domaindisk quota ',
47
+ 'mailfolder is full',
48
+ 'not enough storage space in',
49
+ 'over the allowed quota',
50
+ 'quota exceeded',
51
+ 'quota violation for',
52
+ 'recipient reached disk quota',
53
+ 'recipient rejected: mailbox would exceed maximum allowed storage',
54
+ 'the recipient mailbox has exceeded its disk space limit',
55
+ "the user's space has been used up",
56
+ 'the user you are trying to reach is over quota',
57
+ 'too much mail data', # @docomo.ne.jp
58
+ 'user has exceeded quota, bouncing mail',
59
+ 'user has too many messages on the server',
60
+ 'user is over quota',
61
+ 'user is over the quota',
62
+ 'user over quota',
63
+ 'user over quota. (#5.1.1)', # qmail-toaster
64
+ 'was automatically rejected: quota exceeded',
65
+ 'would be over the allowed quota',
66
+ ]
86
67
 
87
- return true if argv1 =~ regex
68
+ return true if index.find { |a| argv1.include?(a) }
88
69
  return false
89
70
  end
90
71
 
@@ -17,27 +17,22 @@ module Sisimai
17
17
  # true: Matched
18
18
  def match(argv1)
19
19
  return nil unless argv1
20
- regex = %r{(?>
21
- exceeded[ ]maximum[ ]inbound[ ]message[ ]size
22
- |line[ ]limit[ ]exceeded
23
- |max[ ]message[ ]size[ ]exceeded
24
- |message[ ](?:
25
- file[ ]too[ ]big
26
- |length[ ]exceeds[ ]administrative[ ]limit
27
- |size[ ]exceeds[ ](?:
28
- fixed[ ]limit
29
- |fixed[ ]maximum[ ]message[ ]size
30
- |maximum[ ]value
31
- )
32
- |too[ ]big
33
- |too[ ]large[ ]for[ ]this[ ].+
34
- )
35
- |size[ ]limit
36
- |taille[ ]limite[ ]du[ ]message[ ]atteinte.+[a-z]{3}.+514
37
- )
38
- }x
20
+ index = [
21
+ 'exceeded maximum inbound message size',
22
+ 'line limit exceeded',
23
+ 'max message size exceeded',
24
+ 'message file too big',
25
+ 'message length exceeds administrative limit',
26
+ 'message size exceeds fixed limit',
27
+ 'message size exceeds fixed maximum message size',
28
+ 'message size exceeds maximum value',
29
+ 'message too big',
30
+ 'message too large for this ',
31
+ 'size limit',
32
+ 'taille limite du message atteinte',
33
+ ]
39
34
 
40
- return true if argv1 =~ regex
35
+ return true if index.find { |a| argv1.include?(a) }
41
36
  return false
42
37
  end
43
38
 
@@ -22,30 +22,25 @@ module Sisimai
22
22
  # true: Matched
23
23
  def match(argv1)
24
24
  return nil unless argv1
25
- regex = %r{(?>
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
- |mail[ ]forwarding[ ]loop[ ]for[ ]
31
- |malformed[ ]name[ ]server[ ]reply
32
- |maximum[ ]forwarding[ ]loop[ ]count[ ]exceeded
33
- |message[ ](?:
34
- looping
35
- |probably[ ]in[ ]a[ ]routing[ ]loop
36
- )
37
- |name[ ]service[ ]error[ ]for[ ].+[ ](?:
38
- malformed[ ]or[ ]unexpected[ ]name[ ]server[ ]reply
39
- |host[ ]not[ ]found,[ ]try[ ]again
40
- )
41
- |no[ ]route[ ]to[ ]host
42
- |too[ ]many[ ]hops
43
- |unable[ ]to[ ]resolve[ ]route[ ].+[ ]
44
- |unrouteable[ ]mail[ ]domain
45
- )
46
- }x
25
+ index = [
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
+ ]
47
42
 
48
- return true if argv1 =~ regex
43
+ return true if index.find { |a| argv1.include?(a) }
49
44
  return false
50
45
  end
51
46
 
@@ -22,28 +22,22 @@ module Sisimai
22
22
  # true: Matched
23
23
  def match(argv1)
24
24
  return nil unless argv1
25
- regex = %r{(?>
26
- as[ ]a[ ]relay
27
- |insecure[ ]mail[ ]relay
28
- |mail[ ]server[ ]requires[ ]authentication[ ]when[ ]attempting[ ]to[ ]
29
- send[ ]to[ ]a[ ]non-local[ ]e-mail[ ]address # MailEnable
30
- |not[ ](?:
31
- allowed[ ]to[ ]relay[ ]through[ ]this[ ]machine
32
- |an[ ]open[ ]relay,[ ]so[ ]get[ ]lost
33
- )
34
- |relay[ ](?:
35
- access[ ]denied
36
- |denied
37
- |not[ ]permitted
38
- )
39
- |relaying[ ]denied # Sendmail
40
- |that[ ]domain[ ]isn[']t[ ]in[ ]my[ ]list[ ]of[ ]allowed[ ]rcpthost
41
- |this[ ]system[ ]is[ ]not[ ]configured[ ]to[ ]relay[ ]mail
42
- |unable[ ]to[ ]relay[ ]for
43
- )
44
- }x
25
+ index = [
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
+ ]
45
39
 
46
- return true if argv1 =~ regex
40
+ return true if index.find { |a| argv1.include?(a) }
47
41
  return false
48
42
  end
49
43
 
@@ -22,13 +22,12 @@ module Sisimai
22
22
  return nil unless argv1
23
23
 
24
24
  # Destination mail server does not accept any message
25
- regex = %r{(?:
26
- name[ ]server:[ ][.]:[ ]host[ ]not[ ]found # Sendmail
27
- |55[46][ ]smtp[ ]protocol[ ]returned[ ]a[ ]permanent[ ]error
28
- )
29
- }x
25
+ index = [
26
+ 'name server: .: host not found', # Sendmail
27
+ 'smtp protocol returned a permanent error',
28
+ ]
30
29
 
31
- return true if argv1 =~ regex
30
+ return true if index.find { |a| argv1.include?(a) }
32
31
  return false
33
32
  end
34
33
 
@@ -26,29 +26,26 @@ module Sisimai
26
26
  # @since 4.22.0
27
27
  def match(argv1)
28
28
  return nil unless argv1
29
- regex = %r{(?>
30
- because[ ]the[ ]recipient[ ]is[ ]not[ ]accepting[ ]mail[ ]with[ ](?:attachments|embedded[ ]images) # AOL Phoenix
31
- |closed[ ]mailing[ ]list
32
- |denied[ ]by[ ]policy
33
- |email[ ](?:
34
- not[ ]accepted[ ]for[ ]policy[ ]reasons
35
- # http://kb.mimecast.com/Mimecast_Knowledge_Base/Administration_Console/Monitoring/Mimecast_SMTP_Error_Codes#554
36
- |rejected[ ]due[ ]to[ ]security[ ]policies
37
- )
38
- |header[ ](?:are[ ]not[ ]accepted|error)
39
- |mail[ ]from[ ].+[ ]rejected[ ]for[ ]policy[ ]reasons
40
- |message[ ](?:
41
- given[ ]low[ ]priority
42
- |not[ ]accepted[ ]for[ ]policy[ ]reasons
43
- )
44
- |messages[ ]with[ ]multiple[ ]addresses
45
- |you[ ]have[ ]exceeded[ ]the[ ]the[ ]allowable[ ]number[ ]of[ ]posts[ ]without[ ]solving[ ]a[ ]captcha
46
- |protocol[ ]violation
47
- |the[ ]email[ ]address[ ]used[ ]to[ ]send[ ]your[ ]message[ ]is[ ]not[ ]subscribed[ ]to[ ]this[ ]group
48
- )
49
- }x
29
+ index = [
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
+ ]
50
47
 
51
- return true if argv1 =~ regex
48
+ return true if index.find { |a| argv1.include?(a) }
52
49
  return false
53
50
  end
54
51