sisimai 4.17.1-java → 4.17.2-java

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: 2bbd17b4c8113dad76c2819bc54790ec4215d373
4
- data.tar.gz: 289bdcb78ccd2887782eab1550515706df8194d0
3
+ metadata.gz: 18a17f856b1223d3b3777f53a8f5dc36b5e6c962
4
+ data.tar.gz: ee6819b03b540a153c713a931c41025ebad0ddf9
5
5
  SHA512:
6
- metadata.gz: f3b6eb2c98819e4956ea74f0d77021ba273f98c066e8491c21def508eea4ae8c7d535178a4a36e3556302c41066750b474a5dfe4a6a18ced6667191135b77a75
7
- data.tar.gz: a5d2f74299d6e113fd0a31bf72d8c41f741a833de442d703a6188390ad9866eb7b8e92cf1ebb6289e878b350d9184c1d79e1f12fe8fdddac3bc1f9c1e2cb910c
6
+ metadata.gz: 3ae13ce39645c595f7b3689daad24c67ae168b2469eeaca4c8c77eb857bc2a825ddf062a3559f5b2fca1ef136850672cacb353afb912d532e90d630b6514fd28
7
+ data.tar.gz: ff401a92acfe61642f10e248f7c72510d68d3ba41c7339aa95bca8cc924152adcc685999949bf5a075a08bd5597582fce303137d55a6c422f1693f75ad06b158
data/Changes CHANGED
@@ -1,5 +1,11 @@
1
1
  Revision history for Ruby version of Sisimai
2
2
 
3
+ 4.17.2 Tue, 26 Jul 2016 21:00:17 +0900 (JST)
4
+ - Issue #174, Implement Sisimai::Rhost::ExchangeOnline for the bounce mail
5
+ from on-premises Exchange 2013 and Office 365.
6
+ - The reason of status code: 4.4.5 is "systemfull".
7
+ - Code improvement at Sisimai::MSP::US::Office365.
8
+
3
9
  4.17.1 Wed, 30 Mar 2016 14:00:22 +0900 (JST)
4
10
  - Ported codes from https://github.com/sisimai/p5-Sisimai/pull/180 to fix
5
11
  issue https://github.com/sisimai/p5-Sisimai/issues/179 a variable in lib/
data/Makefile CHANGED
@@ -42,6 +42,12 @@ install-from-local:
42
42
  PATH="$$PATH:$(JRUBY)/bin" $(JRUBY)/bin/rake install; \
43
43
  fi
44
44
 
45
+ build:
46
+ $(RAKE) $@
47
+ if [ -d "$(JRUBY)" ]; then \
48
+ PATH="$$PATH:$(JRUBY)/bin" $(JRUBY)/bin/rake $@; \
49
+ fi
50
+
45
51
  release:
46
52
  $(RAKE) release
47
53
  if [ -d "$(JRUBY)" ]; then \
data/README-JA.md ADDED
@@ -0,0 +1,321 @@
1
+ [![License](https://img.shields.io/badge/license-BSD%202--Clause-orange.svg)](https://github.com/sisimai/rb-Sisimai/blob/master/LICENSE)
2
+ [![Coverage Status](https://img.shields.io/coveralls/sisimai/rb-Sisimai.svg)](https://coveralls.io/r/sisimai/rb-Sisimai)
3
+ [![Build Status](https://travis-ci.org/sisimai/rb-Sisimai.svg?branch=master)](https://travis-ci.org/sisimai/rb-Sisimai)
4
+ [![Codacy Badge](https://api.codacy.com/project/badge/grade/38340177e6284a65be69c0c7c3dc2b58)](https://www.codacy.com/app/azumakuniyuki/rb-Sisimai)
5
+ [![Ruby](https://img.shields.io/badge/ruby-v2.1.0--v2.3.0-red.svg)](https://www.ruby-lang.org/)
6
+ [![Gem Version](https://badge.fury.io/rb/sisimai.svg)](https://badge.fury.io/rb/sisimai)
7
+
8
+ ![](http://41.media.tumblr.com/45c8d33bea2f92da707f4bbe66251d6b/tumblr_nuf7bgeyH51uz9e9oo1_1280.png)
9
+
10
+ シシマイ?
11
+ =========
12
+ Sisimai(シシマイ)はRFC5322準拠のエラーメールを解析し、解析結果をデータ構造に
13
+ 変換するインターフェイスを提供するRubyライブラリです。
14
+ [github.com/sisimai/p5-Sisimai](https://github.com/sisimai/p5-Sisimai/)
15
+ で公開しているPerl版シシマイから移植しました。
16
+
17
+ 主な特徴的機能
18
+ --------------
19
+ * __エラーメールをデータ構造に変換__
20
+ * Perlのデータ形式とJSONに対応
21
+ * __インストールも使用も簡単__
22
+ * gem install
23
+ * git clone & make
24
+ * __高い解析精度__
25
+ * 解析精度はbounceHammerの二倍
26
+ * 26種類のMTAに対応
27
+ * 21種類の著名なMSPに対応
28
+ * Feedback Loopにも対応
29
+ * 27種類のエラー理由を検出
30
+
31
+ シシマイを使う準備
32
+ ==================
33
+ 動作環境
34
+ --------
35
+ Sisimaiの動作環境についての詳細は
36
+ [Sisimai | シシマイを使ってみる](http://libsisimai.org/ja/start)をご覧ください。
37
+
38
+
39
+ * [Ruby 2.1.0 or later](http://www.ruby-lang.org/)
40
+ * [__Oj | The fastest JSON parser and object serializer__](https://rubygems.org/gems/oj)
41
+ * Also works on [JRuby 9.0.0.0 or later](http://jruby.org)
42
+ * [__JrJackson | A mostly native JRuby wrapper for the java jackson json processor jar__](https://rubygems.org/gems/jrjackson)
43
+
44
+ インストール
45
+ ------------
46
+ ### From RubyGems.org
47
+
48
+ ```shell
49
+ % sudo gem install sisimai
50
+ Fetching: sisimai-4.16.0.gem (100%)
51
+ Successfully installed sisimai-4.16.0
52
+ Parsing documentation for sisimai-4.16.0
53
+ Installing ri documentation for sisimai-4.16.0
54
+ Done installing documentation for sisimai after 6 seconds
55
+ 1 gem installed
56
+ ```
57
+
58
+ ### From GitHub
59
+
60
+ ```shell
61
+ % cd /usr/local/src
62
+ % git clone https://github.com/sisimai/rb-Sisimai.git
63
+ % cd ./rb-Sisimai
64
+ % sudo make depend install-from-local
65
+ gem install bundle rake rspec coveralls
66
+ Successfully installed bundle-0.0.1
67
+ Parsing documentation for bundle-0.0.1
68
+ Done installing documentation for bundle after 0 seconds
69
+ Successfully installed rake-10.5.0
70
+ Parsing documentation for rake-10.5.0
71
+ Done installing documentation for rake after 1 seconds
72
+ Successfully installed rspec-3.4.0
73
+ Parsing documentation for rspec-3.4.0
74
+ Done installing documentation for rspec after 0 seconds
75
+ Successfully installed coveralls-0.8.10
76
+ Parsing documentation for coveralls-0.8.10
77
+ Done installing documentation for coveralls after 0 seconds
78
+ 4 gems installed
79
+ bundle exec rake install
80
+ sisimai 4.14.2 built to pkg/sisimai-4.16.0.gem.
81
+ sisimai (4.14.2) installed.
82
+ ```
83
+
84
+ 使い方
85
+ ======
86
+ 基本的な使い方
87
+ --------------
88
+ 下記のようにSisimaiの`make()`メソッドをmboxかMaildirのPATHを引数にして実行すると
89
+ 解析結果が配列で返ってきます。
90
+
91
+ ```ruby
92
+ #! /usr/bin/env ruby
93
+ require 'sisimai'
94
+ v = Sisimai.make('/path/to/mbox') # or path to Maildir/
95
+
96
+ # If you want to get bounce records which reason is "delivered", set "delivered"
97
+ # option to make() method like the following:
98
+ v = Sisimai.make('/path/to/mbox', delivered: true)
99
+
100
+ unless v.void
101
+ v.each do |e|
102
+ puts e.class # Sisimai::Data
103
+ puts e.recipient.class # Sisimai::Address
104
+ puts e.timestamp.class # Sisimai::Time
105
+
106
+ puts e.addresser.address # shironeko@example.org # From
107
+ puts e.recipient.address # kijitora@example.jp # To
108
+ puts e.recipient.host # example.jp
109
+ puts e.deliverystatus # 5.1.1
110
+ puts e.replycode # 550
111
+ puts e.reason # userunknown
112
+
113
+ h = e.damn # Convert to HASH
114
+ j = e.dump('json') # Convert to JSON string
115
+ puts e.dump('json') # JSON formatted bounce data
116
+ end
117
+ end
118
+
119
+ # Get JSON string from parsed mailbox or Maildir/
120
+ puts Sisimai.dump('/path/to/mbox') # or path to Maildir/
121
+
122
+ # dump() method also accepts "delivered" option like the following code:
123
+ puts Sisimai.dump('/path/to/mbox', delivered: true)
124
+ ```
125
+
126
+ ```json
127
+ [{"recipient": "kijitora@example.jp", "addresser": "shironeko@1jo.example.org", "feedbacktype": "", "action": "failed", "subject": "Nyaaaaan", "smtpcommand": "DATA", "diagnosticcode": "550 Unknown user kijitora@example.jp", "listid": "", "destination": "example.jp", "smtpagent": "Courier", "lhost": "1jo.example.org", "deliverystatus": "5.0.0", "timestamp": 1291954879, "messageid": "201012100421.oBA4LJFU042012@1jo.example.org", "diagnostictype": "SMTP", "timezoneoffset": "+0900", "reason": "filtered", "token": "ce999a4c869e3f5e4d8a77b2e310b23960fb32ab", "alias": "", "senderdomain": "1jo.example.org", "rhost": "mfsmax.example.jp"}, {"diagnostictype": "SMTP", "timezoneoffset": "+0900", "reason": "userunknown", "timestamp": 1381900535, "messageid": "E1C50F1B-1C83-4820-BC36-AC6FBFBE8568@example.org", "token": "9fe754876e9133aae5d20f0fd8dd7f05b4e9d9f0", "alias": "", "senderdomain": "example.org", "rhost": "mx.bouncehammer.jp", "action": "failed", "addresser": "kijitora@example.org", "recipient": "userunknown@bouncehammer.jp", "feedbacktype": "", "smtpcommand": "DATA", "subject": "バウンスメールのテスト(日本語)", "destination": "bouncehammer.jp", "listid": "", "diagnosticcode": "550 5.1.1 <userunknown@bouncehammer.jp>... User Unknown", "deliverystatus": "5.1.1", "lhost": "p0000-ipbfpfx00kyoto.kyoto.example.co.jp", "smtpagent": "Sendmail"}]
128
+ ```
129
+
130
+ ワンライナーで
131
+ --------------
132
+
133
+ ```shell
134
+ % ruby -rsisimai -e 'puts Sisimai.dump($*.shift)' /path/to/mbox
135
+ ```
136
+
137
+ Perl版Sisimaiとの違い
138
+ ---------------------
139
+ 公開中のPerl版Sisimai(p5-Sisimai)とRuby版Sisimai(rb-Sisimai)は下記のような違いが
140
+ あります。bounceHammer version 2.7.13p3とSisimai(シシマイ)の違いについては
141
+ [Sisimai | 違いの一覧](http://libsisimai.org/ja/diff)をご覧ください。
142
+
143
+ | 機能 | Ruby version | Perl version |
144
+ |---------------------------------------------|----------------|---------------|
145
+ | 動作環境 | Ruby 2.1-2.3 | Perl 5.10 - |
146
+ | | JRuby 9.0.4.0- | |
147
+ | 解析精度の割合(2000通のメール)[1] | 1.00 | 1.00 |
148
+ | メール解析速度(1000通のメール) | 3.30秒 | 2.33秒 |
149
+ | インストール方法 | gem install | cpanm |
150
+ | 依存モジュール数(コアモジュールを除く) | 1モジュール | 2モジュール |
151
+ | LOC:ソースコードの行数 | 11000行 | 8000行 |
152
+ | テスト件数(t/,xt/ディレクトリ) | 94700件 | 170000件 |
153
+ | ライセンス | 二条項BSD | 二条項BSD |
154
+ | 開発会社によるサポート契約 | 準備中 | 提供中 |
155
+
156
+ 1. [./ANALYTICAL-PRECISION](https://github.com/sisimai/rb-Sisimai/blob/master/ANALYTICAL-PRECISION)を参照
157
+
158
+ MTA/MSPモジュール一覧
159
+ ---------------------
160
+ 下記はSisimaiに含まれてるMTA/MSP(メールサービスプロバイダ)モジュールの一覧です。
161
+ より詳しい情報は[Sisimai | 解析エンジン](http://libsisimai.org/ja/engine)を
162
+ ご覧ください。
163
+
164
+ | Module Name(Sisimai::) | Description |
165
+ |--------------------------|---------------------------------------------------|
166
+ | MTA::Activehunter | TransWARE Active!hunter |
167
+ | MTA::ApacheJames | Java Apache Mail Enterprise Server |
168
+ | MTA::Courier | Courier MTA |
169
+ | MTA::Domino | IBM Domino Server |
170
+ | MTA::Exchange | Microsoft Exchange Server |
171
+ | MTA::Exim | Exim |
172
+ | MTA::IMailServer | IPSWITCH IMail Server |
173
+ | MTA::InterScanMSS | Trend Micro InterScan Messaging Security Suite |
174
+ | MTA::MXLogic | McAfee SaaS |
175
+ | MTA::MailFoundry | MailFoundry |
176
+ | MTA::MailMarshalSMTP | Trustwave Secure Email Gateway |
177
+ | MTA::McAfee | McAfee Email Appliance |
178
+ | MTA::MessagingServer | Oracle Communications Messaging Server |
179
+ | MTA::MFILTER | Digital Arts m-FILTER |
180
+ | MTA::Notes | Lotus Notes |
181
+ | MTA::OpenSMTPD | OpenSMTPD |
182
+ | MTA::Postfix | Postfix |
183
+ | MTA::Qmail | qmail |
184
+ | MTA::Sendmail | V8Sendmail: /usr/sbin/sendmail |
185
+ | MTA::SurfControl | WebSense SurfControl |
186
+ | MTA::V5sendmail | Sendmail version 5 |
187
+ | MTA::X1 | Unknown MTA #1 |
188
+ | MTA::X2 | Unknown MTA #2 |
189
+ | MTA::X3 | Unknown MTA #3 |
190
+ | MTA::X4 | Unknown MTA #4 qmail clones |
191
+ | MTA::X5 | Unknown MTA #5 |
192
+ | MSP::DE::EinsUndEins | 1&1: http://www.1and1.de |
193
+ | MSP::DE::GMX | GMX: http://www.gmx.net |
194
+ | MSP::JP::Biglobe | BIGLOBE: http://www.biglobe.ne.jp |
195
+ | MSP::JP::EZweb | au EZweb: http://www.au.kddi.com/mobile/ |
196
+ | MSP::JP::KDDI | au by KDDI: http://www.au.kddi.com |
197
+ | MSP::RU::MailRu | @mail.ru: https://mail.ru |
198
+ | MSP::RU::Yandex | Yandex.Mail: http://www.yandex.ru |
199
+ | MSP::UK::MessageLabs | Symantec.cloud http://www.messagelabs.com |
200
+ | MSP::US::AmazonSES | AmazonSES(Sending): http://aws.amazon.com/ses/ |
201
+ | MSP::US::AmazonWorkMail | Amazon WorkMail: https://aws.amazon.com/workmail/ |
202
+ | MSP::US::Aol | Aol Mail: http://www.aol.com |
203
+ | MSP::US::Bigfoot | Bigfoot: http://www.bigfoot.com |
204
+ | MSP::US::Facebook | Facebook: https://www.facebook.com |
205
+ | MSP::US::Google | Google Gmail: https://mail.google.com |
206
+ | MSP::US::Office365 | Microsoft Office 365: http://office.microsoft.com/|
207
+ | MSP::US::Outlook | Microsoft Outlook.com: https://www.outlook.com/ |
208
+ | MSP::US::ReceivingSES | AmazonSES(Receiving): http://aws.amazon.com/ses/ |
209
+ | MSP::US::SendGrid | SendGrid: http://sendgrid.com/ |
210
+ | MSP::US::Verizon | Verizon Wireless: http://www.verizonwireless.com |
211
+ | MSP::US::Yahoo | Yahoo! MAIL: https://www.yahoo.com |
212
+ | MSP::US::Zoho | Zoho Mail: https://www.zoho.com |
213
+ | ARF | Abuse Feedback Reporting Format |
214
+ | RFC3464 | Fallback Module for MTAs |
215
+ | RFC3834 | Detector for auto replied message |
216
+
217
+ バウンス理由の一覧
218
+ ------------------
219
+ Sisimaiは下記のエラー27種を検出します。バウンス理由についてのより詳細な情報は
220
+ [Sisimai | バウンス理由の一覧](http://libsisimai.org/ja/reason)をご覧ください。
221
+
222
+ | バウンス理由 | 理由の説明 | 実装バージョン |
223
+ |----------------|--------------------------------------------|----------------|
224
+ | Blocked | IPアドレスやホスト名による拒否 | |
225
+ | ContentError | 不正な形式のヘッダまたはメール | |
226
+ | Delivered[1] | 正常に配信された | v4.16.0 |
227
+ | ExceedLimit | メールサイズの超過 | |
228
+ | Expired | 配送時間切れ | |
229
+ | Feedback | 元メールへの苦情によるバウンス(FBL形式の) | |
230
+ | Filtered | DATAコマンド以降で拒否された | |
231
+ | HasMoved | 宛先メールアドレスは移動した | |
232
+ | HostUnknown | 宛先ホスト名が存在しない | |
233
+ | MailboxFull | メールボックスが一杯 | |
234
+ | MailerError | メールプログラムのエラー | |
235
+ | MesgTooBig | メールが大き過ぎる | |
236
+ | NetworkError | DNS等ネットワーク関係のエラー | |
237
+ | NotAccept | 宛先ホストはメールを受けとらない | |
238
+ | OnHold | エラー理由の特定は保留 | |
239
+ | Rejected | エンベロープFromで拒否された | |
240
+ | NoRelaying | リレーの拒否 | |
241
+ | SecurityError | ウィルスの検出または認証失敗 | |
242
+ | SpamDetected | メールはスパムとして判定された | |
243
+ | Suspend | 宛先アカウントは一時的に停止中 | |
244
+ | SyntaxError | SMTPの文法エラー | v4.17.0 |
245
+ | SystemError | 宛先サーバでのOSレベルのエラー | |
246
+ | SystemFull | 宛先サーバのディスクが一杯 | |
247
+ | TooManyConn | 接続制限数を超過した | |
248
+ | UserUnknown | 宛先メールアドレスは存在しない | |
249
+ | Undefined | バウンスした理由は特定出来ず | |
250
+ | Vacation | 自動応答メッセージ | v4.1.28 |
251
+
252
+ 1. このバウンス理由は標準では解析結果に含まれません
253
+
254
+
255
+ 解析後のデータ構造
256
+ ------------------
257
+ 下記の表は解析後のバウンスメールの構造(`Sisimai::Data`)です。データ構造のより詳細な情報は
258
+ [Sisimai | Sisimai::Dataのデータ構造](http://libsisimai.org/ja/data)をご覧ください。
259
+
260
+ | アクセサ名 | 値の説明 |
261
+ |----------------|-------------------------------------------------------------|
262
+ | action | Action:ヘッダの値 |
263
+ | addresser | 送信者のアドレス |
264
+ | alias | 受信者アドレスのエイリアス |
265
+ | destination | "recipient"のドメイン部分 |
266
+ | deliverystatus | 配信状態(DSN)の値(例: 5.1.1, 4.4.7) |
267
+ | diagnosticcode | エラーメッセージ |
268
+ | diagnostictype | エラーメッセージの種別 |
269
+ | feedbacktype | Feedback-Typeのフィールド |
270
+ | lhost | 送信側MTAのホスト名 |
271
+ | listid | 本メールのList-Idヘッダの値 |
272
+ | messageid | 元メールのMessage-Idヘッダの値 |
273
+ | reason | 検出したバウンスした理由 |
274
+ | recipient | バウンスした受信者のアドレス |
275
+ | replycode | SMTP応答コード(例: 550, 421) |
276
+ | rhost | 受信側MTAのホスト名 |
277
+ | senderdomain | "addresser"のドメイン部分 |
278
+ | softbounce | ソフトバウンスであるかどうか(0=hard,1=soft,-1=不明) |
279
+ | smtpagent | 解析に使用したMTA/MSPのモジュール名(Sisimai::MTA::,MSP::) |
280
+ | smtpcommand | セッション中最後のSMTPコマンド |
281
+ | subject | 元メールのSubjectヘッダの値(UTF-8) |
282
+ | timestamp | バウンスした日時(UNIXマシンタイム) |
283
+ | timezoneoffset | タイムゾーンの時差(例:+0900) |
284
+ | token | 送信者と受信者・時刻から作られるハッシュ値 |
285
+
286
+ 解析出来ないメール
287
+ ------------------
288
+ 解析出来ないバウンスメールは`set-of-emails/to-be-debugged-because/sisimai-cannot-parse-yet`
289
+ ディレクトリにはいっています。もしもSisimaiで解析出来ないメールを見つけたら、
290
+ このディレクトリに追加してPull-Requestを送ってください。
291
+
292
+ その他の情報
293
+ ============
294
+ 関連サイト
295
+ ----------
296
+ * __@libsisimai__ | [Sisimai on Twitter (@libsisimai)](https://twitter.com/libsisimai)
297
+ * __libsisimai.org__ | [Sisimai | The successor to bounceHammer, Library to parse bounce mails](http://libsisimai.org/)
298
+ * __GitHub__ | [github.com/sisimai/rb-Sisimai](https://github.com/sisimai/rb-Sisimai)
299
+ * __Perl verson__ | [Perl version of Sisimai](https://github.com/sisimai/p5-Sisimai)
300
+
301
+ 参考情報
302
+ --------
303
+ * [README.md - README.md in English](https://github.com/sisimai/rb-Sisimai/blob/master/README.md)
304
+ * [RFC3463 - Enhanced Mail System Status Codes](https://tools.ietf.org/html/rfc3463)
305
+ * [RFC3464 - An Extensible Message Format for Delivery Status Notifications](https://tools.ietf.org/html/rfc3464)
306
+ * [RFC3834 - Recommendations for Automatic Responses to Electronic Mail](https://tools.ietf.org/html/rfc3834)
307
+ * [RFC5321 - Simple Mail Transfer Protocol](https://tools.ietf.org/html/rfc5321)
308
+ * [RFC5322 - Internet Message Format](https://tools.ietf.org/html/rfc5322)
309
+
310
+ 作者
311
+ ----
312
+ [@azumakuniyuki](https://twitter.com/azumakuniyuki)
313
+
314
+ 著作権
315
+ ------
316
+ Copyright (C) 2015-2016 azumakuniyuki, All Rights Reserved.
317
+
318
+ ライセンス
319
+ ----------
320
+ This software is distributed under The BSD 2-Clause License.
321
+
data/README.md CHANGED
@@ -7,47 +7,41 @@
7
7
 
8
8
  ![](http://41.media.tumblr.com/45c8d33bea2f92da707f4bbe66251d6b/tumblr_nuf7bgeyH51uz9e9oo1_1280.png)
9
9
 
10
- What is Sisimai ? | シシマイ?
11
- =============================
10
+ What is Sisimai ?
11
+ =================
12
12
  Sisimai is a Ruby library for analyzing RFC5322 bounce emails and generating
13
- structured data from parsed results. Ruby version of Sisimai is ported from
14
- Perl version of Sisimai at https://github.com/sisimai/p5-Sisimai/ .
15
-
16
- Sisimai(シシマイ)はRFC5322準拠のエラーメールを解析し、解析結果をデータ構造に
17
- 変換するインターフェイスを提供するRubyライブラリです。
18
- https://github.com/sisimai/p5-Sisimai/で公開しているPerl版シシマイから移植しました。
19
-
20
- Key Features | 主な特徴的機能
21
- -----------------------------
22
- * __Convert Bounce Mails to Structured Data__ | __エラーメールをデータ構造に変換__
23
- * Supported formats are Perl and JSON | Perlのデータ形式とJSONに対応
24
- * __Easy to Install, Use.__ | __インストールも使用も簡単__
13
+ structured data from parsed results. The Ruby version of Sisimai is ported from
14
+ the Perl version of Sisimai at [github.com/sisimai/p5-Sisimai](https://github.com/sisimai/p5-Sisimai/).
15
+
16
+ Key Features
17
+ ------------
18
+ * __Convert Bounce Mails to Structured Data__
19
+ * Supported formats are Perl and JSON
20
+ * __Easy to Install, Use.__
25
21
  * gem install
26
22
  * git clone & make
27
- * __High Precision of Analysis__ | __高い解析精度__
28
- * 2 times higher than bounceHammer | 解析精度はbounceHammerの二倍
29
- * Support 21 known MTAs and 5 unknown MTAs | 26種類のMTAに対応
30
- * Support 21 major MSPs(Mail Service Providers) | 21種類の著名なMSPに対応
31
- * Support Feedback Loop Message(ARF) | Feedback Loopにも対応
32
- * Can detect 27 error reasons | 27種類のエラー理由を検出
23
+ * __High Precision of Analysis__
24
+ * 2 times higher than bounceHammer
25
+ * Support 21 known MTAs and 5 unknown MTAs
26
+ * Support 21 major MSPs(Mail Service Providers)
27
+ * Support Feedback Loop Message(ARF)
28
+ * Can detect 27 error reasons
33
29
 
34
- Setting Up Sisimai | シシマイを使う準備
35
- =======================================
30
+ Setting Up Sisimai
31
+ ==================
32
+ System requirements
33
+ -------------------
34
+ More details about system requirements are available at
35
+ [Sisimai | Getting Started](http://libsisimai.org/en/start) page.
36
36
 
37
- System requirements | 動作環境
38
- ------------------------------
39
-
40
- More details about system requirements are available at available at
41
- [Sisimai | Getting Started](http://libsisimai.org/start) page.
42
37
 
43
38
  * [Ruby 2.1.0 or later](http://www.ruby-lang.org/)
44
39
  * [__Oj | The fastest JSON parser and object serializer__](https://rubygems.org/gems/oj)
45
40
  * Also works on [JRuby 9.0.0.0 or later](http://jruby.org)
46
41
  * [__JrJackson | A mostly native JRuby wrapper for the java jackson json processor jar__](https://rubygems.org/gems/jrjackson)
47
42
 
48
- Install | インストール
43
+ Install
49
44
  ----------------------
50
-
51
45
  ### From RubyGems.org
52
46
 
53
47
  ```shell
@@ -86,12 +80,11 @@ sisimai 4.14.2 built to pkg/sisimai-4.16.0.gem.
86
80
  sisimai (4.14.2) installed.
87
81
  ```
88
82
 
89
- Usage | 使い方
90
- ==============
91
-
92
- Basic usage | 基本的な使い方
93
- ----------------------------
94
- make() method provides feature for getting parsed data from bounced email
83
+ Usage
84
+ =====
85
+ Basic usage
86
+ -----------
87
+ `make()` method provides feature for getting parsed data from bounced email
95
88
  messages like following.
96
89
 
97
90
  ```ruby
@@ -127,27 +120,25 @@ puts Sisimai.dump('/path/to/mbox') # or path to Maildir/
127
120
 
128
121
  # dump() method also accepts "delivered" option like the following code:
129
122
  puts Sisimai.dump('/path/to/mbox', delivered: true)
130
-
131
123
  ```
132
124
 
133
125
  ```json
134
126
  [{"recipient": "kijitora@example.jp", "addresser": "shironeko@1jo.example.org", "feedbacktype": "", "action": "failed", "subject": "Nyaaaaan", "smtpcommand": "DATA", "diagnosticcode": "550 Unknown user kijitora@example.jp", "listid": "", "destination": "example.jp", "smtpagent": "Courier", "lhost": "1jo.example.org", "deliverystatus": "5.0.0", "timestamp": 1291954879, "messageid": "201012100421.oBA4LJFU042012@1jo.example.org", "diagnostictype": "SMTP", "timezoneoffset": "+0900", "reason": "filtered", "token": "ce999a4c869e3f5e4d8a77b2e310b23960fb32ab", "alias": "", "senderdomain": "1jo.example.org", "rhost": "mfsmax.example.jp"}, {"diagnostictype": "SMTP", "timezoneoffset": "+0900", "reason": "userunknown", "timestamp": 1381900535, "messageid": "E1C50F1B-1C83-4820-BC36-AC6FBFBE8568@example.org", "token": "9fe754876e9133aae5d20f0fd8dd7f05b4e9d9f0", "alias": "", "senderdomain": "example.org", "rhost": "mx.bouncehammer.jp", "action": "failed", "addresser": "kijitora@example.org", "recipient": "userunknown@bouncehammer.jp", "feedbacktype": "", "smtpcommand": "DATA", "subject": "バウンスメールのテスト(日本語)", "destination": "bouncehammer.jp", "listid": "", "diagnosticcode": "550 5.1.1 <userunknown@bouncehammer.jp>... User Unknown", "deliverystatus": "5.1.1", "lhost": "p0000-ipbfpfx00kyoto.kyoto.example.co.jp", "smtpagent": "Sendmail"}]
135
127
  ```
136
128
 
137
- 上記のようにSisimaiのmake()メソッドをmboxかMaildirのPATHを引数にして実行すると
138
- 解析結果が配列で返ってきます。
139
-
140
- One-Liner | ワンライナーで
141
- --------------------------
129
+ One-Liner
130
+ ---------
142
131
 
143
132
  ```shell
144
133
  % ruby -rsisimai -e 'puts Sisimai.dump($*.shift)' /path/to/mbox
145
134
  ```
146
135
 
147
- Differences between Perl version and Ruby version | Perl版との違い
148
- ------------------------------------------------------------------
136
+ Differences between Perl version and Ruby version
137
+ -------------------------------------------------
149
138
  The following table show the differences between Perl version of Sisimai
150
- and Ruby version of Sisimai.
139
+ and Ruby version of Sisimai. Information about differences between Sisimai
140
+ and bounceHammer are available at
141
+ [Sisimai | Differences](http://libsisimai.org/en/diff) page.
151
142
 
152
143
  | Features | Ruby version | Perl version |
153
144
  |---------------------------------------------|----------------|---------------|
@@ -158,35 +149,17 @@ and Ruby version of Sisimai.
158
149
  | How to install | gem install | cpanm |
159
150
  | Dependencies (Except core modules) | 1 modules | 2 modules |
160
151
  | LOC:Source lines of code | 11000 lines | 8000 lines |
161
- | The number of tests in t/, xt/ directory | 94300 tests | 170000 tests |
152
+ | The number of tests in t/, xt/ directory | 94700 tests | 170000 tests |
162
153
  | License | BSD 2-Clause | BSD 2-Clause |
163
154
  | Support Contract provided by Developer | Coming soon | Available |
164
155
 
165
- 1. See ./ANALYTICAL-PRECISION
166
-
167
- 公開中のPerl版Sisimai(p5-Sisimai)とRuby版Sisimai(rb-Sisimai)は下記のような違いが
168
- あります。
156
+ 1. See [./ANALYTICAL-PRECISION](https://github.com/sisimai/rb-Sisimai/blob/master/ANALYTICAL-PRECISION)
169
157
 
170
- | 機能 | Ruby version | Perl version |
171
- |---------------------------------------------|----------------|---------------|
172
- | 動作環境 | Ruby 2.1-2.3 | Perl 5.10 - |
173
- | | JRuby 9.0.4.0- | |
174
- | 解析精度の割合(2000通のメール)[1] | 1.00 | 1.00 |
175
- | メール解析速度(1000通のメール) | 3.30秒 | 2.33秒 |
176
- | インストール方法 | gem install | cpanm |
177
- | 依存モジュール数(コアモジュールを除く) | 1モジュール | 2モジュール |
178
- | LOC:ソースコードの行数 | 11000行 | 8000行 |
179
- | テスト件数(t/,xt/ディレクトリ) | 94300件 | 170000件 |
180
- | ライセンス | 二条項BSD | 二条項BSD |
181
- | 開発会社によるサポート契約 | 準備中 | 提供中 |
182
-
183
- 1. ./ANALYTICAL-PRECISIONを参照
184
-
185
- MTA/MSP Modules | MTA/MSPモジュール一覧
186
- ---------------------------------------
158
+ MTA/MSP Modules
159
+ ---------------
187
160
  The following table is the list of MTA/MSP:(Mail Service Provider) modules. More
188
161
  details about these modules are available at
189
- [Sisimai | Parser Engines](http://libsisimai.org/engine) page.
162
+ [Sisimai | Parser Engines](http://libsisimai.org/en/engine) page.
190
163
 
191
164
  | Module Name(Sisimai::) | Description |
192
165
  |--------------------------|---------------------------------------------------|
@@ -241,123 +214,110 @@ details about these modules are available at
241
214
  | RFC3464 | Fallback Module for MTAs |
242
215
  | RFC3834 | Detector for auto replied message |
243
216
 
244
- 上記はSisimaiに含まれてるMTA/MSP(メールサービスプロバイダ)モジュールの一覧です。
245
-
246
-
247
- Bounce Reason List | バウンス理由の一覧
248
- ----------------------------------------
217
+ Bounce Reason List
218
+ ------------------
249
219
  Sisimai can detect the following 27 bounce reasons. More details about reasons
250
- are available at [Sisimai | Bounce Reason List](http://libsisimai.org/reason)
220
+ are available at [Sisimai | Bounce Reason List](http://libsisimai.org/en/reason)
251
221
  page.
252
222
 
253
- | Reason(理由) | Description | 理由の説明 |
254
- |----------------|----------------------------------------|----------------------------------|
255
- | Blocked | Blocked due to client IP address | IPアドレスによる拒否 |
256
- | ContentError | Invalid format email | 不正な形式のメール |
257
- | Delivered[1] | Successfully delivered (> v4.16.0) | 正常に配信された(> v4.16.0) |
258
- | ExceedLimit | Message size exceeded the limit(5.2.3) | メールサイズの超過 |
259
- | Expired | Delivery time expired | 配送時間切れ |
260
- | Feedback | Bounced for a complaint of the message | 元メールへの苦情によるバウンス |
261
- | Filtered | Rejected after DATA command | DATAコマンド以降で拒否された |
262
- | HasMoved | Destination mail addrees has moved | 宛先メールアドレスは移動した |
263
- | HostUnknown | Unknown destination host name | 宛先ホスト名が存在しない |
264
- | MailboxFull | Recipient's mailbox is full | メールボックスが一杯 |
265
- | MailerError | Mailer program error | メールプログラムのエラー |
266
- | MesgTooBig | Message size is too big(5.3.4) | メールが大き過ぎる |
267
- | NetworkError | Network error: DNS or routing | DNS等ネットワーク関係のエラー |
268
- | NotAccept | Destinaion does not accept any message | 宛先ホストはメールを受けとらない |
269
- | OnHold | Deciding the bounce reason is on hold | エラー理由の特定は保留 |
270
- | Rejected | Rejected due to envelope from address | エンベロープFromで拒否された |
271
- | NoRelaying | Relay access denied | リレーの拒否 |
272
- | SecurityError | Virus detected or authentication error | ウィルスの検出または認証失敗 |
273
- | SpamDetected | Detected a message as spam | メールはスパムとして判定された |
274
- | Suspend | Recipient's account is suspended | 宛先アカウントは一時的に停止中 |
275
- | SyntaxError | syntax error in SMTP (> v4.17.0) | SMTPの文法エラー(> v4.17.0) |
276
- | SystemError | Some error on the destination host | 宛先サーバでのOSレベルのエラー |
277
- | SystemFull | Disk full on the destination host | 宛先サーバのディスクが一杯 |
278
- | TooManyConn | Connection rate limit exceeded | 接続制限数を超過した |
279
- | UserUnknown | Recipient's address does not exist | 宛先メールアドレスは存在しない |
280
- | Undefined | Could not decide the error reason | バウンスした理由は特定出来ず |
281
- | Vacation | Auto replied message | 自動応答メッセージ |
282
-
283
- Sisimaiは上記のエラー27種を検出します。
284
- 1. This reason is not included by default | このバウンス理由は標準では解析結果に含まれません
285
-
286
-
287
- Parsed data structure | 解析後のデータ構造
288
- ------------------------------------------
289
- The following table shows a data structure(Sisimai::Data) of parsed bounce mail.
223
+ | Reason | Description | Impelmented at |
224
+ |----------------|----------------------------------------|--------------------|
225
+ | Blocked | Blocked due to client IP address | |
226
+ | ContentError | Invalid format email | |
227
+ | Delivered[1] | Successfully delivered | v4.16.0 |
228
+ | ExceedLimit | Message size exceeded the limit(5.2.3) | |
229
+ | Expired | Delivery time expired | |
230
+ | Feedback | Bounced for a complaint of the message | |
231
+ | Filtered | Rejected after DATA command | |
232
+ | HasMoved | Destination mail addrees has moved | |
233
+ | HostUnknown | Unknown destination host name | |
234
+ | MailboxFull | Recipient's mailbox is full | |
235
+ | MailerError | Mailer program error | |
236
+ | MesgTooBig | Message size is too big(5.3.4) | |
237
+ | NetworkError | Network error: DNS or routing | |
238
+ | NotAccept | Destinaion does not accept any message | |
239
+ | OnHold | Deciding the bounce reason is on hold | |
240
+ | Rejected | Rejected due to envelope from address | |
241
+ | NoRelaying | Relay access denied | |
242
+ | SecurityError | Virus detected or authentication error | |
243
+ | SpamDetected | Detected a message as spam | |
244
+ | Suspend | Recipient's account is suspended | |
245
+ | SyntaxError | syntax error in SMTP | v4.17.0 |
246
+ | SystemError | Some error on the destination host | |
247
+ | SystemFull | Disk full on the destination host | |
248
+ | TooManyConn | Connection rate limit exceeded | |
249
+ | UserUnknown | Recipient's address does not exist | |
250
+ | Undefined | Could not decide the error reason | |
251
+ | Vacation | Auto replied message | v4.1.28 |
252
+
253
+ 1. This reason is not included by default
254
+
255
+ Parsed data structure
256
+ ---------------------
257
+ The following table shows a data structure(`Sisimai::Data`) of parsed bounce mail.
290
258
  More details about data structure are available at available at
291
- [Sisimai Data Structure of Sisimai::Data](http://libsisimai.org/data) page.
292
-
293
- | Name | Description | 値の説明 |
294
- |----------------|---------------------------------------|--------------------------------|
295
- | action | The value of Action: header | Action:ヘッダの値 |
296
- | addresser | The From address | 送信者のアドレス |
297
- | alias | Alias of the recipient | 受信者アドレスのエイリアス |
298
- | destination | The domain part of the "recipinet" | "recipient"のドメイン部分 |
299
- | deliverystatus | Delivery Status(DSN) | 配信状態(DSN)の値 |
300
- | diagnosticcode | Error message | エラーメッセージ |
301
- | diagnostictype | Error message type | エラーメッセージの種別 |
302
- | feedbacktype | Feedback Type | Feedback-Typeのフィールド |
303
- | lhost | local host name(local MTA) | 送信側MTAのホスト名 |
304
- | listid | List-Id: header of each ML | List-Idヘッダの値 |
305
- | messageid | Message-Id: of the original message | 元メールのMessage-Id |
306
- | reason | Detected bounce reason | 検出したバウンスした理由 |
307
- | recipient | Recipient address which bounced | バウンスした受信者のアドレス |
308
- | replycode | SMTP Reply Code | SMTP応答コード |
309
- | rhost | Remote host name(remote MTA) | 受信側MTAのホスト名 |
310
- | senderdomain | The domain part of the "addresser" | "addresser"のドメイン部分 |
311
- | softbounce | The bounce is soft bounce or not | ソフトバウンスであるかどうか |
312
- | smtpagent | MTA name(Sisimai::MTA::, MSP::) | MTA名(Sisimai::MTA::,MSP::) |
313
- | smtpcommand | The last SMTP command in the session | セッション中最後のSMTPコマンド |
314
- | subject | Subject of the original message(UTF8) | 元メールのSubject(UTF-8) |
315
- | timestamp | Date: header in the original message | 元メールのDate |
316
- | timezoneoffset | Time zone offset(seconds) | タイムゾーンの時差 |
317
- | token | MD5 value of addresser and recipient | 送信者と受信者のハッシュ値 |
318
-
319
- 上記の表は解析後のバウンスメールの構造(Sisimai::Data)です。
320
-
321
-
322
- Emails could not be parsed | 解析出来ないメール
323
- -----------------------------------------------
324
- __Bounce mails__ which could not be parsed by Sisimai are saved in the directory
325
- `set-of-emails/to-be-debugged-because/sisimai-cannot-parse-yet`. If you find any
326
- bounce email cannot be parsed using Sisimai, please add the email into the directory
327
- and send Pull-Request to this repository.
328
-
329
- 解析出来ない__バウンスメール__は`set-of-emails/to-be-debugged-because/sisimai-cannot-parse-yet`
330
- ディレクトリにはいっています。もしもSisimaiで解析出来ないメールを見つけたら、
331
- このディレクトリに追加してPull-Requestを送ってください。
332
-
333
-
334
- Other Information | その他の情報
335
- ================================
336
-
337
- Related Sites | 関連サイト
259
+ [Sisimai | Data Structure of Sisimai::Data](http://libsisimai.org/en/data) page.
260
+
261
+ | Name | Description |
262
+ |----------------|-------------------------------------------------------------|
263
+ | action | The value of Action: header |
264
+ | addresser | The sender's email address (From:) |
265
+ | alias | Alias of the recipient |
266
+ | destination | The domain part of the "recipinet" |
267
+ | deliverystatus | Delivery Status(DSN), ex) 5.1.1, 4.4.7 |
268
+ | diagnosticcode | Error message |
269
+ | diagnostictype | Error message type |
270
+ | feedbacktype | Feedback Type |
271
+ | lhost | local host name(local MTA) |
272
+ | listid | The value of List-Id: header of the original message |
273
+ | messageid | The value of Message-Id: of the original message |
274
+ | reason | Detected bounce reason |
275
+ | recipient | Recipient address which bounced (To:) |
276
+ | replycode | SMTP Reply Code, ex) 550, 421 |
277
+ | rhost | Remote host name(remote MTA) |
278
+ | senderdomain | The domain part of the "addresser" |
279
+ | softbounce | The bounce is soft bounce or not: 0=hard,1=soft,-1=unknown |
280
+ | smtpagent | MTA module name (Sisimai::MTA::, MSP::) |
281
+ | smtpcommand | The last SMTP command in the session |
282
+ | subject | The vale of Subject: header of the original message(UTF8) |
283
+ | timestamp | Timestamp of the bounce, UNIX matchine time |
284
+ | timezoneoffset | Time zone offset string: ex) +0900 |
285
+ | token | MD5 value of addresser, recipient, and the timestamp |
286
+
287
+ Emails could not be parsed
338
288
  --------------------------
339
-
289
+ Bounce mails which could not be parsed by Sisimai are saved in the directory
290
+ `set-of-emails/to-be-debugged-because/sisimai-cannot-parse-yet`. If you have
291
+ found any bounce email cannot be parsed using Sisimai, please add the email
292
+ into the directory and send Pull-Request to this repository.
293
+
294
+ Other Information
295
+ =================
296
+ Related Sites
297
+ -------------
298
+ * __@libsisimai__ | [Sisimai on Twitter (@libsisimai)](https://twitter.com/libsisimai)
340
299
  * __libsisimai.org__ | [Sisimai | The successor to bounceHammer, Library to parse bounce mails](http://libsisimai.org/)
341
300
  * __GitHub__ | [github.com/sisimai/rb-Sisimai](https://github.com/sisimai/rb-Sisimai)
342
301
  * __Perl verson__ | [Perl version of Sisimai](https://github.com/sisimai/p5-Sisimai)
343
302
 
344
- SEE ALSO | 参考サイト
345
- ---------------------
303
+ SEE ALSO
304
+ --------
305
+ * [README-JA.md - README.md in Japanese(日本語)](https://github.com/sisimai/rb-Sisimai/blob/master/README-JA.md)
346
306
  * [RFC3463 - Enhanced Mail System Status Codes](https://tools.ietf.org/html/rfc3463)
347
307
  * [RFC3464 - An Extensible Message Format for Delivery Status Notifications](https://tools.ietf.org/html/rfc3464)
348
308
  * [RFC3834 - Recommendations for Automatic Responses to Electronic Mail](https://tools.ietf.org/html/rfc3834)
349
309
  * [RFC5321 - Simple Mail Transfer Protocol](https://tools.ietf.org/html/rfc5321)
350
310
  * [RFC5322 - Internet Message Format](https://tools.ietf.org/html/rfc5322)
351
311
 
352
- AUTHOR | 作者
353
- -------------
312
+ AUTHOR
313
+ ------
354
314
  [@azumakuniyuki](https://twitter.com/azumakuniyuki)
355
315
 
356
- COPYRIGHT | 著作権
357
- ------------------
316
+ COPYRIGHT
317
+ ---------
358
318
  Copyright (C) 2015-2016 azumakuniyuki, All Rights Reserved.
359
319
 
360
- LICENSE | ライセンス
361
- --------------------
320
+ LICENSE
321
+ -------
362
322
  This software is distributed under The BSD 2-Clause License.
363
323