sisimai 5.2.1 → 5.3.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.
- checksums.yaml +4 -4
- data/.github/workflows/rake-test.yml +1 -1
- data/ChangeLog.md +12 -0
- data/README-JA.md +2 -2
- data/README.md +4 -4
- data/lib/sisimai/fact.rb +10 -0
- data/lib/sisimai/order.rb +12 -11
- data/lib/sisimai/reason/notaccept.rb +1 -1
- data/lib/sisimai/smtp/reply.rb +30 -7
- data/lib/sisimai/smtp/status.rb +9 -0
- data/lib/sisimai/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f6e9aa831a76bc1566e694838808831f3708f0b76d0c588b1fff95a515a97070
|
4
|
+
data.tar.gz: e0442c7c4fa97eec7b5836f1e2d1f47363c3b0d6ffcfc6197499119e2eeb767d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 578a764e529d7d3770b787076be293b10a059881a41d9fb071328a68b91a2f82f2bc7fd73522884faab11ff46f616205069308e7f1083bd031e274564e31cd63
|
7
|
+
data.tar.gz: '05538bbd202719d8ba14143297002871339d150837f54899d76cd6c3cdc24f7bdac0cf94703e37ce311098d3104d4b919d2e2c9af107119eccd527aaea9327d4'
|
data/ChangeLog.md
CHANGED
@@ -3,6 +3,18 @@ RELEASE NOTES for Ruby version of Sisimai
|
|
3
3
|
- releases: "https://github.com/sisimai/rb-sisimai/releases"
|
4
4
|
- download: "https://rubygems.org/gems/sisimai"
|
5
5
|
|
6
|
+
v5.3.0
|
7
|
+
---------------------------------------------------------------------------------------------------
|
8
|
+
- release: "Sat, 29 Mar 2025 06:04:41 +0900 (JST)"
|
9
|
+
- version: "5.3.0"
|
10
|
+
- changes:
|
11
|
+
- Collateral update due to the Go version of Sisimai's broken module path fix.
|
12
|
+
- Sisimai works on Ruby 3.4
|
13
|
+
- SMTP reply code improvements
|
14
|
+
- Update the list of SMTP reply codes in `Sisimai::SMTP::Reply`
|
15
|
+
- Implement `Sisimai::SMTP::Reply.associatedwith`
|
16
|
+
- Implement `Sisimai::SMTP::Status.is_explicit`
|
17
|
+
|
6
18
|
v5.2.1
|
7
19
|
---------------------------------------------------------------------------------------------------
|
8
20
|
- release: "Wed, 12 Mar 2025 06:50:25 +0900 (JST)"
|
data/README-JA.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|

|
2
2
|
[](https://github.com/sisimai/rb-sisimai/blob/master/LICENSE)
|
3
|
-
[](https://www.ruby-lang.org/)
|
4
4
|
[](https://badge.fury.io/rb/sisimai)
|
5
5
|
[](https://codecov.io/github/sisimai/rb-sisimai)
|
6
6
|
|
@@ -362,7 +362,7 @@ Sisimai 5.0.0から**Ruby 2.4以上**が必要になります。
|
|
362
362
|
| ソースコードの行数 | 10,800 行 | 9,860 行 |
|
363
363
|
| テストフレームワーク | rspec | minitest |
|
364
364
|
| テスト件数(spec/またはtest/ディレクトリ) | 311,000 件 | 410,000 件 |
|
365
|
-
| 1秒間に解析できるバウンスメール数[^4] |
|
365
|
+
| 1秒間に解析できるバウンスメール数[^4] | 620 通 | 620 通 |
|
366
366
|
| ライセンス | 2条項BSD | 2条項BSD |
|
367
367
|
| 開発会社による商用サポート | 提供中 | 提供中 |
|
368
368
|
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|

|
2
2
|
[](https://github.com/sisimai/rb-sisimai/blob/master/LICENSE)
|
3
|
-
[](https://www.ruby-lang.org/)
|
4
4
|
[](https://badge.fury.io/rb/sisimai)
|
5
5
|
[](https://codecov.io/github/sisimai/rb-sisimai)
|
6
6
|
|
@@ -25,7 +25,7 @@
|
|
25
25
|
> such as PHP, Python, Go, and Rust. By obtaining the analysis results, it is very useful for understanding
|
26
26
|
> the bounce occurrence status.
|
27
27
|
|
28
|
-
- [**README-JA(
|
28
|
+
- [**README-JA(日本�**](README-JA.md)
|
29
29
|
- [What is Sisimai](#what-is-sisimai)
|
30
30
|
- [The key features of sisimai](#the-key-features-of-sisimai)
|
31
31
|
- [Command line demo](#command-line-demo)
|
@@ -361,7 +361,7 @@ Beginning with v5.0.0, Sisimai requires **Ruby 2.4.0 or later.**
|
|
361
361
|
| Source lines of code | 10,300 lines | 9,800 lines |
|
362
362
|
| Test frameworks | rspec | minitest |
|
363
363
|
| The number of tests in spec/ or test/ directory | 311,000 tests | 410,000 tests |
|
364
|
-
| The number of bounce emails decoded/sec (CRuby)[^4] |
|
364
|
+
| The number of bounce emails decoded/sec (CRuby)[^4] | 620 emails | 620 emails |
|
365
365
|
| License | 2 Clause BSD | 2 Caluse BSD |
|
366
366
|
| Commercial support | Available | Available |
|
367
367
|
|
@@ -450,7 +450,7 @@ Related Sites
|
|
450
450
|
|
451
451
|
See also
|
452
452
|
---------------------------------------------------------------------------------------------------
|
453
|
-
* [README-JA.md - README.md in Japanese(
|
453
|
+
* [README-JA.md - README.md in Japanese(日本�](https://github.com/sisimai/rb-sisimai/blob/master/README-JA.md)
|
454
454
|
* [RFC3463 - Enhanced Mail System Status Codes](https://tools.ietf.org/html/rfc3463)
|
455
455
|
* [RFC3464 - An Extensible Message Format for Delivery Status Notifications](https://tools.ietf.org/html/rfc3464)
|
456
456
|
* [RFC3834 - Recommendations for Automatic Responses to Electronic Mail](https://tools.ietf.org/html/rfc3834)
|
data/lib/sisimai/fact.rb
CHANGED
@@ -473,6 +473,16 @@ module Sisimai
|
|
473
473
|
thing["action"] = "delayed" if thing["action"].empty? && thing["reason"] == "expired"
|
474
474
|
thing["action"] = "failed" if thing["action"].empty? && cx[0] == "4" || cx[0] == "5"
|
475
475
|
|
476
|
+
if thing["replycode"].size > 0
|
477
|
+
# Fill empty values: ["SMTP Command", "DSN", "Reason"]
|
478
|
+
cv = Sisimai::SMTP::Reply.associatedwith(thing["replycode"])
|
479
|
+
if cv.size > 0
|
480
|
+
thing["command"] = cv[0] if cv[0] != "" && thing["command"].empty?
|
481
|
+
thing["deliverystatus"] = cv[1] if cv[1] != "" && Sisimai::SMTP::Status.is_explicit(thing["deliverystatus"]) == false
|
482
|
+
thing["reason"] = cv[2] if cv[2] != "" && Sisimai::Reason.is_explicit(thing["reason"]) == false
|
483
|
+
end
|
484
|
+
end
|
485
|
+
|
476
486
|
# Feedback-ID: 1.us-west-2.QHuyeCQrGtIIMGKQfVdUhP9hCQR2LglVOrRamBc+Prk=:AmazonSES
|
477
487
|
thing["feedbackid"] = rfc822data["feedback-id"] || ""
|
478
488
|
|
data/lib/sisimai/order.rb
CHANGED
@@ -11,38 +11,39 @@ module Sisimai
|
|
11
11
|
'Sisimai::Lhost::Sendmail',
|
12
12
|
'Sisimai::Lhost::Exchange2007',
|
13
13
|
'Sisimai::Lhost::Exchange2003',
|
14
|
-
'Sisimai::Lhost::AmazonSES',
|
15
14
|
'Sisimai::Lhost::InterScanMSS',
|
16
15
|
'Sisimai::Lhost::KDDI',
|
16
|
+
'Sisimai::Lhost::FML',
|
17
17
|
'Sisimai::Lhost::Verizon',
|
18
|
+
'Sisimai::Lhost::AmazonSES',
|
18
19
|
'Sisimai::Lhost::ApacheJames',
|
19
20
|
'Sisimai::Lhost::X2',
|
20
|
-
'Sisimai::Lhost::FML',
|
21
21
|
].freeze
|
22
22
|
|
23
23
|
# Fallback list: The following MTA/ESP modules is not listed OrderE0
|
24
24
|
OrderE1 = [
|
25
25
|
'Sisimai::Lhost::Postfix',
|
26
26
|
'Sisimai::Lhost::OpenSMTPD',
|
27
|
-
'Sisimai::Lhost::Courier',
|
28
27
|
'Sisimai::Lhost::Qmail',
|
28
|
+
'Sisimai::Lhost::Courier',
|
29
29
|
'Sisimai::Lhost::MessagingServer',
|
30
|
-
'Sisimai::Lhost::MailMarshalSMTP',
|
31
30
|
'Sisimai::Lhost::GoogleWorkspace',
|
32
|
-
'Sisimai::Lhost::Domino',
|
33
|
-
'Sisimai::Lhost::Notes',
|
34
31
|
'Sisimai::Lhost::Gmail',
|
35
|
-
'Sisimai::Lhost::Zoho',
|
36
32
|
'Sisimai::Lhost::GMX',
|
37
|
-
'Sisimai::Lhost::
|
38
|
-
'Sisimai::Lhost::
|
39
|
-
'Sisimai::Lhost::
|
33
|
+
'Sisimai::Lhost::Zoho',
|
34
|
+
'Sisimai::Lhost::Domino',
|
35
|
+
'Sisimai::Lhost::Notes',
|
40
36
|
'Sisimai::Lhost::IMailServer',
|
41
|
-
'Sisimai::Lhost::MFILTER',
|
42
37
|
'Sisimai::Lhost::Activehunter',
|
38
|
+
'Sisimai::Lhost::MFILTER',
|
39
|
+
'Sisimai::Lhost::MailFoundry',
|
40
|
+
'Sisimai::Lhost::GoogleGroups',
|
41
|
+
'Sisimai::Lhost::MailMarshalSMTP',
|
42
|
+
'Sisimai::Lhost::V5sendmail',
|
43
43
|
'Sisimai::Lhost::EZweb',
|
44
44
|
'Sisimai::Lhost::Biglobe',
|
45
45
|
'Sisimai::Lhost::EinsUndEins',
|
46
|
+
'Sisimai::Lhost::DragonFly',
|
46
47
|
'Sisimai::Lhost::X1',
|
47
48
|
'Sisimai::Lhost::X3',
|
48
49
|
'Sisimai::Lhost::X6',
|
@@ -43,7 +43,7 @@ module Sisimai
|
|
43
43
|
return true if argvs['reason'] == 'notaccept'
|
44
44
|
|
45
45
|
# SMTP Reply Code is 554 or 556
|
46
|
-
return true if [521,
|
46
|
+
return true if [521, 556].index(argvs['replycode'].to_i)
|
47
47
|
return false if argvs['command'] != 'MAIL'
|
48
48
|
return match(argvs['diagnosticcode'].downcase)
|
49
49
|
end
|
data/lib/sisimai/smtp/reply.rb
CHANGED
@@ -58,8 +58,11 @@ module Sisimai
|
|
58
58
|
# 251 User not local; will forward to <forward-path> (See Section 3.4)
|
59
59
|
# 252 Cannot VRFY user, but will accept message and attempt delivery (See Section 3.5.3)
|
60
60
|
# 253 OK, <n> pending messages for node <domain> started (See RFC1985)
|
61
|
+
# 334 A server challenge is sent as a 334 reply with the text part containing the [BASE64]
|
62
|
+
# encoded string supplied by the SASL mechanism. This challenge MUST NOT contain any
|
63
|
+
# text other than the BASE64 encoded challenge. (RFC4954)
|
61
64
|
# 354 Start mail input; end with <CRLF>.<CRLF>
|
62
|
-
'211', '214', '220', '221', '235', '250', '251', '252', '253', '354'
|
65
|
+
'211', '214', '220', '221', '235', '250', '251', '252', '253', '334', '354'
|
63
66
|
].freeze
|
64
67
|
ReplyCode4 = [
|
65
68
|
# 421 <domain> Service not available, closing transmission channel (This may be a reply
|
@@ -86,7 +89,6 @@ module Sisimai
|
|
86
89
|
# 502 Command not implemented (see Section 4.2.4)
|
87
90
|
# 503 Bad sequence of commands
|
88
91
|
# 504 Command parameter not implemented
|
89
|
-
# 520 Please use the correct QHLO ID (See https://datatracker.ietf.org/doc/id/draft-fanf-smtp-quickstart-01.txt)
|
90
92
|
# 521 Host does not accept mail (See RFC7504)
|
91
93
|
# 523 Encryption Needed (See RFC5248)
|
92
94
|
# 524 (See RFC5248)
|
@@ -104,11 +106,27 @@ module Sisimai
|
|
104
106
|
# 554 Transaction failed (Or, in the case of a connection-opening response, "No SMTP service here")
|
105
107
|
# 555 MAIL FROM/RCPT TO parameters not recognized or not implemented
|
106
108
|
# 556 Domain does not accept mail (See RFC7504)
|
107
|
-
|
108
|
-
|
109
|
-
'535', '538', '551', '555', '556', '554', '557', '500', '501', '502', '503', '504',
|
109
|
+
"550", "552", "553", "551", "521", "525", "523", "524", "530", "533", "534", "535", "538",
|
110
|
+
"555", "556", "554", "500", "501", "502", "503", "504",
|
110
111
|
].freeze
|
111
112
|
CodeOfSMTP = { '2' => ReplyCode2, '4' => ReplyCode4, '5' => ReplyCode5 }.freeze
|
113
|
+
Associated = {
|
114
|
+
"422" => ["AUTH", "4.7.12", "securityerror"], # RFC5238
|
115
|
+
"432" => ["AUTH", "4.7.12", "securityerror"], # RFC4954, RFC5321
|
116
|
+
"500" => ["", "", "syntaxerror"], # RFC5321
|
117
|
+
"501" => ["", "", "syntaxerror"], # RFC5321
|
118
|
+
"502" => ["", "", "syntaxerror"], # RFC5321
|
119
|
+
"503" => ["", "", "syntaxerror"], # RFC5321
|
120
|
+
"504" => ["", "", "syntaxerror"], # RFC5321
|
121
|
+
"521" => ["CONN", "", "notaccept"], # RFC7504
|
122
|
+
"523" => ["AUTH", "", "securityerror"], # RFC5248
|
123
|
+
"524" => ["AUTH", "", "securityerror"], # RFC5248
|
124
|
+
"525" => ["AUTH", "", "securityerror"], # RFC5248
|
125
|
+
"534" => ["AUTH", "5.7.9", "securityerror"], # RFC4954, RFC5248
|
126
|
+
"535" => ["AUTH", "5.7.8", "securityerror"], # RFC4954, RFC5248
|
127
|
+
"538" => ["AUTH", "5.7.11", "securityerror"], # RFC4954, RFC5248
|
128
|
+
"556" => ["RCPT", "", "notaccept"], # RFC7504
|
129
|
+
}.freeze
|
112
130
|
|
113
131
|
# Check whether a reply code is a valid code or not
|
114
132
|
# @param [String] argv1 Reply Code(DSN)
|
@@ -122,7 +140,7 @@ module Sisimai
|
|
122
140
|
first = (reply / 100).to_i
|
123
141
|
|
124
142
|
return false if reply < 211
|
125
|
-
return false if reply >
|
143
|
+
return false if reply > 556
|
126
144
|
return false if reply % 100 > 59
|
127
145
|
|
128
146
|
if first == 2
|
@@ -135,7 +153,7 @@ module Sisimai
|
|
135
153
|
|
136
154
|
if first == 3
|
137
155
|
# 3yz
|
138
|
-
return false unless reply == 354
|
156
|
+
return false unless reply == 334 || reply == 354
|
139
157
|
return true
|
140
158
|
end
|
141
159
|
|
@@ -182,6 +200,11 @@ module Sisimai
|
|
182
200
|
return esmtpreply
|
183
201
|
end
|
184
202
|
|
203
|
+
# associatedwith returns a slice associated with the SMTP reply code of the argument
|
204
|
+
# @param [String] argv1 SMTP reply code like 550
|
205
|
+
# @return [Array] ["SMTP Command", "DSN", "Reason"]
|
206
|
+
# @since v5.2.2
|
207
|
+
def associatedwith(argv1 = ''); return Associated[argv1] || []; end
|
185
208
|
end
|
186
209
|
end
|
187
210
|
end
|
data/lib/sisimai/smtp/status.rb
CHANGED
@@ -892,6 +892,15 @@ module Sisimai
|
|
892
892
|
return statuscode
|
893
893
|
end
|
894
894
|
|
895
|
+
# is_explicit() returns 0 when the argument is empty or is an internal code
|
896
|
+
# @param string argv1 Status code
|
897
|
+
# @return bool false: The delivery status code is not explicit
|
898
|
+
def is_explicit(argv1 = '')
|
899
|
+
return false if argv1.nil?
|
900
|
+
return false if argv1.empty?
|
901
|
+
return false if argv1.size == 7 && argv1.start_with?("5.0.9", "4.0.9")
|
902
|
+
return true
|
903
|
+
end
|
895
904
|
end
|
896
905
|
end
|
897
906
|
end
|
data/lib/sisimai/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sisimai
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- azumakuniyuki
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-03-
|
11
|
+
date: 2025-03-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -1017,7 +1017,7 @@ homepage: https://libsisimai.org/
|
|
1017
1017
|
licenses:
|
1018
1018
|
- BSD-2-Clause
|
1019
1019
|
metadata: {}
|
1020
|
-
post_install_message:
|
1020
|
+
post_install_message:
|
1021
1021
|
rdoc_options: []
|
1022
1022
|
require_paths:
|
1023
1023
|
- lib
|
@@ -1032,8 +1032,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1032
1032
|
- !ruby/object:Gem::Version
|
1033
1033
|
version: '0'
|
1034
1034
|
requirements: []
|
1035
|
-
rubygems_version: 3.
|
1036
|
-
signing_key:
|
1035
|
+
rubygems_version: 3.5.22
|
1036
|
+
signing_key:
|
1037
1037
|
specification_version: 4
|
1038
1038
|
summary: Mail Analyzing Interface
|
1039
1039
|
test_files: []
|