sisimai 4.25.15 → 4.25.16

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
  SHA256:
3
- metadata.gz: 14e2b75786fccc05db7b63184a1b6d0414b2cc38e53f333bc906fa33bbc92c49
4
- data.tar.gz: ca9a76af176f7d9360f076bd306c1ede10b8e0638942446942c280da8cf5583f
3
+ metadata.gz: 6bebc5b07b710550feea11b7559c77c5263d6667a6ef17f19deea45cc9796f45
4
+ data.tar.gz: 8baa0f628a613a370c65aab81a933eef6af4f29ac2c068714fc6695e6500f814
5
5
  SHA512:
6
- metadata.gz: 56046ef8f7cc42a007c95c94cec7ddbaac1442015e8209441d1e47d9828e35a90b55f53f653c949cbd12e75cfed9c31ced2b7ae536d3e802cf7567f186227a46
7
- data.tar.gz: 38061bb028ef2a287ab83faa93c702ee31f48ed307f7c00dd56a1cba8cba512aa60761eb638259e64050730e9558ebb5652b62f7ed54a769b7f07479cf579642
6
+ metadata.gz: 1aa57e71cb1112fa6d2e75bd993e80d0d5ff31b5ed5e708d2473af00a6a0fbd7c00fcc100ffb75d073e2619a7eb7ac5d5741fdbf8e40bdb4684d7d22dd362e66
7
+ data.tar.gz: 51bac434c341ddee0f9827d08e493be194118d999662fe2626fb5a5a81de87b0578cb00eec465742d6ef204943c3cc31c9a11150aa850e2ebaf1e0da68859cf6
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: ruby
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
  name: bundler