sisimai 5.5.0 → 5.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/ChangeLog.md +21 -0
  3. data/LICENSE +1 -1
  4. data/README-JA.md +15 -12
  5. data/README.md +16 -13
  6. data/lib/sisimai/fact.rb +17 -2
  7. data/lib/sisimai/lhost/amazonses.rb +1 -1
  8. data/lib/sisimai/lhost/einsundeins.rb +1 -1
  9. data/lib/sisimai/lhost/exchange2007.rb +2 -2
  10. data/lib/sisimai/lhost/exim.rb +6 -8
  11. data/lib/sisimai/lhost/qmail.rb +5 -5
  12. data/lib/sisimai/message.rb +2 -0
  13. data/lib/sisimai/reason/authfailure.rb +9 -13
  14. data/lib/sisimai/reason/badreputation.rb +7 -7
  15. data/lib/sisimai/reason/blocked.rb +57 -83
  16. data/lib/sisimai/reason/contenterror.rb +14 -8
  17. data/lib/sisimai/reason/{mesgtoobig.rb → emailtoolarge.rb} +22 -25
  18. data/lib/sisimai/reason/expired.rb +16 -23
  19. data/lib/sisimai/reason/filtered.rb +13 -17
  20. data/lib/sisimai/reason/hasmoved.rb +2 -1
  21. data/lib/sisimai/reason/hostunknown.rb +16 -19
  22. data/lib/sisimai/reason/mailboxfull.rb +27 -49
  23. data/lib/sisimai/reason/networkerror.rb +16 -16
  24. data/lib/sisimai/reason/norelaying.rb +19 -19
  25. data/lib/sisimai/reason/notaccept.rb +6 -8
  26. data/lib/sisimai/reason/notcompliantrfc.rb +5 -9
  27. data/lib/sisimai/reason/policyviolation.rb +11 -25
  28. data/lib/sisimai/reason/ratelimited.rb +62 -0
  29. data/lib/sisimai/reason/rejected.rb +45 -59
  30. data/lib/sisimai/reason/requireptr.rb +13 -25
  31. data/lib/sisimai/reason/securityerror.rb +13 -19
  32. data/lib/sisimai/reason/spamdetected.rb +51 -101
  33. data/lib/sisimai/reason/suspend.rb +26 -24
  34. data/lib/sisimai/reason/systemerror.rb +19 -23
  35. data/lib/sisimai/reason/systemfull.rb +1 -1
  36. data/lib/sisimai/reason/userunknown.rb +79 -112
  37. data/lib/sisimai/reason/virusdetected.rb +6 -8
  38. data/lib/sisimai/reason.rb +14 -14
  39. data/lib/sisimai/rhost/apple.rb +5 -5
  40. data/lib/sisimai/rhost/cloudflare.rb +2 -0
  41. data/lib/sisimai/rhost/cox.rb +22 -20
  42. data/lib/sisimai/rhost/facebook.rb +16 -16
  43. data/lib/sisimai/rhost/franceptt.rb +8 -3
  44. data/lib/sisimai/rhost/godaddy.rb +33 -15
  45. data/lib/sisimai/rhost/google.rb +63 -64
  46. data/lib/sisimai/rhost/iua.rb +1 -1
  47. data/lib/sisimai/rhost/messagelabs.rb +12 -12
  48. data/lib/sisimai/rhost/microsoft.rb +82 -86
  49. data/lib/sisimai/rhost/mimecast.rb +34 -34
  50. data/lib/sisimai/rhost/nttdocomo.rb +2 -2
  51. data/lib/sisimai/rhost/spectrum.rb +7 -7
  52. data/lib/sisimai/rhost/tencent.rb +9 -11
  53. data/lib/sisimai/rhost/yahooinc.rb +7 -8
  54. data/lib/sisimai/smtp/command.rb +2 -0
  55. data/lib/sisimai/smtp/status.rb +50 -90
  56. data/lib/sisimai/string.rb +0 -15
  57. data/lib/sisimai/version.rb +1 -1
  58. metadata +4 -6
  59. data/lib/sisimai/reason/exceedlimit.rb +0 -47
  60. data/lib/sisimai/reason/speeding.rb +0 -47
  61. data/lib/sisimai/reason/toomanyconn.rb +0 -59
@@ -14,8 +14,6 @@ module Sisimai
14
14
  # RCPT TO command)
15
15
  module UserUnknown
16
16
  class << self
17
- require 'sisimai/string'
18
-
19
17
  PreMatches = %w[NoRelaying Blocked MailboxFull HasMoved Rejected NotAccept]
20
18
  ModulePath = {
21
19
  'Sisimai::Reason::NoRelaying' => 'sisimai/reason/norelaying',
@@ -26,119 +24,87 @@ module Sisimai
26
24
  'Sisimai::Reason::NotAccept' => 'sisimai/reason/notaccept',
27
25
  }
28
26
  Index = [
29
- '#5.1.1 bad address',
30
- '550 address invalid',
31
- '5.1.0 address rejected.',
32
- 'address does not exist',
33
- 'address not present in directory',
34
- 'address unknown',
27
+ "#5.1.1 bad address",
28
+ "550 address invalid",
29
+ "5.1.0 address rejected.",
30
+ "address not present in directory",
31
+ "address unknown",
32
+ "badrcptto",
35
33
  "can't accept user",
36
- 'does not exist.',
37
- 'destination addresses were unknown',
38
- 'destination server rejected recipients',
39
- 'email address does not exist',
40
- 'email address could not be found',
41
- 'invalid address',
42
- 'invalid mailbox',
43
- 'invalid mailbox path',
44
- 'invalid recipient',
45
- 'is not a known user',
46
- 'is not a valid mailbox',
47
- 'is not an active address at this host',
48
- 'mailbox does not exist',
49
- 'mailbox invalid',
50
- 'mailbox is inactive',
51
- 'mailbox is unavailable',
52
- 'mailbox not present',
53
- 'mailbox not found',
54
- 'mailbox unavaiable',
55
- 'nessun utente simile in questo indirizzo',
56
- 'no account by that name here',
57
- 'no existe dicha persona',
58
- 'no existe ese usuario ',
59
- 'no mail box available for this user',
60
- 'no mailbox by that name is currently available',
61
- 'no mailbox found',
62
- 'no such address here',
63
- 'no such mailbox',
64
- 'no such person at this address',
65
- 'no such recipient',
66
- 'no such user',
67
- 'no thank you rejected: account unavailable',
68
- 'no valid recipients, bye',
69
- 'not a valid recipient',
70
- 'not a valid user here',
71
- 'not a local address',
72
- 'not email addresses',
73
- 'recipient address rejected. (in reply to rcpt to command)',
74
- 'recipient address rejected: access denied',
75
- 'recipient address rejected: invalid user',
76
- 'recipient address rejected: invalid-recipient',
77
- 'recipient address rejected: unknown user',
78
- 'recipient address rejected: userunknown',
79
- 'recipient does not exist',
80
- 'recipient is not accepted',
81
- 'recipient is not local',
82
- 'recipient not exist',
83
- 'recipient not found',
84
- 'recipient not ok',
85
- 'recipient refuses to accept your mail',
86
- 'recipient unknown',
87
- 'requested action not taken: mailbox unavailable',
88
- 'resolver.adr.recipient notfound',
89
- 'sorry, user unknown',
90
- 'sorry, badrcptto',
91
- 'sorry, no mailbox here by that name',
92
- 'sorry, your envelope recipient has been denied',
93
- "that domain or user isn't in my list of allowed rcpthosts",
94
- 'the email account that you tried to reach does not exist',
95
- 'the following recipients was undeliverable',
96
- "the user's email name is not found",
97
- 'there is no one at this address',
98
- 'this address no longer accepts mail',
99
- 'this email address is wrong or no longer valid',
100
- 'this recipient is in my badrecipientto list',
101
- 'this recipient is not in my validrcptto list',
102
- 'this spectator does not exist',
103
- 'unknown mailbox',
104
- 'unknown recipient',
105
- 'unknown user',
106
- 'user does not exist',
107
- 'user missing home directory',
108
- 'user not active',
109
- 'user not exist',
110
- 'user not found',
111
- 'user not known',
112
- 'user unknown',
113
- 'utilisateur inconnu !',
114
- 'vdeliver: invalid or unknown virtual user',
115
- 'weil die adresse nicht gefunden wurde oder keine e-mails empfangen kann',
116
- 'your envelope recipient is in my badrcptto list',
34
+ "destination addresses were unknown",
35
+ "destination server rejected recipients",
36
+ "domain or user isn't in my list of allowed rcpthosts",
37
+ "email account that you tried to reach does not exist",
38
+ "email address could not be found",
39
+ "invalid address",
40
+ "invalid mailbox",
41
+ "is not a known user",
42
+ "is not a valid mailbox",
43
+ "mailbox does not exist",
44
+ "mailbox invalid",
45
+ "mailbox not present",
46
+ "mailbox not found",
47
+ "nessun utente simile in questo indirizzo",
48
+ "no account by that name here",
49
+ "no existe dicha persona",
50
+ "no existe ese usuario ",
51
+ "no such recipient",
52
+ "no such user",
53
+ "no thank you rejected: account unavailable",
54
+ "no valid recipients, bye",
55
+ "not a valid recipient",
56
+ "not a valid user here",
57
+ "not a local address",
58
+ "not email addresses",
59
+ "recipient address rejected. (in reply to rcpt to command)",
60
+ "recipient address rejected: access denied",
61
+ "recipient address rejected: userunknown",
62
+ "recipient is in my badrecipientto list",
63
+ "recipient is not accepted",
64
+ "recipient is not in my validrcptto list",
65
+ "recipient is not local",
66
+ "recipient not ok",
67
+ "recipient refuses to accept your mail",
68
+ "recipient unknown",
69
+ "recipients was undeliverable",
70
+ "spectator does not exist",
71
+ "there is no one at this address",
72
+ "unknown mailbox",
73
+ "unknown recipient",
74
+ "unknown user",
75
+ "user missing home directory",
76
+ "user not known",
77
+ "user unknown",
78
+ "utilisateur inconnu !",
79
+ "weil die adresse nicht gefunden wurde oder keine e-mails empfangen kann",
80
+ "your envelope recipient has been denied",
117
81
  ].freeze
118
82
  Pairs = [
119
- ['<', '> not found'],
120
- ['<', '>... blocked by '],
121
- ['account ', ' does not exist at the organization'],
122
- ['adresse d au moins un destinataire invalide. invalid recipient.', '416'],
123
- ['adresse d au moins un destinataire invalide. invalid recipient.', '418'],
124
- ['bad', 'recipient'],
125
- ['mailbox ', 'does not exist'],
126
- ['mailbox ', 'unavailable or access denied'],
127
- ['no ', ' in name directory'],
128
- ['non', 'existent user'],
129
- ['rcpt <', ' does not exist'],
130
- ['rcpt (', 't exist '],
131
- ['recipient ', ' was not found in'],
132
- ['recipient address rejected: user ', ' does not exist'],
133
- ['recipient address rejected: user unknown in ', ' table'],
134
- ['said: 550-5.1.1 ', ' user unknown '],
135
- ['said: 550 5.1.1 ', ' user unknown '],
83
+ ["<", "> not found"],
84
+ ["<", ">... blocked by "],
85
+ ["account ", " does not exist at the organization"],
86
+ ["address", " no longer"],
87
+ ["address", " not exist"],
88
+ ["bad", "recipient"],
89
+ ["invalid", "recipient"],
90
+ ["invalid", "user"],
91
+ ["mailbox ", "does not exist"],
92
+ ["mailbox ", "unavailable"],
93
+ ["no ", " in name directory"],
94
+ ["no ", "mail", "box "],
95
+ ["no ", "such", "address"],
96
+ ["non", "existent user"],
97
+ ["rcpt <", " does not exist"],
98
+ ["rcpt (", "t exist "],
99
+ ["recipient no", "found"],
100
+ ["recipient ", " not exist"],
101
+ ["recipient ", " was not found in"],
136
102
  ["this user doesn't have a ", " account"],
137
- ['unknown e', 'mail address'],
138
- ['unknown local', 'part'],
139
- ['user ', ' was not found'],
140
- ['user ', ' does not exist'],
141
- ['user (', ') unknown'],
103
+ ["unknown e", "mail address"],
104
+ ["unknown local", "part"],
105
+ ["user ", " not exist"],
106
+ ["user ", "not found"],
107
+ ["user (", ") unknown"],
142
108
  ].freeze
143
109
 
144
110
  def text; return 'userunknown'; end
@@ -160,7 +126,8 @@ module Sisimai
160
126
  # false: is not unknown user.
161
127
  # @see http://www.ietf.org/rfc/rfc2822.txt
162
128
  def true(argvs)
163
- return true if argvs['reason'] == 'userunknown'
129
+ return true if argvs['reason'] == 'userunknown'
130
+ return false if Sisimai::SMTP::Command::BeforeRCPT.include?(argvs['command'])
164
131
 
165
132
  tempreason = Sisimai::SMTP::Status.name(argvs['deliverystatus'])
166
133
  return false if tempreason == 'suspend'
@@ -14,13 +14,10 @@ module Sisimai
14
14
  #
15
15
  module VirusDetected
16
16
  class << self
17
- Index = [
18
- 'it has a potentially executable attachment',
19
- 'the message was rejected because it contains prohibited virus or spam content',
20
- 'this form of attachment has been used by recent viruses or other malware',
21
- 'virus detected',
22
- 'virus phishing/malicious_url detected',
23
- 'your message was infected with a virus',
17
+ Index = ["it has a potentially executable attachment"].freeze
18
+ Pairs = [
19
+ ["message was ", "ected", " virus"],
20
+ ["virus", " detected"],
24
21
  ].freeze
25
22
 
26
23
  def text; return 'virusdetected'; end
@@ -33,6 +30,7 @@ module Sisimai
33
30
  def match(argv1)
34
31
  return false if argv1.nil? || argv1.empty?
35
32
  return true if Index.any? { |a| argv1.include?(a) }
33
+ return true if Pairs.any? { |a| Sisimai::String.aligned(argv1, a) }
36
34
  return false
37
35
  end
38
36
 
@@ -47,7 +45,7 @@ module Sisimai
47
45
  # to be sent before the SMTP DATA command because all the MTAs read the headers and the
48
46
  # entire message body after the DATA command.
49
47
  return true if argvs['reason'] == 'virusdetected'
50
- return false if %w[CONN EHLO HELO MAIL RCPT].include?(argvs['command'])
48
+ return false if Sisimai::SMTP::Command::ExceptDATA.include?(argvs['command'])
51
49
  return match(argvs['diagnosticcode'].downcase)
52
50
  end
53
51
 
@@ -7,10 +7,10 @@ module Sisimai
7
7
  # @return [Array] Reason list
8
8
  def index
9
9
  return %w[
10
- AuthFailure BadReputation Blocked ContentError ExceedLimit Expired FailedSTARTTLS Filtered
11
- HasMoved HostUnknown MailboxFull MailerError MesgTooBig NetworkError NotAccept NotCompliantRFC
12
- OnHold Rejected NoRelaying Speeding SpamDetected VirusDetected PolicyViolation SecurityError
13
- Suspend RequirePTR SystemError SystemFull TooManyConn Suppressed UserUnknown SyntaxError
10
+ AuthFailure BadReputation Blocked ContentError EmailTooLarge Expired FailedSTARTTLS Filtered
11
+ HasMoved HostUnknown MailboxFull MailerError NetworkError NotAccept NotCompliantRFC RateLimited
12
+ OnHold Rejected NoRelaying SpamDetected VirusDetected PolicyViolation SecurityError Suspend
13
+ RequirePTR SystemError SystemFull Suppressed UserUnknown SyntaxError
14
14
  ]
15
15
  end
16
16
 
@@ -46,20 +46,20 @@ module Sisimai
46
46
  GetRetried = Sisimai::Reason.retry
47
47
  ClassOrder = [
48
48
  %w[
49
- MailboxFull MesgTooBig ExceedLimit Suspend HasMoved NoRelaying AuthFailure UserUnknown
50
- Filtered RequirePTR NotCompliantRFC BadReputation ContentError Rejected HostUnknown
51
- SpamDetected Speeding TooManyConn Blocked
49
+ MailboxFull EmailTooLarge Suspend HasMoved NoRelaying AuthFailure UserUnknown Filtered
50
+ RequirePTR NotCompliantRFC BadReputation ContentError Rejected HostUnknown SpamDetected
51
+ RateLimited Blocked
52
52
  ],
53
53
  %w[
54
- MailboxFull AuthFailure BadReputation Speeding SpamDetected VirusDetected PolicyViolation
55
- NoRelaying SystemError NetworkError Suspend ContentError SystemFull NotAccept Expired
56
- FailedSTARTTLS SecurityError Suppressed MailerError
54
+ MailboxFull AuthFailure BadReputation SpamDetected VirusDetected PolicyViolation NoRelaying
55
+ SystemError NetworkError Suspend ContentError SystemFull NotAccept Expired FailedSTARTTLS
56
+ SecurityError Suppressed MailerError
57
57
  ],
58
58
  %w[
59
- MailboxFull MesgTooBig ExceedLimit Suspend UserUnknown Filtered Rejected HostUnknown
60
- SpamDetected Speeding TooManyConn Blocked SpamDetected AuthFailure FailedSTARTTLS
61
- SecurityError SystemError NetworkError Suspend Expired ContentError HasMoved SystemFull
62
- NotAccept MailerError NoRelaying Suppressed SyntaxError OnHold
59
+ MailboxFull EmailTooLarge Suspend UserUnknown Filtered Rejected HostUnknown SpamDetected
60
+ RateLimited Blocked SpamDetected AuthFailure FailedSTARTTLS SecurityError SystemError
61
+ NetworkError Suspend Expired ContentError HasMoved SystemFull NotAccept MailerError
62
+ NoRelaying Suppressed SyntaxError OnHold
63
63
  ]
64
64
  ]
65
65
 
@@ -44,15 +44,15 @@ module Sisimai
44
44
  # Please visit https://support.apple.com/en-us/HT204137
45
45
  'due to local policy',
46
46
  ],
47
- 'rejected' => [
48
- # - 450 4.1.8 <kijitora@example.jp>: Sender address rejected: Domain not found
49
- 'sender address rejected',
50
- ],
51
- 'speeding' => [
47
+ 'ratelimited' => [
52
48
  # - 421 4.7.1 Messages to ****@icloud.com deferred due to excessive volume.
53
49
  # Try again later - https://support.apple.com/en-us/HT204137
54
50
  'due to excessive volume',
55
51
  ],
52
+ 'rejected' => [
53
+ # - 450 4.1.8 <kijitora@example.jp>: Sender address rejected: Domain not found
54
+ 'sender address rejected',
55
+ ],
56
56
  'suspend' => [
57
57
  # - https://support.apple.com/guide/icloud/stop-using-or-reactivate-addresses-mm3adb030cbf/icloud
58
58
  # - 550 5.1.1 <****@icloud.com>: inactive email address (in reply to RCPT TO command)
@@ -6,6 +6,8 @@ module Sisimai
6
6
  module Cloudflare
7
7
  class << self
8
8
  MessagesOf = {
9
+ # - 554 <YOUR_IP_ADDRESS> found on one or more RBLs (abusixip). Refer to
10
+ # https://developers.cloudflare.com/email-routing/postmaster/#spam-and-abusive-traffic/
9
11
  "blocked" => ["found on one or more DNSBLs"],
10
12
  "systemerror" => ["Upstream error"],
11
13
  }.freeze
@@ -37,13 +37,13 @@ module Sisimai
37
37
  # - There is a limit to the number of concurrent SMTP connections per IP address to
38
38
  # protect the systems against attack. Ensure that the sending email server is not
39
39
  # opening more than 10 concurrent connections to avoid reaching this limit.
40
- 'CXCNCT' => 'toomanyconn',
40
+ 'CXCNCT' => 'ratelimited',
41
41
 
42
42
  # CXMXRT
43
43
  # - The sender has sent email to too many recipients and needs to wait before sending
44
44
  # more email.
45
45
  # - The email sender has exceeded the maximum number of sent email allowed.
46
- 'CXMXRT' => 'toomanyconn',
46
+ 'CXMXRT' => 'ratelimited',
47
47
 
48
48
  # CDRBL
49
49
  # - The sending IP address has been temporarily blocked by Cox due to exhibiting spam-like
@@ -87,31 +87,18 @@ module Sisimai
87
87
  'cox too many bad commands from',
88
88
  'too many invalid recipients',
89
89
  ],
90
- 'requireptr' => [
91
- # - The reverse DNS check of the sending server IP address has failed.
92
- # - Cox requires that all connecting email servers contain valid reverse DNS PTR records.
93
- 'dns check failure - try again later',
94
- 'rejected - no rdns',
95
- ],
96
- 'policyviolation' => [
97
- # - The sending server has attempted to communicate too soon within the SMTP transaction
90
+ 'contenterror' => [
98
91
  # - The message has been rejected because it contains an attachment with one of the
99
92
  # following prohibited file types, which commonly contain viruses: .shb, .shs, .vbe,
100
93
  # .vbs, .wsc, .wsf, .wsh, .pif, .msc, .msi, .msp, .reg, .sct, .bat, .chm, .isp, .cpl,
101
94
  # .js, .jse, .scr, .exe.
102
- 'esmtp no data before greeting',
103
95
  'attachment extension is forbidden',
104
96
  ],
105
- 'rejected' => [
106
- # Cox requires that all sender domains resolve to a valid MX or A-record within DNS.
107
- 'sender rejected',
108
- ],
109
- 'systemerror' => [
110
- # - Our systems are experiencing an issue which is causing a temporary inability to
111
- # accept new email.
112
- 'esmtp server temporarily not available',
97
+ 'policyviolation' => [
98
+ # - The sending server has attempted to communicate too soon within the SMTP transaction
99
+ 'esmtp no data before greeting',
113
100
  ],
114
- 'toomanyconn' => [
101
+ 'ratelimited' => [
115
102
  # - The sending IP address has exceeded the five maximum concurrent connection limit.
116
103
  # - The SMTP connection has exceeded the 100 email message threshold and was disconnected.
117
104
  # - The sending IP address has exceeded one of these rate limits and has been temporarily
@@ -120,6 +107,21 @@ module Sisimai
120
107
  'requested action aborted: try again later',
121
108
  'message threshold exceeded',
122
109
  ],
110
+ 'rejected' => [
111
+ # Cox requires that all sender domains resolve to a valid MX or A-record within DNS.
112
+ 'sender rejected',
113
+ ],
114
+ 'requireptr' => [
115
+ # - The reverse DNS check of the sending server IP address has failed.
116
+ # - Cox requires that all connecting email servers contain valid reverse DNS PTR records.
117
+ 'dns check failure - try again later',
118
+ 'rejected - no rdns',
119
+ ],
120
+ 'systemerror' => [
121
+ # - Our systems are experiencing an issue which is causing a temporary inability to
122
+ # accept new email.
123
+ 'esmtp server temporarily not available',
124
+ ],
123
125
  'userunknown' => [
124
126
  # - The intended recipient is not a valid Cox Email account.
125
127
  'recipient rejected',
@@ -15,14 +15,18 @@ module Sisimai
15
15
  "POL-P1", # Your mail server's IP Address is listed on the Spamhaus PBL.
16
16
  "POL-P2", # Facebook will no longer accept mail from your mail server's IP Address.
17
17
  "POL-P3", # Facebook is not accepting messages from your mail server. This will persist for 4 to 8 hours.
18
- "POL-P4", # Facebook is not accepting messages from your mail server. This will persist for 24 to 48 hours.
19
- "POL-T1", # Facebook is not accepting messages from your mail server, but they may be retried later. This will persist for 1 to 2 hours.
20
- "POL-T2", # Facebook is not accepting messages from your mail server, but they may be retried later. This will persist for 4 to 8 hours.
21
- "POL-T3", # Facebook is not accepting messages from your mail server, but they may be retried later. This will persist for 24 to 48 hours.
18
+ "POL-P4", # ". This will persist for 24 to 48 hours.
19
+ "POL-T1", # ", but they may be retried later. This will persist for 1 to 2 hours.
20
+ "POL-T2", # ", but they may be retried later. This will persist for 4 to 8 hours.
21
+ "POL-T3", # ", but they may be retried later. This will persist for 24 to 48 hours.
22
22
  ],
23
23
  "contenterror" => [
24
24
  "MSG-P2", # The message contains an attachment type that Facebook does not accept.
25
25
  ],
26
+ "emailtoolarge" => [
27
+ "MSG-P1", # The message exceeds Facebook's maximum allowed size.
28
+ "INT-P2", # The message exceeds Facebook's maximum allowed size.
29
+ ],
26
30
  "filtered" => [
27
31
  "RCP-P2", # The attempted recipient's preferences prevent messages from being delivered.
28
32
  "RCP-P3", # The attempted recipient's privacy settings blocked the delivery.
@@ -30,16 +34,19 @@ module Sisimai
30
34
  "mailboxfull" => [
31
35
  "INT-P7", # The attempted recipient has exceeded their storage quota.
32
36
  ],
33
- "mesgtoobig" => [
34
- "MSG-P1", # The message exceeds Facebook's maximum allowed size.
35
- "INT-P2", # The message exceeds Facebook's maximum allowed size.
36
- ],
37
37
  "notcompliantrfc" => [
38
38
  "MSG-P3", # The message contains multiple instances of a header field that can only be present once.
39
39
  ],
40
40
  "policyviolation" => [
41
41
  "POL-P8", # The message does not comply with Facebook's abuse policies and will not be accepted.
42
42
  ],
43
+ "ratelimited" => [
44
+ "CON-T1", # Facebook's mail server currently has too many connections open to allow another one.
45
+ "CON-T2", # Your mail server currently has too many connections open to Facebook's mail servers.
46
+ "CON-T3", # Your mail server has opened too many new connections to Facebook's mail servers in a short period of time.
47
+ "CON-T4", # Your mail server has exceeded the maximum number of recipients for its current connection.
48
+ "MSG-T1", # The number of recipients on the message exceeds Facebook's allowed maximum.
49
+ ],
43
50
  "rejected" => [
44
51
  "DNS-P1", # Your SMTP MAIL FROM domain does not exist.
45
52
  "DNS-P2", # Your SMTP MAIL FROM domain does not have an MX record.
@@ -59,17 +66,10 @@ module Sisimai
59
66
  "RCP-T1", # The attempted recipient address is not currently available due to an internal system issue.
60
67
  "INT-Tx", # These codes indicate a temporary issue internal to Facebook's system.
61
68
  ],
62
- "toomanyconn" => [
63
- "CON-T1", # Facebook's mail server currently has too many connections open to allow another one.
64
- "CON-T2", # Your mail server currently has too many connections open to Facebook's mail servers.
65
- "CON-T3", # Your mail server has opened too many new connections to Facebook's mail servers in a short period of time.
66
- "CON-T4", # Your mail server has exceeded the maximum number of recipients for its current connection.
67
- "MSG-T1", # The number of recipients on the message exceeds Facebook's allowed maximum.
68
- ],
69
69
  "userunknown" => [
70
70
  "RCP-P1", # The attempted recipient address does not exist.
71
71
  "INT-P1", # The attempted recipient address does not exist.
72
- "INT-P3", # The attempted recpient group address does not exist.
72
+ "INT-P3", # The attempted recipient group address does not exist.
73
73
  "INT-P4", # The attempted recipient address does not exist.
74
74
  ],
75
75
  "virusdetected" => [
@@ -43,7 +43,7 @@ module Sisimai
43
43
  # - 421 mwinf5c79 ME Trop de connexions, veuillez verifier votre configuration.
44
44
  # - Too many connections, slow down. OFR005_104 [104]
45
45
  # - Too many connections, slow down. LPN105_104
46
- '104' => 'toomanyconn',
46
+ '104' => 'ratelimited',
47
47
 
48
48
  # - Your IP address is missing a DNS PTR record, it also called a rDNS (reverse DNS)
49
49
  # Please set up a valid DNS PTR record for your IP address that point to your domain,
@@ -56,7 +56,7 @@ module Sisimai
56
56
  # Please reduce the number of messages per connection, recommended value is 100
57
57
  # messages per connections
58
58
  # - Veuillez essayer plus tard. LPN003_109
59
- "109" => 'toomanyconn',
59
+ "109" => 'ratelimited',
60
60
 
61
61
  # - Invalid HELO/EHLO
62
62
  # Please set up a valid HELO/EHLO, it must be fully qualified domain name (FQDN) and
@@ -82,6 +82,11 @@ module Sisimai
82
82
  # - 501 5.1.0 Emetteur invalide. Invalid Sender. OFR004_405 [405] (in reply to MAIL FROM command))
83
83
  '405' => 'rejected',
84
84
 
85
+ # - Your Sender has been rejected
86
+ # Please contact Orange by using our contact form and select option
87
+ # "Un problème d'envoi d'emails vers les adresses Orange ou Wanadoo (deliverability issue)"
88
+ "406" => 'rejected',
89
+
85
90
  # - User doesn't exist here
86
91
  # Please remove this email address from your distribution list, it does not exist
87
92
  # - 550 5.1.1 Adresse d au moins un destinataire invalide.
@@ -144,7 +149,7 @@ module Sisimai
144
149
  # are trying to send
145
150
  # - 421 mwinf5c77 ME Service refuse. Veuillez essayer plus tard. Service refused, please try
146
151
  # later. OFR_999 [999]
147
- "99X" => 'toomanyconn',
152
+ "99X" => 'ratelimited',
148
153
 
149
154
  # Other undocumented or old error codes
150
155
  "105" => "", # Veuillez essayer plus tard.
@@ -69,19 +69,19 @@ module Sisimai
69
69
  # retry. IB605
70
70
  # - The message has attempted to mail too many recipients.
71
71
  # - Reduce the number of recipients and try again.
72
- 'IB605' => 'toomanyconn',
72
+ 'IB605' => 'ratelimited',
73
73
 
74
74
  # - 421 Connection refused, too many sessions from This IP. Lower the number of concurrent
75
75
  # sessions. IB007
76
76
  # - This IP address currently has too many sessions open.
77
77
  # - Check with your email provider to reduce the number of open sessions on your IP
78
78
  # address and then try again.
79
- 'IB007' => 'toomanyconn',
79
+ 'IB007' => 'ratelimited',
80
80
 
81
81
  # - 421 Server temporarily unavailable. Try again later. IB101
82
82
  # - The email queue is experiencing higher than normal email volume.
83
83
  # - Try again later.
84
- 'IB101' => 'speeding',
84
+ 'IB101' => 'ratelimited',
85
85
 
86
86
  # - 554 This IP has been temporarily blocked for attempting to send too many messages
87
87
  # containing content judged to be spam by the Internet community. IB110
@@ -112,16 +112,16 @@ module Sisimai
112
112
 
113
113
  # - 550 This IP has sent too many messages this hour. IB504
114
114
  # - This IP address has reached the maximum allowed messages for that hour.
115
- 'IB504' => 'speeding',
115
+ 'IB504' => 'ratelimited',
116
116
 
117
117
  # - 550 This message has exceeded the max number of messages per session. Open a new
118
118
  # session and try again. IB510
119
119
  # - This IP address has reached the maximum allowed messages for that session.
120
- 'IB510' => 'speeding',
120
+ 'IB510' => 'ratelimited',
121
121
 
122
122
  # - 550 This IP has sent too many to too many recipients this hour. IB607
123
123
  # - This IP address has reached the maximum allowed recipients for that hour.
124
- 'IB607' => 'speeding',
124
+ 'IB607' => 'ratelimited',
125
125
 
126
126
  # Remote block list (RBL) bounces
127
127
  # ---------------------------------------------------------------------------------------
@@ -143,6 +143,14 @@ module Sisimai
143
143
  'IB106' => 'blocked',
144
144
  }.freeze
145
145
  MessagesOf = {
146
+ 'authfailure' => [
147
+ # - 550 SPF Sender Invalid - envelope rejected
148
+ # - 550 5.7.9: This mail has been blocked because the sender is unauthenticated
149
+ # - 550-5.7.26 DKIM = did not pass
150
+ "spf sender invalid - envelope rejected",
151
+ "this mail has been blocked because the sender is unauthenticated",
152
+ "dkim = did not pass",
153
+ ],
146
154
  'blocked' => [
147
155
  # - 554 RBL Reject.
148
156
  # - This IP address was blocked from our internal RBL.
@@ -169,6 +177,25 @@ module Sisimai
169
177
  # make space for more email.
170
178
  'account storage limit',
171
179
  ],
180
+ 'norelaying' => [
181
+ # - 550 5.7.1: Relay access denied
182
+ "relay access denied",
183
+ ],
184
+ 'ratelimited' => [
185
+ # - 550 5.7.232 Your message can't be sent because your trial tenant has exceeded
186
+ # its daily limit for sending email to external recipients (tenant external recipient rate limit)
187
+ # - 550 5.7.233 - Your message can't be sent because your tenant exceeded its daily
188
+ # limit for sending email to external recipients (tenant external recipient rate limit)
189
+ "exceeded its daily limit",
190
+ ],
191
+ 'rejected' => [
192
+ # - 550 5.1.8 Access denied, bad outbound sender AS (42004)
193
+ "bad outbound sender as (42004)",
194
+ ],
195
+ 'securityerror' => [
196
+ # - 550 Please turn on SMTP Authentication in your mail client
197
+ "turn on smtp authentication in your mail client",
198
+ ],
172
199
  'spamdetected' => [
173
200
  # - 552 Message rejected for spam or virus content
174
201
  # - The email message contains a link, attachment, or pattern caught by our filters as spam.
@@ -188,15 +215,6 @@ module Sisimai
188
215
  # other. They need to correct their forwarding settings.
189
216
  'message is looping',
190
217
  ],
191
- 'toomanyconn' => [
192
- # - 550 5.7.232 Your message can't be sent because your trial tenant has exceeded
193
- # its daily limit for sending email to external recipients (tenant external
194
- # recipient rate limit)
195
- # - 550 5.7.233 - Your message can't be sent because your tenant exceeded its daily
196
- # limit for sending email to external recipients (tenant external recipient rate
197
- # limit)
198
- "exceeded its daily limit",
199
- ],
200
218
  'userunknown' => [
201
219
  # - 550 Recipient not found
202
220
  # - The recipient is not a valid email address.