sisimai 4.25.15-java → 4.25.16-java

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9d89dd2f4e8e0109134dcac00b7717d814fb0414
4
- data.tar.gz: 93dabd9d8f6be60c32345b4d8d77128dc713de5e
3
+ metadata.gz: 55c5f02d8a727fa2d8badf264fdd773c75eacade
4
+ data.tar.gz: 747708d2f576cabcf9ae6c60399514e1dd1bb167
5
5
  SHA512:
6
- metadata.gz: d5f93246b27ad5ca2087b2c01bc46efb5d1181b1edc758ab42d4cbef42b1ecee0a891855216281eb1f0c1887d4e652c5ea4660c1b1053b6ced70e6d268c6df28
7
- data.tar.gz: 372715bcccd25217142df9b03822304b6bc88a1d2dd0d513481e124cde30aafc9ae9feab56ea82057209e90cdbed53673c2ff4d914ad1ee5e8802d431d6f1361
6
+ metadata.gz: e189c252c4b5646effd341cc6ef5c7736c5ae48c59d6b8009695186385512ade0367ab14a7eeed9d145b2f39231553e93ed5f3bdfbf898c7024e2ada797863ca
7
+ data.tar.gz: 6374615d1cf4969205033b7f3bb9e5a738e26d86a63b38da114b984d2054a54f9a669dcbc0020d53e55fcb2a7c85b6bc127869a78cab943ba62f5a41d604995d
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
+ v4.25.16
7
+ --------------------------------------------------------------------------------
8
+ - release: "Tue, 16 May 2023 15:11:22 +0900 (JST)"
9
+ - version: "4.25.16"
10
+ - changes:
11
+ - Fix `Sisimai::MIME.mimedecode()` method when the encoding name is lower case
12
+ "b" (not "B") like `=?utf-8?b?...` #251 Thanks to @revsystem
13
+ - #253 Fix code in `Sisimai::Data.make()` method to handle `nil` returned from
14
+ `Sisimai::Rhost.get()` method. Thanks to @axfcampos
15
+ - Tiny code improvement: import code from sisimai/p5-sisimai#493 (message.rb)
16
+ - Tiny code improvement: import code from sisimai/p5-sisimai#494 (rfc3834.rb)
17
+
6
18
  v4.25.15
7
19
  --------------------------------------------------------------------------------
8
20
  - release: "Thu, 22 Dec 2022 13:13:13 +0900 (JST)"
data/lib/sisimai/data.rb CHANGED
@@ -303,7 +303,7 @@ module Sisimai
303
303
  if r.empty?
304
304
  # Failed to detect a bounce reason by the value of "rhost"
305
305
  r = Sisimai::Rhost.get(o, o.destination) if Sisimai::Rhost.match(o.destination)
306
- r = Sisimai::Reason.get(o) if r.empty?
306
+ r = Sisimai::Reason.get(o) if r.nil? || r.empty?
307
307
  r = 'undefined' if r.empty?
308
308
  end
309
309
  o.reason = r
@@ -159,9 +159,22 @@ module Sisimai
159
159
  # Set pseudo UNIX From line
160
160
  block[0] = 'MAILER-DAEMON Tue Feb 11 00:00:00 2014'
161
161
  end
162
-
163
162
  block[1] << "\n" unless block[1].end_with?("\n")
163
+
164
+ %w[image/ application/ text/html].each do |e|
165
+ # https://github.com/sisimai/p5-sisimai/issues/492, Reduce email size
166
+ p0 = 0
167
+ p1 = 0
168
+ ep = e == 'text/html' ? '</html>' : "--\n"
169
+ while true
170
+ # Remove each part from "Content-Type: image/..." to "--\n" (the end of each boundary)
171
+ p0 = block[2].index('Content-Type: ' + e, p0); break unless p0
172
+ p1 = block[2].index(ep, p0 + 32); break unless p1
173
+ block[2][p0, p1 - p0] = ''
174
+ end
175
+ end
164
176
  block[2] << "\n"
177
+
165
178
  return block
166
179
  end
167
180
 
data/lib/sisimai/mime.rb CHANGED
@@ -71,7 +71,7 @@ module Sisimai
71
71
  mimeencoded0 = cv[4]
72
72
 
73
73
  decodedtext0 << cv[1]
74
- decodedtext0 << if encodingname == 'B'
74
+ decodedtext0 << if encodingname.upcase == 'B'
75
75
  Base64.decode64(mimeencoded0)
76
76
  else
77
77
  mimeencoded0.unpack('M').first
@@ -8,8 +8,6 @@ module Sisimai
8
8
  AutoReply1 = {
9
9
  # http://www.iana.org/assignments/auto-submitted-keywords/auto-submitted-keywords.xhtml
10
10
  'auto-submitted' => %r/\Aauto-(?:generated|replied|notified)/,
11
- # https://msdn.microsoft.com/en-us/library/ee219609(v=exchg.80).aspx
12
- 'x-auto-response-suppress' => %r/(?:oof|autoreply)/,
13
11
  'x-apple-action' => %r/\Avacation\z/,
14
12
  'precedence' => %r/\Aauto_reply\z/,
15
13
  'subject' => %r/\A(?>
@@ -1,4 +1,4 @@
1
1
  # Define the version number of Sisimai
2
2
  module Sisimai
3
- VERSION = '4.25.15'.freeze
3
+ VERSION = '4.25.16'.freeze
4
4
  end
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: 4.25.15
4
+ version: 4.25.16
5
5
  platform: java
6
6
  authors:
7
7
  - azumakuniyuki
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-12-22 00:00:00.000000000 Z
11
+ date: 2023-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement