sisimai 4.15.1 → 4.16.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of sisimai might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 258d7f494f10ca10d2ab5d0edffa101104977c65
4
- data.tar.gz: 6c3e82c105068129e1114cdc5150291cb0d756d6
3
+ metadata.gz: 82738ed0361880b40c6cea5b67f0214a54d21c6a
4
+ data.tar.gz: fb585810f00aa5bcf2a1df3efeebabfbbdfe25c3
5
5
  SHA512:
6
- metadata.gz: 8f8991e380cb8b4b5ff9e879baa3668c196776f6672c0858b2d6bfe3b4224601fa03da470dff90664643997e2cd47c70b5e5f53404271a743efb39b1286cfa03
7
- data.tar.gz: 084bb75e04678503066d9032cf43404b2f3fc7e3167903aa382f972c588c9520eac8b3497a0cae563aee9efe2266f43665dfe923233120e46e4a8c022b3749e8
6
+ metadata.gz: 2118f34578542ec270941872781cd2db5880d946448046e6b8872d7d4c20321586e4216595f2f7612669725f47c68800e0de1481f7de489e8fc5cabd5a75b75c
7
+ data.tar.gz: ec163cac4184853b36ac22e205ec26e4075b4b061dec396291779e7230c273aa350a1188863a888adf26a5116d95f5c68daf45e6918aef54aa4ed60422926301
data/.travis.yml CHANGED
@@ -6,11 +6,9 @@ rvm:
6
6
  - 2.3.0
7
7
  - jruby-9.0.4.0
8
8
  before_install:
9
- - gem update bundler
10
9
  script:
11
- - bundle exec rake spec
10
+ - rake spec
12
11
  sudo: false
13
- cache: bundler
14
12
  notifications:
15
13
  recipients:
16
14
  - azumakuniyuki+travis-ci.org@gmail.com
data/ANALYTICAL-PRECISION CHANGED
@@ -1,32 +1,32 @@
1
1
  bounceHammer 2.7.13p3
2
2
  MTA MODULE NAME CAN PARSE RATIO NOTES
3
3
  -------------------------------------------------------------------------------
4
- MTA::Activehunter ....... 0/0009 0.0000 TransWARE Active!hunter
4
+ MTA::Activehunter ....... 0/0014 0.0000 TransWARE Active!hunter
5
5
  MTA::ApacheJames ........ 0/0006 0.0000 Java Apache Mail Enterprise Server
6
- MTA::Courier ............ 13/0015 0.8667 Courier MTA
7
- MTA::Domino ............. 7/0013 0.5385 IBM Domino Server
8
- MTA::Exchange ........... 1/0050 0.0200 Microsoft Exchange Server
9
- MTA::Exim ............... 144/0173 0.8324 Exim
10
- MTA::IMailServer ........ 0/0044 0.0000 IPSWITCH IMail Server
11
- MTA::InterScanMSS ....... 0/0007 0.0000 Trend Micro InterScan Messaging Security Suite
12
- MTA::MXLogic ............ 0/0013 0.0000 McAfee SaaS
6
+ MTA::Courier ............ 14/0016 0.8750 Courier MTA
7
+ MTA::Domino ............. 7/0015 0.4667 IBM Domino Server
8
+ MTA::Exchange ........... 1/0051 0.0196 Microsoft Exchange Server
9
+ MTA::Exim ............... 141/0171 0.8246 Exim
10
+ MTA::IMailServer ........ 0/0045 0.0000 IPSWITCH IMail Server
11
+ MTA::InterScanMSS ....... 0/0009 0.0000 Trend Micro InterScan Messaging Security Suite
12
+ MTA::MXLogic ............ 0/0014 0.0000 McAfee SaaS
13
13
  MTA::MailFoundry ........ 0/0007 0.0000 MailFoundry
14
14
  MTA::MailMarshalSMTP .... 0/0003 0.0000 Trustwave Secure Email Gateway
15
15
  MTA::McAfee ............. 0/0010 0.0000 McAfee Email Appliance
16
- MTA::MessagingServer .... 18/0021 0.8571 Oracle Communications Messaging Server
17
- MTA::Notes .............. 0/0011 0.0000 Lotus Notes
16
+ MTA::MessagingServer .... 19/0022 0.8636 Oracle Communications Messaging Server
17
+ MTA::Notes .............. 0/0012 0.0000 Lotus Notes
18
18
  MTA::OpenSMTPD .......... 5/0023 0.2174 OpenSMTPD
19
- MTA::Postfix ............ 161/0178 0.9045 Postfix
20
- MTA::Sendmail ........... 250/0235 1.0000 V8Sendmail: /usr/sbin/sendmail
19
+ MTA::Postfix ............ 161/0179 0.8994 Postfix
20
+ MTA::Sendmail ........... 257/0243 1.0000 V8Sendmail: /usr/sbin/sendmail
21
21
  MTA::SurfControl ........ 6/0008 0.7500 WebSense SurfControl
22
22
  MTA::V5sendmail ......... 0/0386 0.0000 Sendmail version 5
23
23
  MTA::X1 ................. 0/0007 0.0000 Unknown MTA #1
24
- MTA::X2 ................. 0/0045 0.0000 Unknown MTA #2
25
- MTA::X3 ................. 0/0008 0.0000 Unknown MTA #3
26
- MTA::X4 ................. 0/0027 0.0000 Unknown MTA #4 qmail clones
27
- MTA::X5 ................. 2/0002 1.0000 Unknown MTA #5
28
- MTA::MFILTER ............ 0/0009 0.0000 Digital Arts m-FILTER
29
- MTA::Qmail .............. 51/0076 0.6711 qmail
24
+ MTA::X2 ................. 0/0069 0.0000 Unknown MTA #2
25
+ MTA::X3 ................. 0/0012 0.0000 Unknown MTA #3
26
+ MTA::X4 ................. 0/0029 0.0000 Unknown MTA #4 qmail clones
27
+ MTA::X5 ................. 3/0003 1.0000 Unknown MTA #5
28
+ MTA::mFILTER ............ 0/0010 0.0000 Digital Arts m-FILTER
29
+ MTA::qmail .............. 51/0078 0.6538 qmail
30
30
  MSP::DE::EinsUndEins .... 0/0003 0.0000 1&1: http://www.1and1.de
31
31
  MSP::DE::GMX ............ 0/0010 0.0000 GMX: http://www.gmx.net
32
32
  MSP::JP::Biglobe ........ 0/0007 0.0000 BIGLOBE: http://www.biglobe.ne.jp
@@ -36,19 +36,21 @@ MSP::RU::MailRu ......... 4/0014 0.2857 @mail.ru: https://mail.ru
36
36
  MSP::RU::Yandex ......... 4/0007 0.5714 Yandex.Mail: http://www.yandex.ru
37
37
  MSP::UK::MessageLabs .... 2/0002 1.0000 Symantec.cloud http://www.messagelabs.com
38
38
  MSP::US::AmazonSES ...... 18/0018 1.0000 Amazon SES(Sending): http://aws.amazon.com/ses/
39
+ MSP::US::AmazonWorkMail . 6/0010 0.6000 Amazon WorkMail: https://aws.amazon.com/workmail/
39
40
  MSP::US::Aol ............ 18/0021 0.8571 Aol Mail: http://www.aol.com
40
41
  MSP::US::Bigfoot ........ 2/0002 1.0000 Bigfoot: http://www.bigfoot.com
41
42
  MSP::US::Facebook ....... 3/0003 1.0000 Facebook: https://www.facebook.com
42
43
  MSP::US::Google ......... 0/0058 0.0000 Google Gmail: https://mail.google.com
43
- MSP::US::Outlook ........ 29/0035 0.8286 Microsoft Outlook.com: https://www.outlook.com/
44
+ MSP::US::Office365 ...... 6/0007 0.8571 Microsoft Office 365: http://office.microsoft.com/
45
+ MSP::US::Outlook ........ 19/0021 0.9048 Microsoft Outlook.com: https://www.outlook.com/
44
46
  MSP::US::ReceivingSES ... 0/0007 0.0000 Amazon SES(Receiving): http://aws.amazon.com/ses/
45
47
  MSP::US::SendGrid ....... 0/0012 0.0000 SendGrid: http://sendgrid.com/
46
- MSP::US::Verizon ........ 2/0002 1.0000 Verizon Wireless: http://www.verizonwireless.com
48
+ MSP::US::Verizon ........ 3/0003 1.0000 Verizon Wireless: http://www.verizonwireless.com
47
49
  MSP::US::Yahoo .......... 0/0009 0.0000 Yahoo! MAIL: https://www.yahoo.com
48
50
  MSP::US::Zoho ........... 0/0011 0.0000 Zoho Mail: https://www.zoho.com
49
51
  ARF ..................... 9/0050 0.1800 Abuse Feedback Reporting Format
50
- RFC3464 ................. 126/0269 0.4684 Fallback Module for MTAs
52
+ RFC3464 ................. 130/0273 0.4762 Fallback Module for MTAs
51
53
  RFC3834 ................. 0/0004 0.0000 Detector for auto replied message
52
54
  -------------------------------------------------------------------------------
53
- bounceHammer 2.7.13p3 1011/2061 0.4905
54
- Sisimai 4.14.2 2061/2061 1.0000
55
+ bounceHammer 2.7.13p3 1025/2125 0.4824
56
+ Sisimai 4.16.0 2125/2125 1.0000
data/Changes CHANGED
@@ -1,5 +1,16 @@
1
1
  Revision history for Ruby version of Sisimai
2
2
 
3
+ 4.16.0 Thu, 18 Feb 2016 13:49:01 +0900 (JST)
4
+ - Implement new reason "delivered". Sisimai set "delivered" to the reason
5
+ when the value of Status: field in a bounce message begins with "2". This
6
+ feature is optional and is not enabled by default.
7
+ - Implement new method Sisimai.engine. the method returns the list of MTA
8
+ and MSP module list implemented in Sisimai.
9
+ - Fix serious bug (`gem install` fails on JRuby environment) in Gemfile and
10
+ sisimai.gemspec. This bug is reported at issue #46 and pull-request #47.
11
+ Thanks to @hiroyuki-sato and all the people who helped for resolving this
12
+ issue on https://github.com/rubygems/rubygems/issues/1492.
13
+
3
14
  4.15.1 Wed, 17 Feb 2016 01:36:45 +0900 (JST)
4
15
  - Fix serious bug `gem install sisimai` fails on JRuby, reported at issue
5
16
  #46. Thanks to @hiroyuki-sato.
data/Gemfile CHANGED
@@ -1,12 +1,15 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in sisimai.gemspec
4
- gemspec
4
+ gemspec name: 'sisimai'
5
5
 
6
+ # To execute `rake spec` on Travis-CI
6
7
  gem 'oj', '>= 2.14.4', :platform => :ruby
7
8
  gem 'jrjackson', '>= 0.3.8', :platform => :jruby
8
9
 
9
10
  group :development, :test do
10
- gem 'coveralls', require: false
11
+ gem 'rake', :require => false
12
+ gem 'rspec', :require => false
13
+ gem 'coveralls', :require => false
11
14
  end
12
15
 
data/LICENSE CHANGED
@@ -1,7 +1,6 @@
1
1
  THIS SOFTWARE IS DISTRIBUTED UNDER THE FOLLOWING BSD 2-CLAUSE LICENSE:
2
2
 
3
- Copyright (C) 2014-2015 azumakuniyuki
4
- All rights reserved.
3
+ Copyright (C) 2015,2016 azumakuniyuki, All rights reserved.
5
4
 
6
5
  Redistribution and use in source and binary forms, with or without modification,
7
6
  are permitted provided that the following conditions are met:
data/Makefile CHANGED
@@ -9,12 +9,14 @@ SHELL := /bin/sh
9
9
  TIME := $(shell date '+%s')
10
10
  NAME := sisimai
11
11
  RUBY := ruby
12
+ JRUBY := /usr/local/jr
12
13
  RAKE := rake
13
14
  MKDIR := mkdir -p
14
15
  RSPEC := rspec -Ilib -f progress
15
16
  CP := cp
16
17
  RM := rm -f
17
18
 
19
+ DEPENDENCIES = bundle rake rspec
18
20
  .DEFAULT_GOAL = git-status
19
21
  REPOS_TARGETS = git-status git-push git-commit-amend git-tag-list git-diff \
20
22
  git-reset-soft git-rm-cached git-branch
@@ -23,16 +25,28 @@ REPOS_TARGETS = git-status git-push git-commit-amend git-tag-list git-diff \
23
25
  .PHONY: clean
24
26
 
25
27
  depend:
26
- gem install bundle rake rspec coveralls
28
+ gem install $(DEPENDENCIES)
29
+ if [ test -d "$(JRUBY)" ]; then \
30
+ PATH="$$PATH:$(JRUBY)/bin" $(JRUBY)/bin/gem install $(DEPENDENCIES); \
31
+ fi
27
32
 
28
33
  install-from-rubygems:
29
34
  gem install $(NAME)
35
+ if [ test -d "$(JRUBY)" ]; then \
36
+ PATH="$$PATH:$(JRUBY)/bin" $(JRUBY)/bin/gem install $(NAME); \
37
+ fi
30
38
 
31
39
  install-from-local:
32
- bundle exec $(RAKE) install
40
+ $(RAKE) install
41
+ if [ test -d "$(JRUBY)" ]; then \
42
+ PATH="$$PATH:$(JRUBY)/bin" $(JRUBY)/bin/rake install; \
43
+ fi
33
44
 
34
45
  release:
35
- bundle exec $(RAKE) release
46
+ $(RAKE) release
47
+ if [ test -d "$(JRUBY)" ]; then \
48
+ PATH="$$PATH:$(JRUBY)/bin" $(JRUBY)/bin/rake release; \
49
+ fi
36
50
 
37
51
  test: user-test
38
52
 
data/README.md CHANGED
@@ -29,7 +29,7 @@ Key Features | 主な特徴的機能
29
29
  * Support 21 known MTAs and 5 unknown MTAs | 26種類のMTAに対応
30
30
  * Support 21 major MSPs(Mail Service Providers) | 21種類の著名なMSPに対応
31
31
  * Support Feedback Loop Message(ARF) | Feedback Loopにも対応
32
- * Can detect 25 error reasons | 25種類のエラー理由を検出
32
+ * Can detect 26 error reasons | 26種類のエラー理由を検出
33
33
 
34
34
  Setting Up Sisimai | シシマイを使う準備
35
35
  =======================================
@@ -52,10 +52,10 @@ Install | インストール
52
52
 
53
53
  ```shell
54
54
  % sudo gem install sisimai
55
- Fetching: sisimai-4.14.2.gem (100%)
56
- Successfully installed sisimai-4.14.2
57
- Parsing documentation for sisimai-4.14.2
58
- Installing ri documentation for sisimai-4.14.2
55
+ Fetching: sisimai-4.16.0.gem (100%)
56
+ Successfully installed sisimai-4.16.0
57
+ Parsing documentation for sisimai-4.16.0
58
+ Installing ri documentation for sisimai-4.16.0
59
59
  Done installing documentation for sisimai after 6 seconds
60
60
  1 gem installed
61
61
  ```
@@ -82,7 +82,7 @@ Parsing documentation for coveralls-0.8.10
82
82
  Done installing documentation for coveralls after 0 seconds
83
83
  4 gems installed
84
84
  bundle exec rake install
85
- sisimai 4.14.2 built to pkg/sisimai-4.14.2.gem.
85
+ sisimai 4.14.2 built to pkg/sisimai-4.16.0.gem.
86
86
  sisimai (4.14.2) installed.
87
87
  ```
88
88
 
@@ -99,6 +99,10 @@ messages like following.
99
99
  require 'sisimai'
100
100
  v = Sisimai.make('/path/to/mbox') # or path to Maildir/
101
101
 
102
+ # If you want to get bounce records which reason is "delivered", set "delivered"
103
+ # option to make() method like the following:
104
+ v = Sisimai.make('/path/to/mbox', delivered: true)
105
+
102
106
  unless v.void
103
107
  v.each do |e|
104
108
  puts e.class # Sisimai::Data
@@ -120,6 +124,10 @@ end
120
124
 
121
125
  # Get JSON string from parsed mailbox or Maildir/
122
126
  puts Sisimai.dump('/path/to/mbox') # or path to Maildir/
127
+
128
+ # dump() method also accepts "delivered" option like the following code:
129
+ puts Sisimai.dump('/path/to/mbox', delivered: true)
130
+
123
131
  ```
124
132
 
125
133
  ```json
@@ -144,13 +152,13 @@ and Ruby version of Sisimai.
144
152
  | Features | Ruby version | Perl version |
145
153
  |------------------------------------------------|---------------|--------------|
146
154
  | System requirements | Ruby 2.1-2.3 | Perl 5.10 - |
147
- | | JRuby 9.0.0.0-| |
155
+ | | JRuby 9.0.4.0-| |
148
156
  | Analytical precision ratio(2000 emails)[1] | 1.00 | 1.00 |
149
157
  | The speed of parsing email(1000 emails) | 3.81s | 2.50s |
150
158
  | How to install | gem install | cpanm |
151
159
  | Dependencies (Except core modules) | 1 modules | 2 modules |
152
160
  | LOC:Source lines of code | 11700 lines | 9100 lines |
153
- | The number of tests in t/, xt/ directory | 90700 tests | 162400 tests |
161
+ | The number of tests in t/, xt/ directory | 92400 tests | 166700 tests |
154
162
  | License | BSD 2-Clause | BSD 2-Clause |
155
163
  | Support Contract provided by Developer | Coming soon | Available |
156
164
 
@@ -162,13 +170,13 @@ and Ruby version of Sisimai.
162
170
  | 機能 | Ruby version | Perl version|
163
171
  |------------------------------------------------|---------------|-------------|
164
172
  | 動作環境 | Ruby 2.1-2.3 | Perl 5.10 - |
165
- | | JRuby 9.0.0.0-| |
173
+ | | JRuby 9.0.4.0-| |
166
174
  | 解析精度の割合(2000通のメール)[1] | 1.00 | 1.00 |
167
175
  | メール解析速度(1000通のメール) | 3.81秒 | 2.50秒 |
168
176
  | インストール方法 | gem install | cpanm |
169
177
  | 依存モジュール数(コアモジュールを除く) | 1モジュール | 2モジュール |
170
178
  | LOC:ソースコードの行数 | 11700行 | 9100行 |
171
- | テスト件数(t/,xt/ディレクトリ) | 90700件 | 162400件 |
179
+ | テスト件数(t/,xt/ディレクトリ) | 92400件 | 166700件 |
172
180
  | ライセンス | 二条項BSD | 二条項BSD |
173
181
  | 開発会社によるサポート契約 | 準備中 | 提供中 |
174
182
 
@@ -238,7 +246,7 @@ details about these modules are available at
238
246
 
239
247
  Bounce Reason List | バウンス理由の一覧
240
248
  ----------------------------------------
241
- Sisimai can detect the following 25 bounce reasons. More details about reasons
249
+ Sisimai can detect the following 26 bounce reasons. More details about reasons
242
250
  are available at [Sisimai | Bounce Reason List](http://libsisimai.org/reason)
243
251
  page.
244
252
 
@@ -246,6 +254,7 @@ page.
246
254
  |----------------|----------------------------------------|----------------------------------|
247
255
  | Blocked | Blocked due to client IP address | IPアドレスによる拒否 |
248
256
  | ContentError | Invalid format email | 不正な形式のメール |
257
+ | Delivered | Successfully delivered (> v4.16.0) | 正常に配信された
249
258
  | ExceedLimit | Message size exceeded the limit(5.2.3) | メールサイズの超過 |
250
259
  | Expired | Delivery time expired | 配送時間切れ |
251
260
  | Feedback | Bounced for a complaint of the message | 元メールへの苦情によるバウンス |
@@ -270,7 +279,7 @@ page.
270
279
  | Undefined | Could not decide the error reason | バウンスした理由は特定出来ず |
271
280
  | Vacation | Auto replied message | 自動応答メッセージ |
272
281
 
273
- Sisimaiは上記のエラー25種を検出します。
282
+ Sisimaiは上記のエラー26種を検出します。
274
283
 
275
284
 
276
285
  Parsed data structure | 解析後のデータ構造
data/Rakefile CHANGED
@@ -1,6 +1,11 @@
1
- require 'bundler/gem_tasks'
2
1
  require 'rspec/core/rake_task'
3
-
2
+ require 'bundler/gem_helper'
3
+ if RUBY_PLATFORM =~ /java/
4
+ filename = 'sisimai-java'
5
+ else
6
+ filename = 'sisimai'
7
+ end
8
+ Bundler::GemHelper.install_tasks :name => filename
4
9
  RSpec::Core::RakeTask.new(:spec)
5
10
 
6
11
  task :default => :spec
data/lib/sisimai.rb CHANGED
@@ -13,15 +13,18 @@ module Sisimai
13
13
  def libname(); return 'Sisimai'; end
14
14
 
15
15
  # Wrapper method for parsing mailbox/maidir
16
- # @param [String] path Path to mbox or Maildir/
17
- # @return [Array] Parsed objects
18
- # @return [nil] nil if the argument was wrong or an empty array
19
- def make(path)
16
+ # @param [String] path Path to mbox or Maildir/
17
+ # @param [Hash] argvs Parser options(delivered=false)
18
+ # @options argvs [Boolean] delivered true: Include "delivered" reason
19
+ # @return [Array] Parsed objects
20
+ # @return [nil] nil if the argument was wrong or an empty array
21
+ def make(path, **argvs)
20
22
  return nil unless path
21
23
 
22
24
  require 'sisimai/mail'
23
25
  mail = Sisimai::Mail.new(path)
24
26
  list = []
27
+ opts = argvs[:delivered] || false
25
28
 
26
29
  return nil unless mail
27
30
  require 'sisimai/data'
@@ -31,7 +34,7 @@ module Sisimai
31
34
  # Read and parse each mail file
32
35
  mesg = Sisimai::Message.new(data: r)
33
36
  next if mesg.void
34
- data = Sisimai::Data.make(data: mesg)
37
+ data = Sisimai::Data.make(data: mesg, delivered: opts)
35
38
  next unless data
36
39
  list.concat(data) if data.size > 0
37
40
  end
@@ -41,12 +44,14 @@ module Sisimai
41
44
  end
42
45
 
43
46
  # Wrapper method to parse mailbox/Maildir and dump as JSON
44
- # @param [String] path Path to mbox or Maildir/
45
- # @return [String] Parsed data as JSON text
46
- def dump(path)
47
+ # @param [String] path Path to mbox or Maildir/
48
+ # @param [Hash] argvs Parser options
49
+ # @options argvs [Integer] delivered true: Include "delivered" reason
50
+ # @return [String] Parsed data as JSON text
51
+ def dump(path, **argvs)
47
52
  return nil unless path
48
53
 
49
- parseddata = Sisimai.make(path) || []
54
+ parseddata = Sisimai.make(path, argvs) || []
50
55
  if RUBY_PLATFORM =~ /java/
51
56
  # java-based ruby environment like JRuby.
52
57
  require 'jrjackson'
@@ -57,6 +62,34 @@ module Sisimai
57
62
  end
58
63
  return jsonstring
59
64
  end
65
+
66
+ # Parser engine list (MTA/MSP modules)
67
+ # @return [Hash] Parser engine table
68
+ def engine
69
+ names = %w|MTA MSP ARF RFC3464 RFC3834|
70
+ table = {}
71
+
72
+ names.each do |e|
73
+ r = 'Sisimai::' + e
74
+ require r.gsub('::', '/').downcase
75
+
76
+ if e == 'MTA' || e == 'MSP'
77
+ # Sisimai::MTA or Sisimai::MSP
78
+ Module.const_get(r).send(:index).each do |ee|
79
+ # Load and get the value of "description" from each module
80
+ rr = sprintf('Sisimai::%s::%s', e, ee)
81
+ require rr.gsub('::', '/').downcase
82
+ table[rr.to_sym] = Module.const_get(rr).send(:description)
83
+ end
84
+ else
85
+ # Sisimai::ARF, Sisimai::RFC3464, and Sisimai::RFC3834
86
+ table[r.to_sym] = Module.const_get(r).send(:description)
87
+ end
88
+ end
89
+
90
+ return table
91
+ end
92
+
60
93
  end
61
94
 
62
95
  end
data/lib/sisimai/data.rb CHANGED
@@ -104,13 +104,24 @@ module Sisimai
104
104
  @replycode = Sisimai::SMTP::Reply.find(argvs['diagnosticcode'])
105
105
  @softbounce = argvs['softbounce'] || ''
106
106
  @softbounce = 1 if @replycode =~ /\A4/
107
+
108
+ if cv = @action.match(/\A(.+?) .+/)
109
+ @action = cv[1]
110
+ end
111
+
112
+ if @replycode.size > 0 && @deliverystatus.size > 0
113
+ # The first digits did not match: 5.1.1 250
114
+ @replycode = '' unless @replycode[0, 1] == @deliverystatus[0, 1]
115
+ end
116
+
107
117
  end
108
118
 
109
119
  # Another constructor of Sisimai::Data
110
- # @param [Hash] argvs Data and orders
111
- # @option argvs [Sisimai::Message] Data Object
112
- # @return [Array, Undef] List of Sisimai::Data or Undef if the
113
- # argument is not Sisimai::Message object
120
+ # @param [Sisimai::Message] data Data Object
121
+ # @param [Hash] argvs Parser options
122
+ # @options argvs [Boolean] delivered true: Including "delivered" reason
123
+ # @return [Array, Nil] List of Sisimai::Data or Nil if the
124
+ # argument is not Sisimai::Message object
114
125
  def self.make(data: nil, **argvs)
115
126
  return nil unless data
116
127
  return nil unless data.is_a? Sisimai::Message
@@ -121,6 +132,7 @@ module Sisimai
121
132
  objectlist = []
122
133
  rxcommands = %r/\A(?:EHLO|HELO|MAIL|RCPT|DATA|QUIT)\z/
123
134
  givenorder = argvs['order'] || {}
135
+ delivered1 = argvs[:delivered] || false
124
136
 
125
137
  return nil unless messageobj.ds
126
138
  return nil unless messageobj.rfc822
@@ -166,7 +178,10 @@ module Sisimai
166
178
  'diagnostictype' => e['spec'] || '',
167
179
  'deliverystatus' => e['status'] || '',
168
180
  }
169
- next if p['deliverystatus'] =~ /\A2[.]/
181
+ unless delivered1
182
+ # Skip if the value of "deliverystatus" begins with "2." such as 2.1.5
183
+ next if p['deliverystatus'] =~ /\A2[.]/
184
+ end
170
185
 
171
186
  # EMAIL_ADDRESS:
172
187
  # Detect email address from message/rfc822 part
@@ -185,13 +200,6 @@ module Sisimai
185
200
  p['addresser'] ||= ''
186
201
  p['addresser'] = messageobj.header['to'] if p['addresser'].empty?
187
202
 
188
- if p['alias'] && Sisimai::RFC5322.is_emailaddress(p['alias'])
189
- # Alias address should be the value of "recipient", Replace the
190
- # value of recipient with the value of "alias".
191
- w = p['recipient']
192
- p['recipient'] = p['alias']
193
- p['alias'] = w
194
- end
195
203
  next unless p['addresser']
196
204
  next unless p['recipient']
197
205
 
@@ -38,11 +38,13 @@ module Sisimai
38
38
  return argvs.reason if argvs.reason.size > 0
39
39
  end
40
40
 
41
+ statuscode = argvs.deliverystatus || ''
41
42
  reasontext = ''
42
43
  classorder = %w|
43
44
  MailboxFull MesgTooBig ExceedLimit Suspend HasMoved NoRelaying UserUnknown
44
45
  Filtered Rejected HostUnknown SpamDetected TooManyConn Blocked
45
46
  |
47
+ return 'delivered' if statuscode =~ /\A2[.]/
46
48
 
47
49
  if argvs.diagnostictype == 'SMTP' || argvs.diagnostictype == ''
48
50
  # Diagnostic-Code: SMTP; ... or empty value
@@ -22,7 +22,8 @@ module Sisimai
22
22
  def match(argv1)
23
23
  return nil unless argv1
24
24
  regex = %r{(?:
25
- DNS[ ]records[ ]for[ ]the[ ]destination[ ]computer[ ]could[ ]not[ ]be[ ]found
25
+ could[ ]not[ ]connect[ ]and[ ]send[ ]the[ ]mail[ ]to
26
+ |DNS[ ]records[ ]for[ ]the[ ]destination[ ]computer[ ]could[ ]not[ ]be[ ]found
26
27
  |Hop[ ]count[ ]exceeded[ ]-[ ]possible[ ]mail[ ]loop
27
28
  |host[ ]is[ ]unreachable
28
29
  |mail[ ]forwarding[ ]loop[ ]for[ ]
@@ -70,9 +70,12 @@ module Sisimai
70
70
  return '' unless argv1.size > 0
71
71
  return '' if argv1 =~ /X-Unix;/i
72
72
 
73
- value = argv1.match(/\b([45][0-5][0-9])\b/)
74
- return value[1] if value
75
- return ''
73
+ if cv = argv1.match(/\b([45][0-5][0-9])\b/) || cv = argv1.match(/\b(25[0-3])\b/)
74
+ # 550, 447, or 250
75
+ return cv[1]
76
+ else
77
+ return ''
78
+ end
76
79
  end
77
80
  end
78
81
  end
@@ -541,6 +541,8 @@ module Sisimai
541
541
  # Imported from p5-Sisimail/lib/Sisimai/SMTP/Status.pm
542
542
  class << self
543
543
  StandardCode = {
544
+ '2.1.5' => 'delivered', # Successfully delivered
545
+ # ------------------------------------------------------------------------------
544
546
  '4.1.6' => 'hasmoved', # Destination mailbox has moved, No forwarding address
545
547
  '4.1.7' => 'rejected', # Bad sender's mailbox address syntax
546
548
  '4.1.8' => 'rejected', # Bad sender's system address
@@ -720,7 +722,7 @@ module Sisimai
720
722
  def name(argv1 = '')
721
723
  return '' unless argv1
722
724
  return '' unless argv1.size > 0
723
- return '' unless argv1 =~ /\A[45][.]\d[.]\d+\z/
725
+ return '' unless argv1 =~ /\A[245][.]\d[.]\d+\z/
724
726
  return StandardCode[argv1] || ''
725
727
  end
726
728
 
@@ -737,6 +739,7 @@ module Sisimai
737
739
  %r/[ ]?[(][#]([45][.]\d[.]\d+)[)]?[ ]?/, # #5.5.1
738
740
  %r/\b\d{3}[- ][#]?([45][.]\d[.]\d+)\b/, # 550-5.1.1 OR 550 5.5.1
739
741
  %r/\b([45][.]\d[.]\d+)\b/, # 5.5.1
742
+ %r/\b(2[.][0-7][.][0-7])\b/, # 2.1.5
740
743
  ]
741
744
 
742
745
  regularexp.each do |e|
@@ -1,4 +1,4 @@
1
1
  # Define the version number of Sisimai
2
2
  module Sisimai
3
- VERSION = '4.15.1'
3
+ VERSION = '4.16.0'
4
4
  end
@@ -0,0 +1,122 @@
1
+ From MAILER-DAEMON Thu Apr 29 23:34:45 2015
2
+ Return-Path: <>
3
+ X-Original-To: root@neko-222-2222.vs.example.ne.jp
4
+ Delivered-To: root@neko-222-2222.vs.example.ne.jp
5
+ Received: by neko-222-2222.vs.example.ne.jp (Postfix)
6
+ id CE7E412402D0; Thu, 29 Apr 2015 23:34:45 +0900 (JST)
7
+ Date: Thu, 29 Apr 2015 23:34:45 +0900 (JST)
8
+ From: MAILER-DAEMON@neko-222-2222.vs.example.ne.jp (Mail Delivery System)
9
+ Subject: Mail Delivery Status Report
10
+ To: root@neko-222-2222.vs.example.ne.jp
11
+ Auto-Submitted: auto-replied
12
+ MIME-Version: 1.0
13
+ Content-Type: multipart/report; report-type=delivery-status;
14
+ boundary="2222CCCC0022.2222000022/neko-222-2222.vs.example.ne.jp"
15
+ Message-Id: <20151025071802.CE7E412402D0@neko-222-2222.vs.example.ne.jp>
16
+
17
+ This is a MIME-encapsulated message.
18
+
19
+ --2222CCCC0022.2222000022/neko-222-2222.vs.example.ne.jp
20
+ Content-Description: Notification
21
+ Content-Type: text/plain; charset=us-ascii
22
+
23
+ This is the mail system at host neko-222-2222.vs.example.ne.jp.
24
+
25
+ Enclosed is the mail delivery report that you requested.
26
+
27
+ The mail system
28
+
29
+ <kijitora@neko.example.jp>: delivery via
30
+ mail.neko.example.jp[192.0.2.2]:25: 250 2.1.5 Ok
31
+
32
+ --2222CCCC0022.2222000022/neko-222-2222.vs.example.ne.jp
33
+ Content-Description: Delivery report
34
+ Content-Type: message/delivery-status
35
+
36
+ Reporting-MTA: dns; neko-222-2222.vs.example.ne.jp
37
+ X-Postfix-Queue-ID: 22CC00222233
38
+ X-Postfix-Sender: rfc822; root@neko-222-2222.vs.example.ne.jp
39
+ Arrival-Date: Thu, 29 Apr 2015 23:34:45 +0900 (JST)
40
+
41
+ Final-Recipient: rfc822; kijitora@neko.example.jp
42
+ Action: deliverable
43
+ Status: 2.1.5
44
+ Remote-MTA: dns; mail.neko.example.jp
45
+ Diagnostic-Code: smtp; 250 2.1.5 Ok
46
+
47
+ --2222CCCC0022.2222000022/neko-222-2222.vs.example.ne.jp
48
+ Content-Description: Message Headers
49
+ Content-Type: text/rfc822-headers
50
+
51
+ Return-Path: <root@neko-222-2222.vs.example.ne.jp>
52
+ Received: by neko-222-2222.vs.example.ne.jp (Postfix, from userid 0)
53
+ id 22CC00222233; Thu, 29 Apr 2015 23:34:45 +0900 (JST)
54
+ From: root@neko-222-2222.vs.example.ne.jp
55
+ Subject: Nyaaan
56
+ To: kijitora@neko.example.jp
57
+ Message-Id: <20151025071802.22CC00222233@neko-222-2222.vs.example.ne.jp>
58
+ Date: Thu, 29 Apr 2015 23:34:45 +0900 (JST)
59
+
60
+ --2222CCCC0022.2222000022/neko-222-2222.vs.example.ne.jp--
61
+
62
+ From MAILER-DAEMON Thu Apr 29 23:34:45 2015
63
+ Return-Path: <>
64
+ X-Original-To: root@neko-222-2222.vs.example.ne.jp
65
+ Delivered-To: root@neko-222-2222.vs.example.ne.jp
66
+ Received: by neko-222-2222.vs.example.ne.jp (Postfix)
67
+ id 0472E12402D0; Thu, 29 Apr 2015 23:34:45 +0900 (JST)
68
+ Date: Thu, 29 Apr 2015 23:34:45 +0900 (JST)
69
+ From: MAILER-DAEMON@neko-222-2222.vs.example.ne.jp (Mail Delivery System)
70
+ Subject: Mail Delivery Status Report
71
+ To: root@neko-222-2222.vs.example.ne.jp
72
+ Auto-Submitted: auto-replied
73
+ MIME-Version: 1.0
74
+ Content-Type: multipart/report; report-type=delivery-status;
75
+ boundary="CC002222FFEE.2200222222/neko-222-2222.vs.example.ne.jp"
76
+ Message-Id: <20151025071833.0472E12402D0@neko-222-2222.vs.example.ne.jp>
77
+
78
+ This is a MIME-encapsulated message.
79
+
80
+ --CC002222FFEE.2200222222/neko-222-2222.vs.example.ne.jp
81
+ Content-Description: Notification
82
+ Content-Type: text/plain; charset=us-ascii
83
+
84
+ This is the mail system at host neko-222-2222.vs.example.ne.jp.
85
+
86
+ Enclosed is the mail delivery report that you requested.
87
+
88
+ The mail system
89
+
90
+ <info@neko.example.jp>: delivery via mail.neko.example.jp[192.0.2.2]:25: 250
91
+ 2.1.5 Ok
92
+
93
+ --CC002222FFEE.2200222222/neko-222-2222.vs.example.ne.jp
94
+ Content-Description: Delivery report
95
+ Content-Type: message/delivery-status
96
+
97
+ Reporting-MTA: dns; neko-222-2222.vs.example.ne.jp
98
+ X-Postfix-Queue-ID: CC002222FFEE
99
+ X-Postfix-Sender: rfc822; root@neko-222-2222.vs.example.ne.jp
100
+ Arrival-Date: Thu, 29 Apr 2015 23:34:45 +0900 (JST)
101
+
102
+ Final-Recipient: rfc822; info@neko.example.jp
103
+ Action: deliverable
104
+ Status: 2.1.5
105
+ Remote-MTA: dns; mail.neko.example.jp
106
+ Diagnostic-Code: smtp; 250 2.1.5 Ok
107
+
108
+ --CC002222FFEE.2200222222/neko-222-2222.vs.example.ne.jp
109
+ Content-Description: Message Headers
110
+ Content-Type: text/rfc822-headers
111
+
112
+ Return-Path: <root@neko-222-2222.vs.example.ne.jp>
113
+ Received: by neko-222-2222.vs.example.ne.jp (Postfix, from userid 0)
114
+ id CC002222FFEE; Thu, 29 Apr 2015 23:34:45 +0900 (JST)
115
+ From: root@neko-222-2222.vs.example.ne.jp
116
+ Subject: Nyaaan
117
+ To: info@neko.example.jp
118
+ Message-Id: <20151025071832.CC002222FFEE@neko-222-2222.vs.example.ne.jp>
119
+ Date: Thu, 29 Apr 2015 23:34:45 +0900 (JST)
120
+
121
+ --CC002222FFEE.2200222222/neko-222-2222.vs.example.ne.jp--
122
+
@@ -0,0 +1,167 @@
1
+ Return-Path: <MAILER-DAEMON@nijo.example.jp>
2
+ Received: from localhost (localhost)
3
+ by nijo.example.jp (V8/cf) id q9RDSSCP020784;
4
+ Sat, 27 Oct 2012 22:28:28 +0900
5
+ Date: Sat, 27 Oct 2012 22:28:28 +0900
6
+ From: Mail Delivery Subsystem <MAILER-DAEMON@nijo.example.jp>
7
+ Message-Id: <201210271328.q9RDSSCP020784@nijo.example.jp>
8
+ To: <sironeko@example.jp>
9
+ MIME-Version: 1.0
10
+ Content-Type: multipart/report; report-type=delivery-status;
11
+ boundary="q9RDSSCP020784.1351344508/nijo.example.jp"
12
+ Subject: Returned mail: see transcript for details
13
+ Auto-Submitted: auto-generated (failure)
14
+
15
+ This is a MIME-encapsulated message
16
+
17
+ --q9RDSSCP020784.1351344508/nijo.example.jp
18
+
19
+ The original message was received at Sat, 27 Oct 2012 22:28:24 +0900
20
+ from 121-87-205-206f1.shg1.eonet.ne.jp [121.87.205.206]
21
+
22
+ ----- The following addresses had permanent fatal errors -----
23
+ <kijitora@example.com>
24
+ (reason: 550 5.7.1 message content rejected)
25
+
26
+ ----- Transcript of session follows -----
27
+ ... while talking to mail.example.com.:
28
+ >>> DATA
29
+ <<< 550 5.7.1 message content rejected
30
+ 554 5.0.0 Service unavailable
31
+
32
+ --q9RDSSCP020784.1351344508/nijo.example.jp
33
+ Content-Type: message/delivery-status
34
+
35
+ Reporting-MTA: dns; nijo.example.jp
36
+ Received-From-MTA: DNS; 121-87-205-206f1.shg1.eonet.ne.jp
37
+ Arrival-Date: Sat, 27 Oct 2012 22:28:24 +0900
38
+
39
+ Final-Recipient: RFC822; kijitora@example.com
40
+ Action: failed
41
+ Status: 5.7.1
42
+ Remote-MTA: DNS; mail.example.com
43
+ Diagnostic-Code: SMTP; 550 5.7.1 message content rejected
44
+ Last-Attempt-Date: Sat, 27 Oct 2012 22:28:28 +0900
45
+
46
+ --q9RDSSCP020784.1351344508/nijo.example.jp
47
+ Content-Type: message/rfc822
48
+
49
+ Return-Path: <sironeko@example.jp>
50
+ Received: from saburokaneie-mmdlvii.neko.nyaan.jp (121-87-205-206f1.shg1.eonet.ne.jp [121.87.205.206])
51
+ (authenticated bits=0)
52
+ by nijo.example.jp (V8/cf) with ESMTP id q9RDSNCP020779
53
+ for <kijitora@example.com>; Sat, 27 Oct 2012 22:28:24 +0900
54
+ Subject: =?utf-8?Q?Re=3A_=5B=E3=82=B5=E3=82=A4=E3=83=88=E3=81=8B=E3=82=89?=
55
+ =?utf-8?Q?=E3=81=AE=E3=81=8A=E5=95=8F=E5=90=88=E3=81=9B=5D=3A_?=
56
+ =?utf-8?Q?=E3=81=9D=E3=81=AE=E4=BB=96/bouncehammer?=
57
+ Mime-Version: 1.0 (Apple Message framework v1283)
58
+ Content-Type: multipart/mixed; boundary="Apple-Mail=_9FA97D51-44FA-47B6-A4B2-34BBD227EAE2"
59
+ From: "azuma, kuniyuki" <sironeko@example.jp>
60
+ X-Priority: 3 (Normal)
61
+ In-Reply-To: <zarafa.508a91a0.649e.6cedece87615712b@zarafa.vacmail.local>
62
+ Date: Sat, 27 Oct 2012 22:28:23 +0900
63
+ Message-Id: <44E68417-7E14-4546-A844-73B37944BA13@example.jp>
64
+ References: <201210191936.q9JJajf2025845@nijo.example.jp> <zarafa.508a91a0.649e.6cedece87615712b@zarafa.vacmail.local>
65
+ To: Arie Valstar <kijitora@example.com>
66
+ X-Mailer: Apple Mail (2.1283)
67
+
68
+
69
+ --Apple-Mail=_9FA97D51-44FA-47B6-A4B2-34BBD227EAE2
70
+ Content-Transfer-Encoding: quoted-printable
71
+ Content-Type: text/plain;
72
+ charset=iso-2022-jp
73
+
74
+ Hello Arie.
75
+
76
+ We have tested a bounce email from y.example.com. but mailboxparser reported =
77
+ the reason "userunknown".
78
+ Could you send a entire message (including all headers and a original =
79
+ message) like an attached email.
80
+
81
+ best regards.
82
+
83
+
84
+ --Apple-Mail=_9FA97D51-44FA-47B6-A4B2-34BBD227EAE2
85
+ Content-Disposition: attachment;
86
+ filename=500-from-y.example.com-1.eml
87
+ Content-Type: message/rfc822;
88
+ name="500-from-y.example.com-1.eml"
89
+ Content-Transfer-Encoding: binary
90
+
91
+ Return-Path: <MAILER-DAEMON@mta.example.jp>
92
+ Received: from localhost (localhost)
93
+ by mta.example.jp (V8/cf) id q9RDCuol017809;
94
+ Sat, 27 Oct 2012 22:12:56 +0900
95
+ Date: Sat, 27 Oct 2012 22:12:56 +0900
96
+ From: Mail Delivery Subsystem <MAILER-DAEMON@mta.example.jp>
97
+ Message-Id: <201210271312.q9RDCuol017809@mta.example.jp>
98
+ To: <mikeneko@example.jp>
99
+ MIME-Version: 1.0
100
+ Content-Type: multipart/report; report-type=delivery-status;
101
+ boundary="q9RDCuol017809.1351343576/mta.example.jp"
102
+ Subject: Returned mail: see transcript for details
103
+ Auto-Submitted: auto-generated (failure)
104
+
105
+ This is a MIME-encapsulated message
106
+
107
+ --q9RDCuol017809.1351343576/mta.example.jp
108
+
109
+ The original message was received at Sat, 27 Oct 2012 22:12:53 +0900
110
+ from 121-87-205-206f1.shg1.eonet.ne.jp [121.87.205.206]
111
+
112
+ ----- The following addresses had permanent fatal errors -----
113
+ <kijitora@y.example.com>
114
+ (reason: 554 delivery error: dd This user doesn't have a y.example.com account (kijitora@y.example.com) [0] - mta1397.mail.mud.y.example.com)
115
+
116
+ ----- Transcript of session follows -----
117
+ ... while talking to mta6.am0.yahoodns.net.:
118
+ >>> DATA
119
+ <<< 554 delivery error: dd This user doesn't have a y.example.com account (kijitora@y.example.com) [0] - mta1397.mail.mud.y.example.com
120
+ 554 5.0.0 Service unavailable
121
+
122
+ --q9RDCuol017809.1351343576/mta.example.jp
123
+ Content-Type: message/delivery-status
124
+
125
+ Reporting-MTA: dns; mta.example.jp
126
+ Received-From-MTA: DNS; 121-87-205-206f1.shg1.eonet.ne.jp
127
+ Arrival-Date: Sat, 27 Oct 2012 22:12:53 +0900
128
+
129
+ Final-Recipient: RFC822; kijitora@y.example.com
130
+ Action: failed
131
+ Status: 5.0.0
132
+ Remote-MTA: DNS; mta6.am0.yahoodns.net
133
+ Diagnostic-Code: SMTP; 554 delivery error: dd This user doesn't have a y.example.com account (kijitora@y.example.com) [0] - mta1397.mail.mud.y.example.com
134
+ Last-Attempt-Date: Sat, 27 Oct 2012 22:12:56 +0900
135
+
136
+ --q9RDCuol017809.1351343576/mta.example.jp
137
+ Content-Type: message/rfc822
138
+
139
+ Return-Path: <mikeneko@example.jp>
140
+ Received: from saburokaneie-mmdlvii.neko.nyaan.jp (121-87-205-206f1.shg1.eonet.ne.jp [121.87.205.206])
141
+ (authenticated bits=0)
142
+ by mta.example.jp (V8/cf) with ESMTP id q9RDCrol017804
143
+ for <kijitora@y.example.com>; Sat, 27 Oct 2012 22:12:53 +0900
144
+ From: "mikeneko, nyanko" <mikeneko@example.jp>
145
+ Content-Type: text/plain; charset=us-ascii
146
+ Content-Transfer-Encoding: 7bit
147
+ Subject: Nyaan
148
+ Date: Sat, 27 Oct 2012 22:12:52 +0900
149
+ Message-Id: <951712FF-EA9E-4827-964C-673EE509AA33@example.jp>
150
+ To: kijitora@y.example.com
151
+ Mime-Version: 1.0 (Apple Message framework v1283)
152
+ X-Mailer: Apple Mail (2.1283)
153
+
154
+ Nyaan
155
+
156
+ --q9RDCuol017809.1351343576/mta.example.jp--
157
+
158
+
159
+ --Apple-Mail=_9FA97D51-44FA-47B6-A4B2-34BBD227EAE2
160
+ Content-Transfer-Encoding: quoted-printable
161
+ Content-Type: text/plain;
162
+ charset=iso-2022-jp
163
+
164
+ --Apple-Mail=_9FA97D51-44FA-47B6-A4B2-34BBD227EAE2--
165
+
166
+ --q9RDSSCP020784.1351344508/nijo.example.jp--
167
+
@@ -2,12 +2,12 @@ Received: (qmail 21084 invoked from network); 12 Jun 2013 02:22:14 -0000
2
2
  Received: from gargamel.example.com (192.0.2.146)
3
3
  by athena.internal.example.com with SMTP; 12 Jun 2013 02:22:14 -0000
4
4
  Received: (qmail 19083 invoked from network); 12 Jun 2013 02:22:13 -0000
5
- Received: from txslspamp2.vtext.example.com ([192.0.2.195])
5
+ Received: from txslspamp2.vtext.com ([192.0.2.195])
6
6
  by gargamel.example.com ([192.0.2.146])
7
7
  with ESMTP via SSL; 12 Jun 2013 02:22:13 -0000
8
8
  Received: from unknown (HELO VZW) ([192.0.2.8])
9
- by txslspamp2.vtext.example.com with ESMTP; 12 Jun 2013 02:22:13 +0000
10
- From: post_master@vtext.example.com
9
+ by txslspamp2.vtext.com with ESMTP; 12 Jun 2013 02:22:13 +0000
10
+ From: post_master@vtext.com
11
11
  To: kijitora@example.com
12
12
  Message-ID: <00000000.000000.0000000000000.JavaMail.c@example.com>
13
13
  In-Reply-To: <00000000000000.00000.qmail@example.com>
@@ -35,7 +35,7 @@ Message details:
35
35
  Subject: Test message
36
36
  Sent date: Wed Jun 12 02:21:53 GMT 2013
37
37
  MAIL FROM: kijitora@example.com
38
- RCPT TO: 000000000000@vtext.example.com
38
+ RCPT TO: 000000000000@vtext.com
39
39
  From: shironeko@example.com
40
40
  CC: recipient list not shown: ;
41
41
  Size (in bytes): 39
@@ -1 +1 @@
1
- Received: (qmail 21084 invoked from network); 12 Jun 2013 02:22:14 -0000
2
- -----=_Part_000000_0000000.000000000000
3
- -----=_Part_000001_0000000.000000000000
4
1
  Subject: Test message
5
2
  Sent date: Wed Jun 12 02:21:53 GMT 2013
6
3
  MAIL FROM: kijitora@example.com
7
4
  RCPT TO: 000000000000@vtext.example.com
8
5
  From: shironeko@example.com
9
6
  CC: recipient list not shown: ;
10
7
  Size (in bytes): 39
11
8
  Number of lines: 2
12
- -----=_Part_000001_0000000.000000000000--
13
- -----=_Part_000000_0000000.000000000000--
9
+ Received: (qmail 21084 invoked from network); 12 Jun 2013 02:22:14 -0000
14
- -----=_Part_000000_0000000.000000000000
15
- -----=_Part_000001_0000000.000000000000
16
10
  Subject: Test message
17
11
  Sent date: Wed Jun 12 02:21:53 GMT 2013
18
12
  MAIL FROM: kijitora@example.com
19
13
  RCPT TO: 000000000000@vtext.com
20
14
  From: shironeko@example.com
21
15
  CC: recipient list not shown: ;
22
16
  Size (in bytes): 39
23
17
  Number of lines: 2
24
- -----=_Part_000001_0000000.000000000000--
25
- -----=_Part_000000_0000000.000000000000--
@@ -0,0 +1,29 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'sisimai/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'sisimai'
8
+ spec.version = Sisimai::VERSION
9
+ spec.authors = ['azumakuniyuki']
10
+ spec.email = ['azumakuniyuki+rubygems.org@gmail.com']
11
+
12
+ spec.summary = 'Mail Analyzing Interface'
13
+ spec.description = 'Sisimai is a Ruby library for analyzing RFC5322 bounce emails and generating structured data from parsed results.'
14
+ spec.homepage = 'http://libsisimai.org/'
15
+ spec.license = 'BSD-2-Clause'
16
+ spec.platform = "java"
17
+
18
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
19
+ spec.bindir = 'exe'
20
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
+ spec.require_paths = ['lib']
22
+
23
+ spec.required_ruby_version = '>= 2.1.0'
24
+
25
+ spec.add_development_dependency 'bundler', '~> 1.8'
26
+ spec.add_development_dependency 'rake', '~> 10.0'
27
+ spec.add_development_dependency 'rspec', '~> 0'
28
+ spec.add_runtime_dependency 'jrjackson','~> 0.3','>= 0.3.8'
29
+ end
data/sisimai.gemspec CHANGED
@@ -23,5 +23,6 @@ Gem::Specification.new do |spec|
23
23
 
24
24
  spec.add_development_dependency 'bundler', '~> 1.8'
25
25
  spec.add_development_dependency 'rake', '~> 10.0'
26
- spec.add_development_dependency 'rspec'
26
+ spec.add_development_dependency 'rspec', '~> 0'
27
+ spec.add_runtime_dependency 'oj', '~> 2.14', '>= 2.14.4'
27
28
  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.15.1
4
+ version: 4.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - azumakuniyuki
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-02-16 00:00:00.000000000 Z
11
+ date: 2016-02-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -42,16 +42,36 @@ dependencies:
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: oj
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '2.14'
62
+ - - ">="
63
+ - !ruby/object:Gem::Version
64
+ version: 2.14.4
65
+ type: :runtime
66
+ prerelease: false
67
+ version_requirements: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - "~>"
70
+ - !ruby/object:Gem::Version
71
+ version: '2.14'
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: 2.14.4
55
75
  description: Sisimai is a Ruby library for analyzing RFC5322 bounce emails and generating
56
76
  structured data from parsed results.
57
77
  email:
@@ -347,6 +367,7 @@ files:
347
367
  - set-of-emails/maildir/bsd/rfc3464-25.eml
348
368
  - set-of-emails/maildir/bsd/rfc3464-26.eml
349
369
  - set-of-emails/maildir/bsd/rfc3464-27.eml
370
+ - set-of-emails/maildir/bsd/rfc3464-28.eml
350
371
  - set-of-emails/maildir/bsd/rfc3834-01.eml
351
372
  - set-of-emails/maildir/bsd/rfc3834-02.eml
352
373
  - set-of-emails/maildir/bsd/rfc3834-03.eml
@@ -394,6 +415,7 @@ files:
394
415
  - set-of-emails/maildir/bsd/sendmail-35.eml
395
416
  - set-of-emails/maildir/bsd/sendmail-36.eml
396
417
  - set-of-emails/maildir/bsd/sendmail-37.eml
418
+ - set-of-emails/maildir/bsd/sendmail-38.eml
397
419
  - set-of-emails/maildir/bsd/surfcontrol-01.eml
398
420
  - set-of-emails/maildir/bsd/surfcontrol-02.eml
399
421
  - set-of-emails/maildir/bsd/surfcontrol-03.eml
@@ -628,6 +650,7 @@ files:
628
650
  - set-of-emails/to-be-debugged-because/something-is-wrong/issue-106-03.eml
629
651
  - set-of-emails/to-be-debugged-because/something-is-wrong/no-message-id-from-pr-150.eml
630
652
  - set-of-emails/to-be-parsed-for-test/README.md
653
+ - sisimai-java.gemspec
631
654
  - sisimai.gemspec
632
655
  homepage: http://libsisimai.org/
633
656
  licenses:
@@ -654,3 +677,4 @@ signing_key:
654
677
  specification_version: 4
655
678
  summary: Mail Analyzing Interface
656
679
  test_files: []
680
+ has_rdoc: