sisimai 5.0.0 → 5.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/rake-test.yml +55 -0
  3. data/ChangeLog.md +40 -1
  4. data/README-JA.md +223 -111
  5. data/README.md +54 -31
  6. data/lib/sisimai/fact.rb +46 -8
  7. data/lib/sisimai/lhost/amazonses.rb +0 -1
  8. data/lib/sisimai/lhost/amazonworkmail.rb +0 -1
  9. data/lib/sisimai/lhost/aol.rb +0 -1
  10. data/lib/sisimai/lhost/bigfoot.rb +0 -1
  11. data/lib/sisimai/lhost/domino.rb +0 -1
  12. data/lib/sisimai/lhost/exchange2007.rb +1 -1
  13. data/lib/sisimai/lhost/exim.rb +7 -16
  14. data/lib/sisimai/lhost/facebook.rb +0 -1
  15. data/lib/sisimai/lhost/googlegroups.rb +2 -1
  16. data/lib/sisimai/lhost/gsuite.rb +0 -1
  17. data/lib/sisimai/lhost/mailru.rb +8 -17
  18. data/lib/sisimai/lhost/messagelabs.rb +0 -1
  19. data/lib/sisimai/lhost/mfilter.rb +1 -1
  20. data/lib/sisimai/lhost/mxlogic.rb +8 -18
  21. data/lib/sisimai/lhost/office365.rb +1 -1
  22. data/lib/sisimai/lhost/outlook.rb +0 -1
  23. data/lib/sisimai/lhost/postfix.rb +0 -1
  24. data/lib/sisimai/lhost/receivingses.rb +0 -1
  25. data/lib/sisimai/lhost/sendgrid.rb +1 -3
  26. data/lib/sisimai/lhost/sendmail.rb +0 -1
  27. data/lib/sisimai/lhost/yandex.rb +0 -1
  28. data/lib/sisimai/message.rb +13 -4
  29. data/lib/sisimai/reason/authfailure.rb +1 -0
  30. data/lib/sisimai/reason/blocked.rb +2 -0
  31. data/lib/sisimai/reason/expired.rb +1 -0
  32. data/lib/sisimai/reason/mailboxfull.rb +1 -0
  33. data/lib/sisimai/reason/securityerror.rb +1 -0
  34. data/lib/sisimai/reason/spamdetected.rb +1 -0
  35. data/lib/sisimai/reason/suspend.rb +1 -0
  36. data/lib/sisimai/rfc5322.rb +120 -64
  37. data/lib/sisimai/rhost/google.rb +320 -59
  38. data/lib/sisimai/rhost/mimecast.rb +9 -2
  39. data/lib/sisimai/smtp/status.rb +3 -0
  40. data/lib/sisimai/version.rb +1 -1
  41. data/lib/sisimai.rb +12 -11
  42. data/set-of-emails/maildir/bsd/lhost-sendmail-60.eml +85 -0
  43. metadata +4 -2
@@ -7,6 +7,45 @@ module Sisimai
7
7
  class << self
8
8
  MessagesOf = {
9
9
  'authfailure' => [
10
+ # - 451 4.7.24 The SPF record of the sending domain has one or more suspicious entries.
11
+ # To protect our users from spam, mail sent from your IP address has been temporarily
12
+ # rate limited. For more information, go to Email sender guidelines.
13
+ # https://support.google.com/mail/answer/81126#authentication
14
+ #
15
+ # - 550 5.7.24 The SPF record of the sending domain has one or more suspicious entries.
16
+ # For more information, go to Email sender guidelines.
17
+ # - https://support.google.com/mail/answer/81126#authentication
18
+ ['451', '4.7.24', 'the spf record of the sending domain has one or more suspicious entries'],
19
+ ['550', '5.7.24', 'the spf record of the sending domain has one or more suspicious entries'],
20
+
21
+ # - 421 4.7.26 This mail has been rate limited because it is unauthenticated.
22
+ # Gmail requires all senders to authenticate with either SPF or DKIM.
23
+ # Authentication results: DKIM = did not pass SPF domain-name with ip: ip-address =
24
+ # did not pass. To resolve this issue, go to Email sender guidelines.
25
+ # - https://support.google.com/mail/answer/81126#authentication
26
+ ['421', '4.7.26', 'gmail requires all senders to authenticate with either spf or dkim'],
27
+ ['550', '5.7.26', 'gmail requires all senders to authenticate with either spf or dkim'],
28
+
29
+ # - 550 5.7.26 This message fails to pass SPF checks for an SPF record with a hard fail
30
+ # policy (-all). To best protect our users from spam and phishing, the message has
31
+ # been blocked. Please visit https://support.google.com/mail/answer/81126 for more
32
+ # information.
33
+ #
34
+ # - 550 5.7.26 The MAIL FROM domain [domain-name] has an SPF record with a hard fail
35
+ # policy (-all) but it fails to pass SPF checks with the ip: [ip-address]. To best
36
+ # protect our users from spam and phishing, the message has been blocked. For more
37
+ # information, go to Email sender guidelines.
38
+ # - https://support.google.com/mail/answer/81126#authentication
39
+ ['550', '5.7.26', 'this message fails to pass spf checks for an spf record with a hard fail'],
40
+ ['550', '5.7.26', 'has an spf record with a hard fail policy'],
41
+
42
+ # - 451 4.7.26 Unauthenticated email from domain-name is not accepted due to domain's
43
+ # DMARC policy, but temporary DNS failures prevent authentication. Please contact the
44
+ # administrator of domain-name domain if this was a legitimate mail. To learn about
45
+ # the DMARC initiative, go to https://support.google.com/mail/?p=DmarcRejection
46
+ ['451', '4.7.26', "is not accepted due to domain's dmarc policy"],
47
+ ['550', '5.7.26', "is not accepted due to domain's dmarc policy"],
48
+
10
49
  # - 550 5.7.26 Unauthenticated email from domain-name is not accepted due to domain's
11
50
  # DMARC policy. Please contact the administrator of domain-name domain. If this was
12
51
  # a legitimate mail please visit [Control unauthenticated mail from your domain] to
@@ -22,213 +61,435 @@ module Sisimai
22
61
  ['550', '5.7.1', 'fails to pass authentication checks'],
23
62
  ['550', '5.7.26', 'fails to pass authentication checks'],
24
63
 
25
- # - 550 5.7.26 This message fails to pass SPF checks for an SPF record with a hard fail
26
- # policy (-all). To best protect our users from spam and phishing, the message has
27
- # been blocked. Please visit https://support.google.com/mail/answer/81126 for more
28
- # information.
29
- ['550', '5.7.26', 'this message fails to pass spf checks for an spf record with a hard fail'],
64
+ # - 421 4.7.27 This mail has been rate limited because SPF does not pass.
65
+ # Gmail requires all large senders to authenticate with SPF. Authentication results:
66
+ # SPF domain-name with ip: ip-address = did not pass. To resolve this issue, go to
67
+ # Define your SPF record窶韮asic setup. https://support.google.com/a/answer/10685031
68
+ ['421', '4.7.27', 'gmail requires all large senders to authenticate with spf'],
69
+ ['550', '5.7.27', 'gmail requires all large senders to authenticate with spf'],
70
+
71
+ # - 421 4.7.28 This mail has been rate limited because DKIM does not pass.
72
+ # Gmail requires all large senders to authenticate with DKIM. Authentication results:
73
+ # DKIM = did not pass. For instructions on setting up DKIM authentication, go to Turn
74
+ # on DKIM for your domain. https://support.google.com/a/answer/180504
75
+ ['421', '4.7.28', 'gmail requires all large senders to authenticate with dkim'],
76
+ ['550', '5.7.28', 'gmail requires all large senders to authenticate with dkim'],
30
77
  ],
31
78
  'badreputation' => [
79
+ # - 421 4.7.0 This message is suspicious due to the very low reputation of the sending
80
+ # IP address/domain. To protect our users from spam, mail sent from your IP address
81
+ # has been temporarily rate limited. For more information, go to Why has Gmail blocked
82
+ # my messages?. https://support.google.com/mail/answer/188131
83
+ ['421', '4.7.0', 'this message is suspicious due to the very low reputation of the sending ip address'],
84
+ ['421', '4.7.0', 'this message is suspicious due to the very low reputation of the sending domain'],
85
+
32
86
  # - 550 5.7.1 Our system has detected that this message is likely suspicious due to the
33
- # very low reputation of the sending IP address. To best protect our users from spam,
34
- # the message has been blocked.
87
+ # very low reputation of the sending IP address/domain. To best protect our users
88
+ # from spam, the message has been blocked.
35
89
  # Please visit https://support.google.com/mail/answer/188131 for more information.
36
90
  ['550', '5.7.1', 'this message is likely suspicious due to the very low reputation of the sending ip address'],
91
+ ['550', '5.7.1', 'this message is likely suspicious due to the very low reputation of the sending domain'],
37
92
  ],
38
93
  'blocked' => [
94
+ # - 421 4.7.0 IP not in whitelist for RCPT domain, closing connection.
95
+ # For more information, go to Allowlists, denylists, and approved senders.
96
+ # https://support.google.com/a/answer/60752
39
97
  ['421', '4.7.0', 'ip not in whitelist for rcpt domain, closing connection.'],
40
98
 
41
- # - 421 4.7.0 Our system has detected an unusual rate of unsolicited mail originating
42
- # from your IP address. To protect our users from spam, mail sent from your IP ad-
43
- # dress has been temporarily blocked.
44
- # For more information, visit https://support.google.com/mail/answer/81126
45
- ['421', '4.7.0', 'our system has detected an unusual rate of unsolicited mail originating from your ip address'],
46
-
47
99
  # - 421 4.7.0 Try again later, closing connection. This usually indicates a Denial of
48
100
  # Service (DoS) for the SMTP relay at the HELO stage.
101
+ # https://support.google.com/a/answer/3221692
49
102
  ['421', '4.7.0', 'try again later, closing connection.'],
50
103
 
51
- # - 501 5.5.4 HELO/EHLO argument is invalid. For more information, visit [HELO/EHLO e-
52
- # mail error].
104
+ # - 501 5.5.4 HELO/EHLO argument is invalid. https://support.google.com/mail/?p=helo
105
+ ['501', '5.5.4', 'empty helo/ehlo argument not allowed'],
53
106
  ['501', '5.5.4', 'helo/ehlo argument is invalid'],
54
107
 
108
+ # - 421 4.7.28 Gmail has detected an unusual rate of unsolicited mail.
109
+ # (originating from)
110
+ # - your IP address 192.0.2.25
111
+ # - your IP Netblock 192.0.2.0/24 (?)
112
+ # - your DKIM domain example.org
113
+ # - your SPF domain example.org
114
+ # (containing one of your URL domains)
115
+ #
116
+ # To protect our users from spam, mail has been temporarily rate limited. To review
117
+ # our bulk email senders guidelines, go to Email sender guidelines.
118
+ # https://support.google.com/mail/?p=UnsolicitedRateLimitError
119
+ ['421', '4.7.0', 'an unusual rate of unsolicited mail'],
120
+ ['421', '4.7.28', 'an unusual rate of unsolicited mail'],
121
+
55
122
  # - 550 5.7.1 Our system has detected an unusual rate of unsolicited mail originating
56
123
  # from your IP address. To protect our users from spam, mail sent from your IP ad-
57
124
  # dress has been blocked. Review https://support.google.com/mail/answer/81126
58
- ['550', '5.7.1', 'our system has detected an unusual rate of unsolicited mail originating from your ip address'],
59
-
60
- # - 550 5.7.1 The IP you're using to send mail is not authorized to send email directly
61
- # to our servers. Please use the SMTP relay at your service provider instead. For
62
- # more information, visit https://support.google.com/mail/answer/10336
63
- ['550', '5.7.1', "the ip you're using to send mail is not authorized to send email directly to our servers"],
64
- ],
65
- 'contenterror' => [
66
- ['554', '5.6.0', 'mail message is malformed. Not accepted'],
125
+ #
126
+ # - 550 5.7.28 There is an unusual rate of unsolicited mail originating from your IP
127
+ # address. To protect our users from spam, mail sent from your IP address has been
128
+ # blocked. To review our bulk email senders guidelines, go to Email sender guidelines.
129
+ ['550', '5.7.1', 'an unusual rate of unsolicited mail originating from your ip address'],
130
+ ['550', '5.7.28', 'an unusual rate of unsolicited mail originating from your ip address'],
67
131
  ],
68
132
  'exceedlimit' => [
69
133
  # - 552 5.2.3 Your message exceeded Google's message size limits. For more information,
70
134
  # visit https://support.google.com/mail/answer/6584
71
- ['552', '5.2.3', "your message exceeded Google's message size limits"],
135
+ ['552', '5.2.3', "your message exceeded google's message size limits"],
136
+
137
+ # - 552 5.3.4 The number of attachments (num-attachments) exceeds Google's limit of
138
+ # limit attachments. To view our attachment size guidelines, go to Gmail receiving
139
+ # limits in Google Workspace. https://support.google.com/a/answer/1366776
140
+ #
141
+ # - 552 5.3.4 The size of the <header name> header value (size bytes) exceeds Google's
142
+ # limit of limit bytes per individual header size. To view our header size guidelines,
143
+ # go to Gmail message header limits https://support.google.com/a?p=header-limits
144
+ ['552', '5.3.4', "exceeds google's limit of limit attachments."],
145
+ ['552', '5.3.4', "your message exceeded google's message header size limits"],
146
+ ['552', '5.3.4', 'bytes per individual header size'],
147
+ ['552', '5.3.4', "exceeds google窶冱 header name limit of"],
148
+ ['552', '5.3.4', "your message has a subject: header that exceeds google's message header size limit"]
72
149
  ],
73
150
  'expired' => [
151
+ # - 421 4.7.0 Connection expired, try reconnecting. For more information, go to About
152
+ # SMTP error messages. https://support.google.com/a/answer/3221692
153
+ ['421', '4.7.0', 'connection expired'],
154
+
155
+ # - 451 4.4.2 Timeout - closing connection. For more information, go to About SMTP
156
+ # error messages. https://support.google.com/a/answer/3221692
74
157
  ['451', '4.4.2', 'timeout - closing connection'],
75
158
  ],
76
159
  'mailboxfull' => [
160
+ # - 452 4.2.2 The recipient's inbox is out of storage space.
161
+ # Please direct the recipient to https://support.google.com/mail/?p=OverQuotaTemp
162
+ # - Please direct the recipient to https://support.google.com/mail/?p=OverQuotaPerm
163
+ ['452', '4.2.2', 'inbox is out of storage space'],
164
+ ['552', '5.2.2', 'inbox is out of storage space and inactive'],
165
+
77
166
  # - 452 4.2.2 The email account that you tried to reach is over quota. Please direct
78
167
  # the recipient to Clear Google Drive space & increase storage.
79
168
  ['452', '4.2.2', 'the email account that you tried to reach is over quota'],
80
169
  ['552', '5.2.2', 'the email account that you tried to reach is over quota'],
81
170
  ['550', '5.7.1', 'email quota exceeded'],
82
171
  ],
172
+ 'mesgtoobig' => [
173
+ # - 552 5.3.4 Your message exceeded Google's message size limits. To view our message
174
+ # size guidelines, go to Send attachments with your Gmail message.
175
+ # - https://support.google.com/mail/?p=MaxSizeError
176
+ ['552', '5.3.4', "your message exceeded google's message size limits"],
177
+
178
+ # - 552 5.3.4 The size of your message (size bytes) exceeded Google's message size
179
+ # limits of limit bytes. To view our message size guidelines, go to Gmail receiving
180
+ # limits in Google Workspace.
181
+ # - https://support.google.com/mail/?p=MaxSizeError
182
+ ['552', '5.3.4', "exceeds google's message size limit of"],
183
+ ],
83
184
  'networkerror' => [
185
+ # - 554 5.4.6 Message exceeded 50 hops, this may indicate a mail loop.
186
+ # For more information, go to Gmail Help. https://support.google.com/mail/?p=MailLoop
187
+ ['554', '5.4.6', 'message exceeded 50 hops, this may indicate a mail loop'],
84
188
  ['554', '5.6.0', 'message exceeded 50 hops, this may indicate a mail loop'],
85
189
  ],
86
190
  'norelaying' => [
191
+ # - 550 5.7.0 Mail relay denied <ip-address>. Invalid credentials for relay for one of
192
+ # the domains in: <domain-name> (as obtained from HELO and MAIL FROM). Email is being
193
+ # sent from a domain or IP address which isn't registered in your Workspace account.
194
+ # Please login to your Workspace account and verify that your sending device IP
195
+ # address has been registered within the Workspace SMTP Relay Settings. For more
196
+ # information, go to SMTP relay service error messages.
197
+ # - https://support.google.com/a/answer/6140680#maildenied
87
198
  ['550', '5.7.0', 'mail relay denied'],
199
+
200
+ # - 550 5.7.1 Invalid credentials for relay <ip-address>. The IP address you've
201
+ # registered in your Workspace SMTP Relay service doesn't match the domain of the
202
+ # account this email is being sent from. If you are trying to relay mail from a
203
+ # domain that isn't registered under your Workspace account or has empty
204
+ # envelope-from:, you must configure your mail server either to use SMTP AUTH to
205
+ # identify the sending domain or to present one of your domain names in the HELO or
206
+ # EHLO command. For more information, go to SMTP relay service error messages.
207
+ # - https://support.google.com/a/answer/6140680#invalidcred
208
+ ['550', '5.7.1', 'invalid credentials for relay'],
209
+
210
+ # - 550 7.7.1 The IP you're using to send mail is not authorized to send email directly
211
+ # to our servers. Use the SMTP relay at your service provider instead. For more
212
+ # information, go to 'The IP you're using to send email is not authorized...'.
213
+ # - https://support.google.com/mail/?p=NotAuthorizedError
214
+ ['550', '5.7.1', "the ip you're using to send mail is not authorized to send email directly to our servers"],
88
215
  ],
89
216
  'notcompliantrfc' => [
90
- ['550', '5.7.1', 'this message is not rfc 5322 compliant'],
91
- ],
92
- 'policyviolation' => [
217
+ # - 550 5.7.1 Messages missing a valid address in the From: header, or having no From:
218
+ # header, are not accepted. For more information, go to Email sender guidelines and
219
+ # review RFC 5322 specifications.
220
+ # - https://support.google.com/mail/?p=RfcMessageNonCompliant
221
+ ['550', '5.7.1', 'messages missing a valid address in the from: header'],
93
222
  ['550', '5.7.1', 'messages with multiple addresses in from: header are not accepted'],
94
223
 
95
- # - 550 5.7.1 The user or domain that you are sending to (or from) has a policy that
96
- # prohibited the mail that you sent. Please contact your domain administrator for
97
- # further details.
98
- # For more information, visit https://support.google.com/a/answer/172179
99
- ['550', '5.7.1', 'the user or domain that you are sending to (or from) has a policy that prohibited'],
224
+ # - 550 5.7.1 This message is not RFC 5322 compliant because it has duplicate headers.
225
+ # To reduce the amount of spam sent to Gmail, this message has been blocked. For more
226
+ # information, go to Email sender guidelines and review RFC 5322 specifications.
227
+ # - https://support.google.com/mail/?p=RfcMessageNonCompliant
228
+ ['550', '5.7.1', 'this message is not rfc 5322 compliant'],
229
+
230
+ # - 550 5.7.1 Messages missing a valid Message-ID: header are not accepted. For more
231
+ # information, go to Email sender guidelines and review RFC 5322 specifications.
232
+ # - https://support.google.com/mail/?p=RfcMessageNonCompliant
233
+ ['550', '5.7.1', 'messages missing a valid message-id: header are not accepted'],
234
+
235
+ # - 550 5.7.1 The message contains a unicode character in a disallowed header.
236
+ # To review our message and header content guidelines, go to File types blocked in
237
+ # Gmail. https://support.google.com/mail/?p=BlockedMessage
238
+ ['550', '5.7.1', 'the message contains a unicode character in a disallowed header'],
100
239
 
240
+ # - 550 5.7.1 Encoded-word syntax is not permitted in message header header-name. To
241
+ # reduce the amount of spam sent to Gmail, this message has been blocked. For more
242
+ # information, go to Email sender guidelines and review RFC 5322 specifications.
243
+ # - https://support.google.com/mail/?p=RfcMessageNonCompliant
244
+ ['550', '5.7.1', 'encoded-word syntax is not permitted in message header'],
245
+
246
+ # - 553 5.1.7 The sender address address is not a valid RFC 5321 address. For more
247
+ # information, go to About SMTP error messages and review RFC 5321 specifications.
248
+ # - https://support.google.com/a/answer/3221692
249
+ ['553', '5.1.7', 'is not a valid rfc 5321 address'],
250
+
251
+ # - 554 5.6.0 Mail message is malformed. Not accepted. For more information, go to
252
+ # Email sender guidelines and review RFC 5322 specifications.
253
+ # - https://support.google.com/mail/?p=RfcMessageNonCompliant
254
+ ['554', '5.6.0', 'mail message is malformed. not accepted'],
255
+ ],
256
+ 'policyviolation' => [
101
257
  # - 552 5.7.0 Our system detected an illegal attachment on your message. Please visit
102
258
  # http://mail.google.com/support/bin/answer.py?answer=6590 to review our attachment
103
259
  # guidelines.
104
- ['552', '5.7.0', 'our system detected an illegal attachment on your message'],
260
+ ['552', '5.7.0', 'detected an illegal attachment on your message'],
105
261
 
106
262
  # - 552 5.7.0 This message was blocked because its content presents a potential securi-
107
263
  # ty issue. Please visit https://support.google.com/mail/?p=BlockedMessage to review
108
264
  # our message content and attachment content guidelines.
109
265
  ['552', '5.7.0', 'this message was blocked because its content presents a potential security issue'],
266
+
267
+ # - 550 5.7.1 The user or domain that you are sending to (or from) has a policy that
268
+ # prohibited the mail that you sent. Please contact your domain administrator for
269
+ # further details.
270
+ # For more information, visit https://support.google.com/a/answer/172179
271
+ ['550', '5.7.1', 'the user or domain that you are sending to (or from) has a policy that prohibited'],
272
+
273
+ # - 421 4.7.28 Gmail has detected this message exceeded its quota for sending messages
274
+ # with the same Message-ID:. To best protect our users, the message has been tempo-
275
+ # rarily rejected. For more information, go to Why has Gmail blocked my messages?.
276
+ # https://support.google.com/mail/answer/188131
277
+ ['421', '4.7.28', 'has detected this message exceeded its quota for sending messages with the same message-id:'],
110
278
  ],
111
279
  'rejected' => [
112
280
  # - 550 5.7.0, Mail Sending denied. This error occurs if the sender account is disabled
113
281
  # or not registered within your Google Workspace domain.
282
+ # - https://support.google.com/a/answer/6140680#maildenied
114
283
  ['550', '5.7.0', 'mail sending denied'],
115
-
116
284
  ['550', '5.7.1', 'unauthenticated email is not accepted from this domain'],
117
285
  ],
118
286
  'requireptr' => [
287
+ # - 550 5.7.1 This message does not meet IPv6 sending guidelines regarding PTR records
288
+ # and authentication. For more information, go to Email sender guidelines.
289
+ # https://support.google.com/mail/?p=IPv6AuthError
290
+ ['550', '5.7.1', 'this message does not meet ipv6 sending guidelines regarding ptr records and authentication'],
291
+
292
+ # - 421 4.7.0 The IP address sending this message does not have a PTR record, or the
293
+ # corresponding forward DNS entry does not point to the sending IP. To protect our
294
+ # users from spam, mail sent from your IP address has been temporarily rate limited.
295
+ # For more information, go to Email sender guidelines.
296
+ #
119
297
  # - 550 5.7.25 The IP address sending this message does not have a PTR record setup, or
120
298
  # the corresponding forward DNS entry does not point to the sending IP. As a policy,
121
299
  # Gmail does not accept messages from IPs with missing PTR records.
122
- ['550', '5.7.25', 'the ip address sending this message does not have a ptr record setup'],
300
+ # For more information, go to Email sender guidelines.
301
+ # - https://support.google.com/mail/answer/81126#ip-practices
302
+ #
303
+ # - 550 5.7.25 The sending IP does not match the IP address of the hostname specified
304
+ # in the pointer (PTR) record. For more information, go to Email sender guidelines.
305
+ # - https://support.google.com/mail/answer/81126#ip-practices
306
+ ['421', '4.7.0', 'the ip address sending this message does not have a ptr record'],
307
+ ['550', '5.7.25', 'the ip address sending this message does not have a ptr record'],
308
+ ['550', '5.7.25', 'the sending ip does not match the ip address of the hostname'],
123
309
  ],
124
310
  'securityerror' => [
311
+ # - 421 4.7.0 TLS required for RCPT domain, closing connection. For more information,
312
+ # go to Email encryption in transit. https://support.google.com/mail/answer/6330403
313
+ #
314
+ # - 454 4.7.0 Too many login attempts, please try again later. For more information, go
315
+ # to Add Gmail to another email client. https://support.google.com/mail/answer/7126229
125
316
  ['421', '4.7.0', 'tls required for rcpt domain, closing connection'],
317
+ ['454', '4.7.0', 'too many login attempts'],
318
+
319
+ # - 503 5.7.0 No identity changes permitted. For more information, go to About SMTP
320
+ # error messages.
126
321
  ['501', '5.5.2', 'cannot decode response'], # 2FA related error, maybe.
322
+ ['503', '5.7.0', 'no identity changes permitted'],
127
323
 
128
324
  # - 530 5.5.1 Authentication Required. For more information, visit
129
325
  # https://support.google.com/accounts/troubleshooter/2402620
326
+ # - https://support.google.com/mail/?p=WantAuthError
130
327
  ['530', '5.5.1', 'authentication required.'],
328
+ ['530', '5.7.0', 'authentication required.'],
131
329
 
132
330
  # - 535 5.7.1 Application-specific password required.
133
331
  # For more information, visit https://support.google.com/accounts/answer/185833
134
332
  ['535', '5.7.1', 'application-specific password required'],
333
+ ['535', '5.7.9', 'application-specific password required'],
135
334
 
136
335
  # - 535 5.7.1 Please log in with your web browser and then try again. For more infor-
137
336
  # mation, visit https://support.google.com/mail/bin/accounts/answer/78754
138
- ['535', '5.7.1', 'please log in with your web browser and then try again'],
337
+ ['535', '5.7.1', 'please log in with your web browser and then try again'],
338
+ ['534', '5.7.9', 'please log in with your web browser and then try again'],
339
+ ['534', '5.7.14', 'please log in through your web browser and then try again'],
139
340
 
140
341
  # - 535 5.7.1 Username and Password not accepted. For more information, visit
141
342
  # https://support.google.com/accounts/troubleshooter/2402620
142
343
  ['535', '5.7.1', 'username and password not accepted'],
344
+ ['535', '5.7.8', 'username and password not accepted'],
143
345
 
144
- ['550', '5.7.1', 'invalid credentials for relay'],
346
+ # - 421 4.7.29 This mail has been rate limited because TLS wasn't used. Gmail requires
347
+ # all large senders to use TLS/SSL during SMTP. For instructions on using TLS, go to
348
+ # TLS & SSL connections. https://support.google.com/a/answer/100181
349
+ ['421', '4.7.29', 'gmail requires all large senders to use tls/ssl during smtp'],
145
350
  ],
146
351
  'spamdetected' => [
352
+ # - 421 4.7.0 This message is suspicious due to the nature of the content or the links
353
+ # within. To best protect our users from spam, the message has been blocked. For more
354
+ # information, go to Why has Gmail blocked my messages?.
355
+ # https://support.google.com/mail/answer/188131
356
+ ['421', '4.7.0', 'this message is suspicious due to the nature of the content or the links within'],
357
+
147
358
  # - 550 5.7.1 Our system has detected that this message is likely unsolicited mail. To
148
359
  # reduce the amount of spam sent to Gmail, this message has been blocked.
149
360
  # For more information, visit https://support.google.com/mail/answer/188131
150
- ['550', '5.7.1', 'our system has detected that this message is likely unsolicited mail'],
361
+ # - https://support.google.com/mail/?p=UnsolicitedMessageError
362
+ ['550', '5.7.1', 'this message is likely unsolicited mail'],
151
363
  ],
152
364
  'speeding' => [
153
365
  # - 450 4.2.1 The user you are trying to contact is receiving mail too quickly. Please
154
366
  # resend your message at a later time. If the user is able to receive mail at that
155
367
  # time, your message will be delivered.
156
368
  # For more information, visit https://support.google.com/mail/answer/22839
369
+ #
370
+ # - 450 4.2.1 Peak SMTP relay limit exceeded for customer. This is a temporary error.
371
+ # For more information on SMTP relay limits, please contact your administrator or
372
+ # visit https://support.google.com/a/answer/6140680
157
373
  ['450', '4.2.1', 'is receiving mail too quickly'],
374
+ ['450', '4.2.1', 'peak smtp relay limit exceeded for customer'],
158
375
 
159
376
  # - 450 4.2.1 The user you are trying to contact is receiving mail at a rate that pre-
160
377
  # vents additional messages from being delivered. Please resend your message at a
161
378
  # later time. If the user is able to receive mail at that time, your message will be
162
379
  # delivered. For more information, visit https://support.google.com/mail/answer/6592
380
+ # - https://support.google.com/mail/?p=ReceivingRatePerm
163
381
  ['450', '4.2.1', 'is receiving mail at a rate that prevents additional messages from being delivered'],
164
382
  ['550', '5.2.1', 'is receiving mail at a rate that prevents additional messages from being delivered'],
165
383
 
166
- # - 450 4.2.1 Peak SMTP relay limit exceeded for customer. This is a temporary error.
167
- # For more information on SMTP relay limits, please contact your administrator or
168
- # visit https://support.google.com/a/answer/6140680
169
- ['450', '4.2.1', 'peak smtp relay limit exceeded for customer'],
170
-
171
384
  # - 550 5.4.5 Daily SMTP relay limit exceeded for user. For more information on SMTP
172
385
  # relay sending limits please contact your administrator or visit SMTP relay service
173
386
  # error messages.
174
- ['550', '5.4.5', 'daily smtp relay limit exceeded for user'],
175
- ['550', '5.4.5', 'daily sending quota exceeded'],
176
-
177
- # - 550 5.7.1 Daily SMTP relay limit exceeded for customer. For more information on
178
- # SMTP relay sending limits please contact your administrator or visit
179
387
  # https://support.google.com/a/answer/6140680
180
- ['550', '5.7.1', 'daily smtp relay limit exceeded for customer'],
388
+ # - https://support.google.com/a/answer/166852
389
+ ['550', '5.4.5', 'daily sending quota exceeded'],
390
+ ['550', '5.4.5', 'daily user sending limit exceeded'],
391
+ ['550', '5.4.5', 'daily smtp relay limit exceeded for'],
392
+ ['550', '5.7.1', 'daily smtp relay limit exceeded for'],
393
+ ['550', '5.7.1', 'daily smtp relay sending limit exceeded for'],
394
+ ['550', '5.7.1', 'this mail has been rate limited'],
181
395
  ],
182
396
  'suspend' => [
397
+ # - 550 5.2.1 The email account that you tried to reach is inactive.
398
+ # For more information, go to https://support.google.com/mail/?p=DisabledUser
183
399
  ['550', '5.2.1', 'the email account that you tried to reach is disabled'],
184
400
  ['550', '5.2.1', 'the email account that you tried to reach is inactive'],
185
401
  ],
186
402
  'syntaxerror' => [
187
- ['451', '4.5.0', 'smtp protocol violation, visit rfc 2821'],
188
- ['454', '4.5.0', 'smtp protocol violation, no commands allowed to pipeline after starttls'],
189
- ['454', '5.5.1', 'starttls may not be repeated'],
403
+ # - 523 5.7.10 SMTP protocol violation, no commands allowed to pipeline after STARTTLS.
404
+ # For more information, go to About SMTP error messages and review RFC 3207
405
+ # specifications.
406
+ ['451', '4.5.0', 'smtp protocol violation'],
407
+ ['454', '4.5.0', 'smtp protocol violation, no commands allowed to pipeline after starttls'],
408
+ ['525', '5.7.10', 'smtp protocol violation, no commands allowed to pipeline after starttls'],
409
+ ['535', '5.5.4', 'optional argument not permitted for that auth mode'],
410
+ ['454', '5.5.1', 'starttls may not be repeated'],
411
+
412
+ # - 501 5.5.2 Syntax error, cannot decode response. For more information, go to About
413
+ # SMTP error messages.
414
+ # - https://support.google.com/a/answer/3221692
415
+ # - 501 5.7.11 Syntax error (no parameters allowed). For more information, go to About
416
+ # SMTP error messages and review RFC 3207 specifications.
417
+ ['501', '5.7.11', 'syntax error'],
418
+ ['501', '5.5.2', 'syntax error'],
419
+ ['555', '5.5.2', 'syntax error'],
420
+
421
+ # - 503 5.5.1 Bad sequence of commands. For more information, go to About SMTP error
422
+ # messages and review RFC 5321 specifications.
423
+ # - https://support.google.com/mail/?p=helo
424
+ #
425
+ # - 503 5.5.1 No DATA after BDAT. A mail transaction protocol command was issued out of
426
+ # sequence. For more information, go to About SMTP error messages and review RFC 3030
427
+ # specifications.
428
+ # - https://support.google.com/a/answer/3221692
190
429
  ['502', '5.5.1', 'too many unrecognized commands, goodbye'],
191
430
  ['502', '5.5.1', 'unimplemented command'],
192
431
  ['502', '5.5.1', 'unrecognized command'],
432
+ ['503', '5.5.1', 'bad sequence of commands'],
193
433
  ['503', '5.5.1', 'ehlo/helo first'],
194
434
  ['503', '5.5.1', 'mail first'],
195
435
  ['503', '5.5.1', 'rcpt first'],
196
- ['503', '5.7.0', 'no identity changes permitted'],
436
+ ['503', '5.5.1', 'no data after bdat'],
197
437
  ['504', '5.7.4', 'unrecognized authentication type'],
438
+ ['504', '5.7.4', 'xoauth is no longer supported'],
439
+
440
+ # - 530 5.7.0 Must issue a STARTTLS command first. For more information, go to About
441
+ # SMTP error messages and review RFC 3207 specifications.
198
442
  ['530', '5.7.0', 'must issue a starttls command first'],
199
- ['535', '5.5.4', 'optional argument not permitted for that auth mode'],
200
443
  ['554', '5.7.0', 'too many unauthenticated commands'],
201
- ['555', '5.5.2', 'syntax error'],
202
444
  ],
203
445
  'systemerror' => [
446
+ # About SMTP error messages, https://support.google.com/a/answer/3221692
204
447
  ['421', '4.3.0', 'temporary system problem'],
205
448
  ['421', '4.7.0', 'temporary system problem'],
206
449
  ['421', '4.4.5', 'server busy'],
450
+
451
+ # - 451 4.3.0 Multiple destination domains per transaction is unsupported. Please try
452
+ # again. For more information, go to About SMTP error messages and review RFC 5321
453
+ # specifications. https://support.google.com/a/answer/3221692
454
+ ['451', '4.3.0', 'multiple destination domains per transaction is unsupported'],
455
+ ['451', '4.3.0', 'mail server has temporarily rejected this message'],
207
456
  ['451', '4.3.0', 'mail server temporarily rejected message'],
208
- ['454', '4.7.0', 'cannot authenticate due to temporary system problem'],
209
457
 
210
458
  # - 452 4.5.3 Domain policy size per transaction exceeded, please try this recipient in
211
459
  # a separate transaction. This message means the email policy size (size of policies,
212
460
  # number of policies, or both) for the recipient domain has been exceeded.
461
+ # https://support.google.com/a/answer/7282433
213
462
  ['452', '4.5.3', 'domain policy size per transaction exceeded'],
463
+
464
+ # - 454 4.7.0 Cannot authenticate due to a temporary system problem. Try again later.
465
+ # For more information, go to About SMTP error messages.
466
+ # https://support.google.com/a/answer/3221692
467
+ ['454', '4.7.0', 'cannot authenticate due to temporary system problem'],
214
468
  ],
215
469
  'toomanyconn' => [
216
- ['451', '4.3.0', 'multiple destination domains per transaction is unsupported'],
217
-
218
470
  # - 452 4.5.3 Your message has too many recipients. For more information regarding
219
471
  # Google's sending limits, visit https://support.google.com/mail/answer/6592
472
+ # https://support.google.com/mail/?p=TooManyRecipientsError
220
473
  ['452', '4.5.3', 'your message has too many recipients'],
474
+ ['550', '5.5.3', 'too many recipients for this sender'],
221
475
  ],
222
476
  'userunknown' => [
223
477
  # - 550 5.1.1 The email account that you tried to reach does not exist. Please try dou-
224
478
  # ble-checking the recipient's email address for typos or unnecessary spaces.
225
479
  # For more information, visit https://support.google.com/mail/answer/6596
480
+ # - https://support.google.com/mail/?p=NoSuchUser
226
481
  ['550', '5.1.1', 'the email account that you tried to reach does not exist'],
227
482
 
228
483
  # - 553 5.1.2 We weren't able to find the recipient domain. Please check for any spell-
229
484
  # ing errors, and make sure you didn't enter any spaces, periods, or other punctua-
230
485
  # tion after the recipient's email address.
486
+ # - https://support.google.com/mail/?p=BadRcptDomain
231
487
  ['553', '5.1.2', "we weren't able to find the recipient domain"],
488
+
489
+ # - 553 5.1.3 The recipient address <address> is not a valid RFC 5321 address. For more
490
+ # information, go to About SMTP error messages and review RFC 5321 specifications.
491
+ # - https://support.google.com/a/answer/3221692
492
+ ['553', '5.1.3', 'is not a valid rfc 5321 address'],
232
493
  ],
233
494
  }.freeze
234
495
 
@@ -7,6 +7,7 @@ module Sisimai
7
7
  class << self
8
8
  MessagesOf = {
9
9
  # https://community.mimecast.com/s/article/Mimecast-SMTP-Error-Codes-842605754
10
+ # https://community.mimecast.com/s/article/email-security-cloud-gateway-mimecast-smtp-error-codes
10
11
  'authfailure' => [
11
12
  # - The inbound message has been rejected because the originated IP address isn't list-
12
13
  # ed in the published SPF records for the sending domain.
@@ -76,6 +77,12 @@ module Sisimai
76
77
  [554, 'maximum email size exceeded'],
77
78
  ],
78
79
  'networkerror' => [
80
+ # - The recipients' domains have MX records configured incorrectly
81
+ # - Check and remove any MX records that point to hostnames with outbound references.
82
+ # Only Inbound smart hosts are supported on MX records.
83
+ [451, 'the incorrect hostname used for inbounds'],
84
+ [550, 'the incorrect hostname used for inbounds'],
85
+
79
86
  # - The message has too many "received headers" as it has been forwarded across multi-
80
87
  # ple hops. Once 25 hops have been reached, the email is rejected.
81
88
  # - Investigate the email addresses in the communication pairs, to see what forwarders
@@ -135,8 +142,8 @@ module Sisimai
135
142
 
136
143
  # - A personal block policy is in place for the email address/domain.
137
144
  # - Remove the email address/domain from the Managed Senders list.
138
- [550, 'envelope blocked user entry'],
139
- [550, 'envelope blocked user domain entry'],
145
+ [550, 'envelope blocked - user entry'],
146
+ [550, 'envelope blocked - user domain entry'],
140
147
  [550, 'rejected by header-based manually blocked senders - block for manual block'],
141
148
 
142
149
  # - A Block Sender Policy has been applied to reject emails based on the Header From or
@@ -593,6 +593,9 @@ module Sisimai
593
593
  '5.7.25' => 'requireptr', # Reverse DNS validation failed
594
594
  '5.7.26' => 'authfailure', # Multiple authentication checks failed
595
595
  '5.7.27' => 'notaccept', # MX resource record of a destination host is Null MX: RFC7505
596
+ '5.7.28' => 'spamdetected', # The message appears to be part of a mail flood of similar abusive messages.
597
+ '5.7.29' => 'authfailure', # This status code may be returned when a message fails ARC validation.
598
+ '5.7.30' => 'securityerror', # REQUIRETLS support required
596
599
  }.freeze
597
600
 
598
601
  InternalCode = {
@@ -1,4 +1,4 @@
1
1
  # Define the version number of Sisimai
2
2
  module Sisimai
3
- VERSION = '5.0.0'.freeze
3
+ VERSION = '5.0.2'.freeze
4
4
  end