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.

Files changed (155) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +3 -2
  3. data/ANALYTICAL-PRECISION +16 -25
  4. data/ChangeLog.md +41 -0
  5. data/Developers.mk +2 -2
  6. data/README-JA.md +13 -13
  7. data/README.md +13 -13
  8. data/lib/sisimai.rb +3 -7
  9. data/lib/sisimai/address.rb +25 -41
  10. data/lib/sisimai/arf.rb +58 -59
  11. data/lib/sisimai/bite.rb +0 -1
  12. data/lib/sisimai/bite/email.rb +7 -7
  13. data/lib/sisimai/bite/email/activehunter.rb +4 -3
  14. data/lib/sisimai/bite/email/amavis.rb +133 -0
  15. data/lib/sisimai/bite/email/amazonses.rb +53 -87
  16. data/lib/sisimai/bite/email/amazonworkmail.rb +51 -57
  17. data/lib/sisimai/bite/email/aol.rb +50 -76
  18. data/lib/sisimai/bite/email/apachejames.rb +2 -2
  19. data/lib/sisimai/bite/email/bigfoot.rb +47 -74
  20. data/lib/sisimai/bite/email/biglobe.rb +8 -9
  21. data/lib/sisimai/bite/email/courier.rb +56 -101
  22. data/lib/sisimai/bite/email/domino.rb +7 -8
  23. data/lib/sisimai/bite/email/einsundeins.rb +4 -5
  24. data/lib/sisimai/bite/email/exchange2003.rb +21 -22
  25. data/lib/sisimai/bite/email/exchange2007.rb +26 -28
  26. data/lib/sisimai/bite/email/exim.rb +48 -47
  27. data/lib/sisimai/bite/email/ezweb.rb +24 -36
  28. data/lib/sisimai/bite/email/facebook.rb +54 -79
  29. data/lib/sisimai/bite/email/fml.rb +10 -10
  30. data/lib/sisimai/bite/email/gmx.rb +6 -6
  31. data/lib/sisimai/bite/email/google.rb +12 -13
  32. data/lib/sisimai/bite/email/gsuite.rb +80 -108
  33. data/lib/sisimai/bite/email/imailserver.rb +16 -16
  34. data/lib/sisimai/bite/email/interscanmss.rb +4 -6
  35. data/lib/sisimai/bite/email/kddi.rb +9 -11
  36. data/lib/sisimai/bite/email/mailfoundry.rb +2 -2
  37. data/lib/sisimai/bite/email/mailmarshalsmtp.rb +2 -2
  38. data/lib/sisimai/bite/email/mailru.rb +12 -13
  39. data/lib/sisimai/bite/email/mcafee.rb +31 -25
  40. data/lib/sisimai/bite/email/messagelabs.rb +48 -87
  41. data/lib/sisimai/bite/email/messagingserver.rb +9 -10
  42. data/lib/sisimai/bite/email/mfilter.rb +16 -16
  43. data/lib/sisimai/bite/email/mxlogic.rb +11 -11
  44. data/lib/sisimai/bite/email/notes.rb +5 -6
  45. data/lib/sisimai/bite/email/office365.rb +25 -42
  46. data/lib/sisimai/bite/email/opensmtpd.rb +8 -8
  47. data/lib/sisimai/bite/email/outlook.rb +49 -67
  48. data/lib/sisimai/bite/email/postfix.rb +78 -112
  49. data/lib/sisimai/bite/email/qmail.rb +23 -23
  50. data/lib/sisimai/bite/email/receivingses.rb +53 -86
  51. data/lib/sisimai/bite/email/sendgrid.rb +65 -84
  52. data/lib/sisimai/bite/email/sendmail.rb +89 -117
  53. data/lib/sisimai/bite/email/surfcontrol.rb +15 -18
  54. data/lib/sisimai/bite/email/userdefined.rb +1 -1
  55. data/lib/sisimai/bite/email/v5sendmail.rb +3 -4
  56. data/lib/sisimai/bite/email/verizon.rb +7 -8
  57. data/lib/sisimai/bite/email/x1.rb +2 -2
  58. data/lib/sisimai/bite/email/x2.rb +2 -2
  59. data/lib/sisimai/bite/email/x3.rb +3 -3
  60. data/lib/sisimai/bite/email/x4.rb +22 -22
  61. data/lib/sisimai/bite/email/x5.rb +40 -49
  62. data/lib/sisimai/bite/email/yahoo.rb +3 -3
  63. data/lib/sisimai/bite/email/yandex.rb +54 -82
  64. data/lib/sisimai/bite/email/zoho.rb +6 -6
  65. data/lib/sisimai/bite/json/amazonses.rb +20 -20
  66. data/lib/sisimai/bite/json/sendgrid.rb +2 -2
  67. data/lib/sisimai/data.rb +27 -40
  68. data/lib/sisimai/datetime.rb +146 -162
  69. data/lib/sisimai/mda.rb +30 -31
  70. data/lib/sisimai/message/email.rb +83 -123
  71. data/lib/sisimai/message/json.rb +2 -4
  72. data/lib/sisimai/mime.rb +31 -34
  73. data/lib/sisimai/order/email.rb +23 -22
  74. data/lib/sisimai/reason.rb +61 -61
  75. data/lib/sisimai/reason/blocked.rb +139 -135
  76. data/lib/sisimai/reason/contenterror.rb +11 -10
  77. data/lib/sisimai/reason/exceedlimit.rb +4 -4
  78. data/lib/sisimai/reason/expired.rb +20 -20
  79. data/lib/sisimai/reason/filtered.rb +19 -18
  80. data/lib/sisimai/reason/hasmoved.rb +3 -3
  81. data/lib/sisimai/reason/hostunknown.rb +19 -19
  82. data/lib/sisimai/reason/mailboxfull.rb +49 -49
  83. data/lib/sisimai/reason/mailererror.rb +16 -16
  84. data/lib/sisimai/reason/mesgtoobig.rb +17 -17
  85. data/lib/sisimai/reason/networkerror.rb +19 -19
  86. data/lib/sisimai/reason/norelaying.rb +16 -16
  87. data/lib/sisimai/reason/notaccept.rb +9 -10
  88. data/lib/sisimai/reason/onhold.rb +1 -1
  89. data/lib/sisimai/reason/policyviolation.rb +21 -20
  90. data/lib/sisimai/reason/rejected.rb +53 -53
  91. data/lib/sisimai/reason/securityerror.rb +29 -29
  92. data/lib/sisimai/reason/spamdetected.rb +127 -127
  93. data/lib/sisimai/reason/suspend.rb +17 -17
  94. data/lib/sisimai/reason/systemerror.rb +22 -21
  95. data/lib/sisimai/reason/systemfull.rb +6 -6
  96. data/lib/sisimai/reason/toomanyconn.rb +19 -18
  97. data/lib/sisimai/reason/userunknown.rb +122 -121
  98. data/lib/sisimai/reason/vacation.rb +8 -8
  99. data/lib/sisimai/reason/virusdetected.rb +8 -8
  100. data/lib/sisimai/rfc1894.rb +142 -0
  101. data/lib/sisimai/rfc3464.rb +70 -70
  102. data/lib/sisimai/rfc3834.rb +15 -15
  103. data/lib/sisimai/rfc5322.rb +20 -36
  104. data/lib/sisimai/rhost.rb +1 -0
  105. data/lib/sisimai/rhost/exchangeonline.rb +31 -33
  106. data/lib/sisimai/rhost/franceptt.rb +23 -23
  107. data/lib/sisimai/rhost/godaddy.rb +28 -28
  108. data/lib/sisimai/rhost/googleapps.rb +39 -41
  109. data/lib/sisimai/rhost/kddi.rb +3 -3
  110. data/lib/sisimai/rhost/tencentqq.rb +51 -0
  111. data/lib/sisimai/smtp/error.rb +14 -21
  112. data/lib/sisimai/smtp/reply.rb +14 -13
  113. data/lib/sisimai/smtp/status.rb +178 -179
  114. data/lib/sisimai/string.rb +13 -12
  115. data/lib/sisimai/version.rb +1 -1
  116. data/set-of-emails/README.md +1 -5
  117. data/set-of-emails/maildir/bsd/arf-23.eml +49 -0
  118. data/set-of-emails/maildir/bsd/email-amavis-01.eml +78 -0
  119. data/set-of-emails/maildir/bsd/email-amavis-02.eml +78 -0
  120. data/set-of-emails/maildir/bsd/email-exchange2007-04.eml +146 -0
  121. data/set-of-emails/maildir/bsd/email-exim-60.eml +94 -0
  122. data/set-of-emails/maildir/bsd/email-ezweb-08.eml +49 -0
  123. data/set-of-emails/maildir/bsd/email-google-19.eml +67 -0
  124. data/set-of-emails/maildir/bsd/email-mcafee-05.eml +74 -0
  125. data/set-of-emails/maildir/bsd/email-messagingserver-12.eml +99 -0
  126. data/set-of-emails/maildir/bsd/email-postfix-46.eml +81 -0
  127. data/set-of-emails/maildir/bsd/email-postfix-47.eml +79 -0
  128. data/set-of-emails/maildir/bsd/email-postfix-48.eml +79 -0
  129. data/set-of-emails/maildir/bsd/email-postfix-49.eml +141 -0
  130. data/set-of-emails/maildir/bsd/email-postfix-50.eml +143 -0
  131. data/set-of-emails/maildir/bsd/email-postfix-51.eml +73 -0
  132. data/set-of-emails/maildir/bsd/email-postfix-52.eml +79 -0
  133. data/set-of-emails/maildir/bsd/email-postfix-53.eml +76 -0
  134. data/set-of-emails/maildir/bsd/email-postfix-54.eml +73 -0
  135. data/set-of-emails/maildir/bsd/email-postfix-55.eml +74 -0
  136. data/set-of-emails/maildir/bsd/email-postfix-56.eml +78 -0
  137. data/set-of-emails/maildir/bsd/email-qmail-10.eml +50 -0
  138. data/set-of-emails/maildir/bsd/email-x2-05.eml +38 -0
  139. data/set-of-emails/maildir/bsd/rhost-google-apps-02.eml +88 -0
  140. data/set-of-emails/maildir/bsd/rhost-tencentqq-01.eml +84 -0
  141. data/set-of-emails/maildir/bsd/rhost-tencentqq-02.eml +84 -0
  142. data/set-of-emails/maildir/bsd/rhost-tencentqq-03.eml +81 -0
  143. data/set-of-emails/maildir/dos/email-amavis-01.eml +78 -0
  144. data/set-of-emails/maildir/dos/email-apachejames-01.eml +1 -2
  145. data/set-of-emails/maildir/dos/email-messagelabs-01.eml +67 -50
  146. data/set-of-emails/maildir/dos/email-x4-01.eml +31 -76
  147. data/set-of-emails/maildir/dos/rhost-tencentqq-01.eml +84 -0
  148. data/set-of-emails/maildir/mac/email-amavis-01.eml +1 -4
  149. data/set-of-emails/maildir/mac/email-apachejames-01.eml +1 -9
  150. data/set-of-emails/maildir/mac/email-messagelabs-01.eml +1 -9
  151. data/set-of-emails/maildir/mac/email-x4-01.eml +1 -5
  152. data/set-of-emails/maildir/mac/rhost-tencentqq-01.eml +1 -4
  153. metadata +35 -4
  154. data/set-of-emails/logo/horizontalversions.png +0 -0
  155. data/set-of-emails/logo/icon.png +0 -0
@@ -10,6 +10,16 @@ module Sisimai
10
10
  module ContentError
11
11
  # Imported from p5-Sisimail/lib/Sisimai/Reason/ContentError.pm
12
12
  class << self
13
+ Index = [
14
+ 'improper use of 8-bit data in message header',
15
+ 'message header size, or recipient list, exceeds policy limit',
16
+ 'message mime complexity exceeds the policy maximum',
17
+ 'routing loop detected -- too many received: headers',
18
+ 'this message contain invalid mime headers',
19
+ 'this message contain improperly-formatted binary content',
20
+ 'this message contain text that uses unnecessary base64 encoding',
21
+ ]
22
+
13
23
  def text; return 'contenterror'; end
14
24
  def description; return 'Email rejected due to a header format of the email'; end
15
25
 
@@ -19,16 +29,7 @@ module Sisimai
19
29
  # true: Matched
20
30
  def match(argv1)
21
31
  return nil unless argv1
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.any? { |a| argv1.include?(a) }
32
+ return true if Index.any? { |a| argv1.include?(a) }
32
33
  return false
33
34
  end
34
35
 
@@ -9,6 +9,8 @@ module Sisimai
9
9
  module ExceedLimit
10
10
  # Imported from p5-Sisimail/lib/Sisimai/Reason/ExceedLimit.pm
11
11
  class << self
12
+ Index = ['message too large']
13
+
12
14
  def text; return 'exceedlimit'; end
13
15
  def description; return 'Email rejected due to an email exceeded the limit'; end
14
16
 
@@ -18,9 +20,7 @@ module Sisimai
18
20
  # true: Matched
19
21
  def match(argv1)
20
22
  return nil unless argv1
21
- index = ['message too large']
22
-
23
- return true if index.any? { |a| argv1.include?(a) }
23
+ return true if Index.any? { |a| argv1.include?(a) }
24
24
  return false
25
25
  end
26
26
 
@@ -36,7 +36,7 @@ module Sisimai
36
36
  # Delivery status code points exceedlimit.
37
37
  # Status: 5.2.3
38
38
  # Diagnostic-Code: SMTP; 552 5.2.3 Message size exceeds fixed maximum message size
39
- return true if Sisimai::SMTP::Status.name(argvs.deliverystatus) == 'exceedlimit'
39
+ return true if Sisimai::SMTP::Status.name(argvs.deliverystatus).to_s == 'exceedlimit'
40
40
 
41
41
  # Check the value of Diagnosic-Code: header with patterns
42
42
  return true if match(argvs.diagnosticcode.downcase)
@@ -9,6 +9,25 @@ module Sisimai
9
9
  module Expired
10
10
  # Imported from p5-Sisimail/lib/Sisimai/Reason/Expired.pm
11
11
  class << self
12
+ Index = [
13
+ 'connection timed out',
14
+ 'could not find a gateway for',
15
+ 'delivery time expired',
16
+ 'failed to deliver to domain ',
17
+ 'giving up on',
18
+ 'has been delayed',
19
+ 'it has not been collected after',
20
+ 'message expired after sitting in queue for',
21
+ 'message expired, connection refulsed',
22
+ 'message timed out',
23
+ 'retry time not reached for any host after a long failure period',
24
+ 'server did not respond',
25
+ 'this message has been in the queue too long',
26
+ 'unable to deliver message after multiple retries',
27
+ 'was not reachable within the allowed queue period',
28
+ 'your message could not be delivered for more than',
29
+ ]
30
+
12
31
  def text; return 'expired'; end
13
32
  def description; return 'Delivery time has expired due to a connection failure'; end
14
33
 
@@ -18,26 +37,7 @@ module Sisimai
18
37
  # true: Matched
19
38
  def match(argv1)
20
39
  return nil unless argv1
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 expired, connection refulsed',
31
- 'message timed out',
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
- 'unable to deliver message after multiple retries',
36
- 'was not reachable within the allowed queue period',
37
- 'your message could not be delivered for more than',
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
 
@@ -12,6 +12,21 @@ module Sisimai
12
12
  module Filtered
13
13
  # Imported from p5-Sisimail/lib/Sisimai/Reason/Filtered.pm
14
14
  class << self
15
+ Index = [
16
+ 'because the recipient is only accepting mail from specific email addresses', # AOL Phoenix
17
+ 'bounced address', # SendGrid|a message to an address has previously been Bounced.
18
+ 'due to extended inactivity new mail is not currently being accepted for this mailbox',
19
+ 'has restricted sms e-mail', # AT&T
20
+ 'is not accepting any mail',
21
+ 'refused due to recipient preferences', # Facebook
22
+ 'resolver.rst.notauthorized', # Microsoft Exchange
23
+ 'this account is protected by',
24
+ 'user not found', # Filter on MAIL.RU
25
+ 'user reject',
26
+ 'we failed to deliver mail because the following address recipient id refuse to receive mail', # Willcom
27
+ 'you have been blocked by the recipient',
28
+ ]
29
+
15
30
  def text; return 'filtered'; end
16
31
  def description; return 'Email rejected due to a header content after SMTP DATA command'; end
17
32
 
@@ -21,22 +36,7 @@ module Sisimai
21
36
  # true: Matched
22
37
  def match(argv1)
23
38
  return nil unless argv1
24
- index = [
25
- 'because the recipient is only accepting mail from specific email addresses', # AOL Phoenix
26
- 'bounced address', # SendGrid|a message to an address has previously been Bounced.
27
- 'due to extended inactivity new mail is not currently being accepted for this mailbox',
28
- 'has restricted sms e-mail', # AT&T
29
- 'is not accepting any mail',
30
- 'refused due to recipient preferences', # Facebook
31
- 'resolver.rst.notauthorized', # Microsoft Exchange
32
- 'this account is protected by',
33
- 'user not found', # Filter on MAIL.RU
34
- 'user reject',
35
- 'we failed to deliver mail because the following address recipient id refuse to receive mail', # Willcom
36
- 'you have been blocked by the recipient',
37
- ]
38
-
39
- return true if index.any? { |a| argv1.include?(a) }
39
+ return true if Index.any? { |a| argv1.include?(a) }
40
40
  return false
41
41
  end
42
42
 
@@ -49,12 +49,13 @@ module Sisimai
49
49
  return true if argvs.reason == 'filtered'
50
50
 
51
51
  require 'sisimai/reason/userunknown'
52
+ tempreason = Sisimai::SMTP::Status.name(argvs.deliverystatus) || ''
53
+ return false if tempreason == 'suspend'
54
+
52
55
  commandtxt = argvs.smtpcommand || ''
53
56
  diagnostic = argvs.diagnosticcode.downcase || ''
54
- tempreason = Sisimai::SMTP::Status.name(argvs.deliverystatus)
55
57
  alterclass = Sisimai::Reason::UserUnknown
56
58
 
57
- return false if tempreason == 'suspend'
58
59
  if tempreason == 'filtered'
59
60
  # Delivery status code points "filtered".
60
61
  return true if alterclass.match(diagnostic) || match(diagnostic)
@@ -9,6 +9,8 @@ module Sisimai
9
9
  module HasMoved
10
10
  # Imported from p5-Sisimail/lib/Sisimai/Reason/HasMoved.pm
11
11
  class << self
12
+ Index = [' has been replaced by ']
13
+
12
14
  def text; return 'hasmoved'; end
13
15
  def description; return "Email rejected due to user's mailbox has moved and is not forwarded automatically"; end
14
16
 
@@ -18,9 +20,7 @@ module Sisimai
18
20
  # true: Matched
19
21
  def match(argv1)
20
22
  return nil unless argv1
21
- index = [' has been replaced by ']
22
-
23
- return true if index.any? { |a| argv1.include?(a) }
23
+ return true if Index.any? { |a| argv1.include?(a) }
24
24
  return false
25
25
  end
26
26
 
@@ -8,6 +8,23 @@ module Sisimai
8
8
  module HostUnknown
9
9
  # Imported from p5-Sisimail/lib/Sisimai/Reason/HostUnknown.pm
10
10
  class << self
11
+ Index = [
12
+ 'domain does not exist',
13
+ 'domain is not reachable',
14
+ 'domain must exist',
15
+ 'host or domain name not found',
16
+ 'host unknown',
17
+ 'host unreachable',
18
+ 'mail domain mentioned in email address is unknown',
19
+ 'name or service not known',
20
+ 'no such domain',
21
+ 'recipient address rejected: unknown domain name',
22
+ 'recipient domain must exist',
23
+ 'the account or domain may not exist',
24
+ 'unknown host',
25
+ 'unrouteable address',
26
+ ]
27
+
11
28
  def text; return 'hostunknown'; end
12
29
  def description; return "Delivery failed due to a domain part of a recipient's email address does not exist"; end
13
30
 
@@ -18,24 +35,7 @@ module Sisimai
18
35
  # @since v4.0.0
19
36
  def match(argv1)
20
37
  return nil unless argv1
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
- ]
37
-
38
- return true if index.any? { |a| argv1.include?(a) }
38
+ return true if Index.any? { |a| argv1.include?(a) }
39
39
  return false
40
40
  end
41
41
 
@@ -50,7 +50,7 @@ module Sisimai
50
50
  diagnostic = argvs.diagnosticcode.downcase || ''
51
51
  statuscode = argvs.deliverystatus || ''
52
52
 
53
- if Sisimai::SMTP::Status.name(statuscode) == 'hostunknown'
53
+ if Sisimai::SMTP::Status.name(statuscode).to_s == 'hostunknown'
54
54
  # Status: 5.1.2
55
55
  # Diagnostic-Code: SMTP; 550 Host unknown
56
56
  require 'sisimai/reason/networkerror'
@@ -9,6 +9,53 @@ module Sisimai
9
9
  module MailboxFull
10
10
  # Imported from p5-Sisimail/lib/Sisimai/Reason/MailboxFull.pm
11
11
  class << self
12
+ Index = [
13
+ 'account disabled temporarly for exceeding receiving limits',
14
+ 'account is exceeding their quota',
15
+ 'account is over quota',
16
+ 'account is temporarily over quota',
17
+ 'boite du destinataire pleine',
18
+ 'delivery failed: over quota',
19
+ 'disc quota exceeded',
20
+ 'does not have enough space',
21
+ 'exceeded storage allocation',
22
+ 'exceeding its mailbox quota',
23
+ 'full mailbox',
24
+ 'is over disk quota',
25
+ 'is over quota temporarily',
26
+ 'mail file size exceeds the maximum size allowed for mail delivery',
27
+ 'mail quota exceeded',
28
+ 'mailbox exceeded the local limit',
29
+ 'mailbox full',
30
+ 'mailbox has exceeded its disk space limit',
31
+ 'mailbox is full',
32
+ 'mailbox over quota',
33
+ 'mailbox quota usage exceeded',
34
+ 'mailbox size limit exceeded',
35
+ 'maildir over quota',
36
+ 'maildir delivery failed: userdisk quota ',
37
+ 'maildir delivery failed: domaindisk quota ',
38
+ 'mailfolder is full',
39
+ 'not enough storage space in',
40
+ 'over the allowed quota',
41
+ 'quota exceeded',
42
+ 'quota violation for',
43
+ 'recipient reached disk quota',
44
+ 'recipient rejected: mailbox would exceed maximum allowed storage',
45
+ 'the recipient mailbox has exceeded its disk space limit',
46
+ "the user's space has been used up",
47
+ 'the user you are trying to reach is over quota',
48
+ 'too much mail data', # @docomo.ne.jp
49
+ 'user has exceeded quota, bouncing mail',
50
+ 'user has too many messages on the server',
51
+ 'user is over quota',
52
+ 'user is over the quota',
53
+ 'user over quota',
54
+ 'user over quota. (#5.1.1)', # qmail-toaster
55
+ 'was automatically rejected: quota exceeded',
56
+ 'would be over the allowed quota',
57
+ ]
58
+
12
59
  def text; return 'mailboxfull'; end
13
60
  def description; return "Email rejected due to a recipient's mailbox is full"; end
14
61
 
@@ -18,54 +65,7 @@ module Sisimai
18
65
  # true: Matched
19
66
  def match(argv1)
20
67
  return nil unless argv1
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
- ]
67
-
68
- return true if index.any? { |a| argv1.include?(a) }
68
+ return true if Index.any? { |a| argv1.include?(a) }
69
69
  return false
70
70
  end
71
71
 
@@ -81,7 +81,7 @@ module Sisimai
81
81
  # Delivery status code points "mailboxfull".
82
82
  # Status: 4.2.2
83
83
  # Diagnostic-Code: SMTP; 450 4.2.2 <***@example.jp>... Mailbox Full
84
- return true if Sisimai::SMTP::Status.name(argvs.deliverystatus) == 'mailboxfull'
84
+ return true if Sisimai::SMTP::Status.name(argvs.deliverystatus).to_s == 'mailboxfull'
85
85
 
86
86
  # Check the value of Diagnosic-Code: header with patterns
87
87
  return true if match(argvs.diagnosticcode.downcase)
@@ -11,6 +11,21 @@ module Sisimai
11
11
  module MailerError
12
12
  # Imported from p5-Sisimail/lib/Sisimai/Reason/MailerError.pm
13
13
  class << self
14
+ Regex = %r{(?>
15
+ \Aprocmail:[ ] # procmail
16
+ |bin/(?:procmail|maildrop)
17
+ |command[ ](?:
18
+ failed:[ ]
19
+ |died[ ]with[ ]status[ ]\d+
20
+ |output:
21
+ )
22
+ |exit[ ]\d+
23
+ |mailer[ ]error
24
+ |pipe[ ]to[ ][|][/].+
25
+ |x[-]unix[;][ ]\d+ # X-UNIX; 127
26
+ )
27
+ }x
28
+
14
29
  def text; return 'mailererror'; end
15
30
  def description; return 'Email returned due to a mailer program has not exited successfully'; end
16
31
 
@@ -20,22 +35,7 @@ module Sisimai
20
35
  # true: Matched
21
36
  def match(argv1)
22
37
  return nil unless argv1
23
- regex = %r{(?>
24
- \Aprocmail:[ ] # procmail
25
- |bin/(?:procmail|maildrop)
26
- |command[ ](?:
27
- failed:[ ]
28
- |died[ ]with[ ]status[ ]\d+
29
- |output:
30
- )
31
- |exit[ ]\d+
32
- |mailer[ ]error
33
- |pipe[ ]to[ ][|][/].+
34
- |x[-]unix[;][ ]\d+ # X-UNIX; 127
35
- )
36
- }x
37
-
38
- return true if argv1 =~ regex
38
+ return true if argv1 =~ Regex
39
39
  return false
40
40
  end
41
41
 
@@ -8,6 +8,21 @@ module Sisimai
8
8
  module MesgTooBig
9
9
  # Imported from p5-Sisimail/lib/Sisimai/Reason/MesgTooBig.pm
10
10
  class << self
11
+ Index = [
12
+ 'exceeded maximum inbound message size',
13
+ 'line limit exceeded',
14
+ 'max message size exceeded',
15
+ 'message file too big',
16
+ 'message length exceeds administrative limit',
17
+ 'message size exceeds fixed limit',
18
+ 'message size exceeds fixed maximum message size',
19
+ 'message size exceeds maximum value',
20
+ 'message too big',
21
+ 'message too large for this ',
22
+ 'size limit',
23
+ 'taille limite du message atteinte',
24
+ ]
25
+
11
26
  def text; return 'mesgtoobig'; end
12
27
  def description; return 'Email rejected due to an email size is too big for a destination mail server'; end
13
28
 
@@ -17,22 +32,7 @@ module Sisimai
17
32
  # true: Matched
18
33
  def match(argv1)
19
34
  return nil unless argv1
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
- ]
34
-
35
- return true if index.any? { |a| argv1.include?(a) }
35
+ return true if Index.any? { |a| argv1.include?(a) }
36
36
  return false
37
37
  end
38
38
 
@@ -45,7 +45,7 @@ module Sisimai
45
45
  return true if argvs.reason == 'mesgtoobig'
46
46
 
47
47
  statuscode = argvs.deliverystatus || ''
48
- tempreason = Sisimai::SMTP::Status.name(statuscode)
48
+ tempreason = Sisimai::SMTP::Status.name(statuscode) || ''
49
49
 
50
50
  # Delivery status code points "mesgtoobig".
51
51
  # Status: 5.3.4