sisimai 4.24.1 → 4.25.0

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
@@ -8,6 +8,22 @@ module Sisimai
8
8
  module Suspend
9
9
  # Imported from p5-Sisimail/lib/Sisimai/Reason/Suspend.pm
10
10
  class << self
11
+ Index = [
12
+ ' is currently suspended',
13
+ ' temporary locked',
14
+ 'boite du destinataire archivee',
15
+ 'email account that you tried to reach is disabled',
16
+ 'invalid/inactive user',
17
+ 'is a deactivated mailbox', # http://service.mail.qq.com/cgi-bin/help?subtype=1&&id=20022&&no=1000742
18
+ 'mailbox currently suspended',
19
+ 'mailbox unavailable or access denied',
20
+ 'recipient rejected: temporarily inactive',
21
+ 'recipient suspend the service',
22
+ 'this account has been disabled or discontinued',
23
+ 'user suspended', # http://mail.163.com/help/help_spam_16.htm
24
+ 'vdelivermail: account is locked email bounced',
25
+ ]
26
+
11
27
  def text; return 'suspend'; end
12
28
  def description; return 'Email rejected due to a recipient account is being suspended'; end
13
29
 
@@ -17,23 +33,7 @@ module Sisimai
17
33
  # true: Matched
18
34
  def match(argv1)
19
35
  return nil unless argv1
20
- index = [
21
- ' is currently suspended',
22
- ' temporary locked',
23
- 'boite du destinataire archivee',
24
- 'email account that you tried to reach is disabled',
25
- 'invalid/inactive user',
26
- 'is a deactivated mailbox', # http://service.mail.qq.com/cgi-bin/help?subtype=1&&id=20022&&no=1000742
27
- 'mailbox currently suspended',
28
- 'mailbox unavailable or access denied',
29
- 'recipient rejected: temporarily inactive',
30
- 'recipient suspend the service',
31
- 'this account has been disabled or discontinued',
32
- 'user suspended', # http://mail.163.com/help/help_spam_16.htm
33
- 'vdelivermail: account is locked email bounced',
34
- ]
35
-
36
- return true if index.any? { |a| argv1.include?(a) }
36
+ return true if Index.any? { |a| argv1.include?(a) }
37
37
  return false
38
38
  end
39
39
 
@@ -12,6 +12,27 @@ module Sisimai
12
12
  module SystemError
13
13
  # Imported from p5-Sisimail/lib/Sisimai/Reason/SystemError.pm
14
14
  class << self
15
+ Index = [
16
+ "can't create user output file",
17
+ 'could not load drd for domain',
18
+ 'internal error reading data', # Microsoft
19
+ 'internal server error: operation now in progress', # Microsoft
20
+ 'interrupted system call',
21
+ 'it encountered an error while being processed',
22
+ 'it would create a mail loop',
23
+ 'local configuration error',
24
+ 'local error in processing',
25
+ 'loop was found in the mail exchanger',
26
+ 'loops back to myself',
27
+ 'mail system configuration error',
28
+ 'server configuration error',
29
+ 'service currently unavailable',
30
+ 'system config error',
31
+ 'temporary local problem',
32
+ 'timeout waiting for input',
33
+ 'transaction failed',
34
+ ]
35
+
15
36
  def text; return 'systemerror'; end
16
37
  def description; return 'Email returned due to system error on the remote host'; end
17
38
 
@@ -21,27 +42,7 @@ module Sisimai
21
42
  # true: Matched
22
43
  def match(argv1)
23
44
  return nil unless argv1
24
- index = [
25
- "can't create user output file",
26
- 'could not load drd for domain',
27
- 'internal error reading data', # Microsoft
28
- 'internal server error: operation now in progress', # Microsoft
29
- 'interrupted system call',
30
- 'it encountered an error while being processed',
31
- 'it would create a mail loop',
32
- 'local configuration error',
33
- 'local error in processing',
34
- 'loop was found in the mail exchanger',
35
- 'loops back to myself',
36
- 'mail system configuration error',
37
- 'server configuration error',
38
- 'service currently unavailable',
39
- 'system config error',
40
- 'temporary local problem',
41
- 'timeout waiting for input',
42
- ]
43
-
44
- return true if index.any? { |a| argv1.include?(a) }
45
+ return true if Index.any? { |a| argv1.include?(a) }
45
46
  return false
46
47
  end
47
48
 
@@ -9,6 +9,11 @@ module Sisimai
9
9
  module SystemFull
10
10
  # Imported from p5-Sisimail/lib/Sisimai/Reason/SystemFull.pm
11
11
  class << self
12
+ Index = [
13
+ 'mail system full',
14
+ 'requested mail action aborted: exceeded storage allocation', # MS Exchange
15
+ ]
16
+
12
17
  def text; return 'systemfull'; end
13
18
  def description; return "Email rejected due to a destination mail server's disk is full"; end
14
19
 
@@ -18,12 +23,7 @@ module Sisimai
18
23
  # true: Matched
19
24
  def match(argv1)
20
25
  return nil unless argv1
21
- index = [
22
- 'mail system full',
23
- 'requested mail action aborted: exceeded storage allocation', # MS Exchange
24
- ]
25
-
26
- return true if index.any? { |a| argv1.include?(a) }
26
+ return true if Index.any? { |a| argv1.include?(a) }
27
27
  return false
28
28
  end
29
29
 
@@ -12,6 +12,23 @@ module Sisimai
12
12
  module TooManyConn
13
13
  # Imported from p5-Sisimail/lib/Sisimai/Reason/TooManyConn.pm
14
14
  class << self
15
+ Index = [
16
+ 'all available ips are at maximum connection limit', # SendGrid
17
+ 'connection rate limit exceeded',
18
+ 'exceeds per-domain connection limit for',
19
+ 'has exceeded the max emails per hour ',
20
+ 'throttling failure: daily message quota exceeded',
21
+ 'throttling failure: maximum sending rate exceeded',
22
+ 'too many connections',
23
+ 'too many connections from your host.', # Microsoft
24
+ 'too many concurrent smtp connections', # Microsoft
25
+ 'too many errors from your ip', # Free.fr
26
+ 'too many recipients', # ntt docomo
27
+ 'too many smtp sessions for this host', # Sendmail(daemon.c)
28
+ 'trop de connexions, ',
29
+ 'we have already made numerous attempts to deliver this message',
30
+ ]
31
+
15
32
  def text; return 'toomanyconn'; end
16
33
  def description; return 'SMTP connection rejected temporarily due to too many concurrency connections to the remote host'; end
17
34
 
@@ -21,23 +38,7 @@ module Sisimai
21
38
  # true: Matched
22
39
  def match(argv1)
23
40
  return nil unless argv1
24
- index = [
25
- 'all available ips are at maximum connection limit', # SendGrid
26
- 'connection rate limit exceeded',
27
- 'exceeds per-domain connection limit for',
28
- 'has exceeded the max emails per hour ',
29
- 'throttling failure: daily message quota exceeded',
30
- 'throttling failure: maximum sending rate exceeded',
31
- 'too many connections',
32
- 'too many connections from your host.', # Microsoft
33
- 'too many concurrent smtp connections', # Microsoft
34
- 'too many errors from your ip', # Free.fr
35
- 'too many smtp sessions for this host', # Sendmail(daemon.c)
36
- 'trop de connexions, ',
37
- 'we have already made numerous attempts to deliver this message',
38
- ]
39
-
40
- return true if index.any? { |a| argv1.include?(a) }
41
+ return true if Index.any? { |a| argv1.include?(a) }
41
42
  return false
42
43
  end
43
44
 
@@ -48,7 +49,7 @@ module Sisimai
48
49
  # @see http://www.ietf.org/rfc/rfc2822.txt
49
50
  def true(argvs)
50
51
  return true if argvs.reason == 'toomanyconn'
51
- return true if Sisimai::SMTP::Status.name(argvs.deliverystatus) == 'toomanyconn'
52
+ return true if Sisimai::SMTP::Status.name(argvs.deliverystatus).to_s == 'toomanyconn'
52
53
  return true if match(argvs.diagnosticcode.downcase)
53
54
  return false
54
55
  end
@@ -16,6 +16,125 @@ module Sisimai
16
16
  module UserUnknown
17
17
  # Imported from p5-Sisimail/lib/Sisimai/Reason/UserUnknown.pm
18
18
  class << self
19
+ Regex = %r{(?>
20
+ .+[ ]user[ ]unknown
21
+ |[#]5[.]1[.]1[ ]bad[ ]address
22
+ |[<].+[>][ ]not[ ]found
23
+ |[<].+[@].+[>][.][.][.][ ]blocked[ ]by[ ]
24
+ |5[.]0[.]0[.][ ]mail[ ]rejected[.]
25
+ |5[.]1[.]0[ ]address[ ]rejected[.]
26
+ |adresse[ ]d[ ]au[ ]moins[ ]un[ ]destinataire[ ]invalide.+[a-z]{3}.+(?:416|418)
27
+ |address[ ](?:does[ ]not[ ]exist|unknown)
28
+ |archived[ ]recipient
29
+ |bad[-_ ]recipient
30
+ |can[']t[ ]accept[ ]user
31
+ |destination[ ](?:
32
+ addresses[ ]were[ ]unknown
33
+ |server[ ]rejected[ ]recipients
34
+ )
35
+ |email[ ]address[ ](?:does[ ]not[ ]exist|could[ ]not[ ]be[ ]found)
36
+ |invalid[ ](?:
37
+ address
38
+ |mailbox:
39
+ |mailbox[ ]path
40
+ |recipient
41
+ )
42
+ |is[ ]not[ ](?:
43
+ a[ ]known[ ]user
44
+ |a[ ]valid[ ]mailbox
45
+ |an[ ]active[ ]address[ ]at[ ]this[ ]host
46
+ )
47
+ |mailbox[ ](?:
48
+ .+[ ]does[ ]not[ ]exist
49
+ |.+[@].+[ ]unavailable
50
+ |invalid
51
+ |is[ ](?:inactive|unavailable)
52
+ |not[ ](?:present|found)
53
+ |unavailable
54
+ )
55
+ |no[ ](?:
56
+ [ ].+[ ]in[ ]name[ ]directory
57
+ |account[ ]by[ ]that[ ]name[ ]here
58
+ |existe[ ](?:dicha[ ]persona|ese[ ]usuario[ ])
59
+ |mail[ ]box[ ]available[ ]for[ ]this[ ]user
60
+ |mailbox[ ](?:
61
+ by[ ]that[ ]name[ ]is[ ]currently[ ]available
62
+ |found
63
+ )
64
+ |matches[ ]to[ ]nameserver[ ]query
65
+ |such[ ](?:
66
+ address[ ]here
67
+ |mailbox
68
+ |person[ ]at[ ]this[ ]address
69
+ |recipient
70
+ |user(?:[ ]here)?
71
+ )
72
+ |thank[ ]you[ ]rejected:[ ]account[ ]unavailable:
73
+ |valid[ ]recipients[,][ ]bye # Microsoft
74
+ )
75
+ |non[- ]?existent[ ]user
76
+ |not[ ](?:
77
+ a[ ]valid[ ]user[ ]here
78
+ |a[ ]local[ ]address
79
+ |email[ ]addresses
80
+ )
81
+ |rcpt[ ][<].+[>][ ]does[ ]not[ ]exist
82
+ |recipient[ ]address[ ]rejected[.][ ][(]in[ ]reply[ ]to[ ]rcpt[ ]to[ ]command[)]
83
+ |rece?ipient[ ](?:
84
+ .+[ ]was[ ]not[ ]found[ ]in
85
+ |address[ ]rejected:[ ](?:
86
+ access[ ]denied
87
+ |invalid[ ]user
88
+ |user[ ].+[ ]does[ ]not[ ]exist
89
+ |user[ ]unknown[ ]in[ ].+[ ]table
90
+ |unknown[ ]user
91
+ )
92
+ |does[ ]not[ ]exist(?:[ ]on[ ]this[ ]system)?
93
+ |is[ ]not[ ]local
94
+ |not[ ](?:exist|found|ok)
95
+ |unknown
96
+ )
97
+ |requested[ ]action[ ]not[ ]taken:[ ]mailbox[ ]unavailable
98
+ |resolver[.]adr[.]recip(?:ient)notfound
99
+ |said:[ ]550[-[ ]]5[.]1[.]1[ ].+[ ]user[ ]unknown[ ]
100
+ |smtp[ ]error[ ]from[ ]remote[ ]mail[ ]server[ ]after[ ]end[ ]of[ ]data:[ ]553.+does[ ]not[ ]exist
101
+ |sorry,[ ](?:
102
+ user[ ]unknown
103
+ |badrcptto
104
+ |no[ ]mailbox[ ]here[ ]by[ ]that[ ]name
105
+ )
106
+ |the[ ](?:
107
+ email[ ]account[ ]that[ ]you[ ]tried[ ]to[ ]reach[ ]does[ ]not[ ]exist
108
+ |following[ ]recipients[ ]was[ ]undeliverable
109
+ |user[']s[ ]email[ ]name[ ]is[ ]not[ ]found
110
+ )
111
+ |there[ ]is[ ]no[ ]one[ ]at[ ]this[ ]address
112
+ |this[ ](?:
113
+ address[ ]no[ ]longer[ ]accepts[ ]mail
114
+ |email[ ]address[ ]is[ ]wrong[ ]or[ ]no[ ]longer[ ]valid
115
+ |spectator[ ]does[ ]not[ ]exist
116
+ |user[ ]doesn[']?t[ ]have[ ]a[ ].+[ ]account
117
+ )
118
+ |unknown[ ](?:
119
+ e[-]?mail[ ]address
120
+ |local[- ]part
121
+ |mailbox
122
+ |recipient
123
+ |user
124
+ )
125
+ |user[ ](?:
126
+ .+[ ]was[ ]not[ ]found
127
+ |.+[ ]does[ ]not[ ]exist
128
+ |does[ ]not[ ]exist
129
+ |missing[ ]home[ ]directory
130
+ |not[ ](?:active|exist|found|known)
131
+ |unknown
132
+ )
133
+ |vdeliver:[ ]invalid[ ]or[ ]unknown[ ]virtual[ ]user
134
+ |your[ ]envelope[ ]recipient[ ]is[ ]in[ ]my[ ]badrcptto[ ]list
135
+ )
136
+ }x
137
+
19
138
  def text; return 'userunknown'; end
20
139
  def description; return "Email rejected due to a local part of a recipient's email address does not exist"; end
21
140
 
@@ -25,125 +144,7 @@ module Sisimai
25
144
  # true: Matched
26
145
  def match(argv1)
27
146
  return nil unless argv1
28
- regex = %r{(?>
29
- .+[ ]user[ ]unknown
30
- |[#]5[.]1[.]1[ ]bad[ ]address
31
- |[<].+[>][ ]not[ ]found
32
- |[<].+[@].+[>][.][.][.][ ]blocked[ ]by[ ]
33
- |5[.]0[.]0[.][ ]mail[ ]rejected[.]
34
- |5[.]1[.]0[ ]address[ ]rejected[.]
35
- |adresse[ ]d[ ]au[ ]moins[ ]un[ ]destinataire[ ]invalide.+[a-z]{3}.+(?:416|418)
36
- |address[ ](?:does[ ]not[ ]exist|unknown)
37
- |archived[ ]recipient
38
- |bad[-_ ]recipient
39
- |can[']t[ ]accept[ ]user
40
- |destination[ ](?:
41
- addresses[ ]were[ ]unknown
42
- |server[ ]rejected[ ]recipients
43
- )
44
- |email[ ]address[ ](?:does[ ]not[ ]exist|could[ ]not[ ]be[ ]found)
45
- |invalid[ ](?:
46
- address
47
- |mailbox:
48
- |mailbox[ ]path
49
- |recipient
50
- )
51
- |is[ ]not[ ](?:
52
- a[ ]known[ ]user
53
- |a[ ]valid[ ]mailbox
54
- |an[ ]active[ ]address[ ]at[ ]this[ ]host
55
- )
56
- |mailbox[ ](?:
57
- .+[ ]does[ ]not[ ]exist
58
- |.+[@].+[ ]unavailable
59
- |invalid
60
- |is[ ](?:inactive|unavailable)
61
- |not[ ](?:present|found)
62
- |unavailable
63
- )
64
- |no[ ](?:
65
- [ ].+[ ]in[ ]name[ ]directory
66
- |account[ ]by[ ]that[ ]name[ ]here
67
- |existe[ ](?:dicha[ ]persona|ese[ ]usuario[ ])
68
- |mail[ ]box[ ]available[ ]for[ ]this[ ]user
69
- |mailbox[ ](?:
70
- by[ ]that[ ]name[ ]is[ ]currently[ ]available
71
- |found
72
- )
73
- |matches[ ]to[ ]nameserver[ ]query
74
- |such[ ](?:
75
- address[ ]here
76
- |mailbox
77
- |person[ ]at[ ]this[ ]address
78
- |recipient
79
- |user(?:[ ]here)?
80
- )
81
- |thank[ ]you[ ]rejected:[ ]account[ ]unavailable:
82
- |valid[ ]recipients[,][ ]bye # Microsoft
83
- )
84
- |non[- ]?existent[ ]user
85
- |not[ ](?:
86
- a[ ]valid[ ]user[ ]here
87
- |a[ ]local[ ]address
88
- |email[ ]addresses
89
- )
90
- |rcpt[ ][<].+[>][ ]does[ ]not[ ]exist
91
- |rece?ipient[ ](?:
92
- .+[ ]was[ ]not[ ]found[ ]in
93
- |address[ ]rejected:[ ](?:
94
- access[ ]denied
95
- |invalid[ ]user
96
- |user[ ].+[ ]does[ ]not[ ]exist
97
- |user[ ]unknown[ ]in[ ].+[ ]table
98
- |unknown[ ]user
99
- )
100
- |does[ ]not[ ]exist(?:[ ]on[ ]this[ ]system)?
101
- |is[ ]not[ ]local
102
- |not[ ](?:exist|found|ok)
103
- |unknown
104
- )
105
- |requested[ ]action[ ]not[ ]taken:[ ]mailbox[ ]unavailable
106
- |resolver[.]adr[.]recip(?:ient)notfound
107
- |said:[ ]550[-[ ]]5[.]1[.]1[ ].+[ ]user[ ]unknown[ ]
108
- |smtp[ ]error[ ]from[ ]remote[ ]mail[ ]server[ ]after[ ]end[ ]of[ ]data:[ ]553.+does[ ]not[ ]exist
109
- |sorry,[ ](?:
110
- user[ ]unknown
111
- |badrcptto
112
- |no[ ]mailbox[ ]here[ ]by[ ]that[ ]name
113
- )
114
- |the[ ](?:
115
- email[ ]account[ ]that[ ]you[ ]tried[ ]to[ ]reach[ ]does[ ]not[ ]exist
116
- |following[ ]recipients[ ]was[ ]undeliverable
117
- |user[']s[ ]email[ ]name[ ]is[ ]not[ ]found
118
- )
119
- |there[ ]is[ ]no[ ]one[ ]at[ ]this[ ]address
120
- |this[ ](?:
121
- address[ ]no[ ]longer[ ]accepts[ ]mail
122
- |email[ ]address[ ]is[ ]wrong[ ]or[ ]no[ ]longer[ ]valid
123
- |spectator[ ]does[ ]not[ ]exist
124
- |user[ ]doesn[']?t[ ]have[ ]a[ ].+[ ]account
125
- )
126
- |unknown[ ](?:
127
- e[-]?mail[ ]address
128
- |local[- ]part
129
- |mailbox
130
- |recipient
131
- |user
132
- )
133
- |user[ ](?:
134
- .+[ ]was[ ]not[ ]found
135
- |.+[ ]does[ ]not[ ]exist
136
- |does[ ]not[ ]exist
137
- |missing[ ]home[ ]directory
138
- |not[ ](?:active|found|known)
139
- |unknown
140
- )
141
- |vdeliver:[ ]invalid[ ]or[ ]unknown[ ]virtual[ ]user
142
- |your[ ]envelope[ ]recipient[ ]is[ ]in[ ]my[ ]badrcptto[ ]list
143
- )
144
- }x
145
-
146
- return true if argv1 =~ regex
147
+ return true if argv1 =~ Regex
147
148
  return false
148
149
  end
149
150
 
@@ -155,10 +156,10 @@ module Sisimai
155
156
  def true(argvs)
156
157
  return true if argvs.reason == 'userunknown'
157
158
 
158
- diagnostic = argvs.diagnosticcode.downcase;
159
- tempreason = Sisimai::SMTP::Status.name(argvs.deliverystatus)
159
+ tempreason = Sisimai::SMTP::Status.name(argvs.deliverystatus) || ''
160
160
  return false if tempreason == 'suspend'
161
161
 
162
+ diagnostic = argvs.diagnosticcode.downcase;
162
163
  if tempreason == 'userunknown'
163
164
  # *.1.1 = 'Bad destination mailbox address'
164
165
  # Status: 5.1.1