fluent-plugin-sendmail 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/fluent-plugin-sendmail.gemspec +1 -1
- data/lib/fluent/plugin/sendmailparser.rb +4 -2
- data/test/data/result +6 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ac3b1697fecad6c1e1859a43c8921ec280f2fc6
|
4
|
+
data.tar.gz: 18a7271662371dc8ec409de397d9eb53c9485bbb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 630c4f158e8f056891c88c47770b0a79f7fb92f488779d11c111c0f2a48b31d82265075e3dd2bb52b5cc6ef1ed9cafe85c96b3d2769a6634646d16e52808d3f9
|
7
|
+
data.tar.gz: ac2183c215778f092e773e4dd777e6a987472f8d88e210d4c8198317346c3ca3313d3f0f8c3f1ac291e8a74b5a0a48af7e89f9c59d39bd3830b2660f0b082df9
|
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "fluent-plugin-sendmail"
|
7
|
-
spec.version = "0.1.
|
7
|
+
spec.version = "0.1.3"
|
8
8
|
spec.authors = ["yudai09"]
|
9
9
|
spec.email = ["grandeur09@gmail.com"]
|
10
10
|
spec.summary = "Fluentd plugin to parse and merge sendmail syslog."
|
@@ -39,7 +39,8 @@ class SendmailParser
|
|
39
39
|
}
|
40
40
|
record["to"] = record["to"].split(",")
|
41
41
|
if record.has_key?("relay")
|
42
|
-
record["
|
42
|
+
record["relay_to"] = relay_parser(record["relay"])
|
43
|
+
record.delete("relay")
|
43
44
|
end
|
44
45
|
record["delay_in_sec"] = delay_parser(record["delay"])
|
45
46
|
return record
|
@@ -52,7 +53,8 @@ class SendmailParser
|
|
52
53
|
record[key] = val
|
53
54
|
}
|
54
55
|
if record.has_key?("relay")
|
55
|
-
record["
|
56
|
+
record["relay_from"] = relay_parser(record["relay"])
|
57
|
+
record.delete("relay")
|
56
58
|
end
|
57
59
|
return record
|
58
60
|
end
|
data/test/data/result
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
{"time":1459523725, "mta":"mta001", "qid":"u31FFPtp032300", "from":"<grandeur09@gmail.com>", "size":"5938", "class":"0", "nrcpts":"7", "msgid":"<201604011515.u31FFIAj012911@gmail.com>", "proto":"ESMTP", "daemon":"MTA", "
|
2
|
-
{"time":1459523725, "mta":"mta001", "qid":"u31FFPtp032300", "from":"<grandeur09@gmail.com>", "size":"5938", "class":"0", "nrcpts":"7", "msgid":"<201604011515.u31FFIAj012911@gmail.com>", "proto":"ESMTP", "daemon":"MTA", "
|
3
|
-
{"time":1459610140, "mta":"mta001", "qid":"u31FFPtp032300", "from":"<grandeur09@gmail.com>", "size":"5938", "class":"0", "nrcpts":"7", "msgid":"<201604011515.u31FFIAj012911@gmail.com>", "proto":"ESMTP", "daemon":"MTA", "
|
4
|
-
{"time":1459523726, "mta":"mta001", "qid":"u31FFPtp032300", "from":"<grandeur09@gmail.com>", "size":"5938", "class":"0", "nrcpts":"7", "msgid":"<201604011515.u31FFIAj012911@gmail.com>", "proto":"ESMTP", "daemon":"MTA", "
|
5
|
-
{"time":1459523930, "mta":"mta001", "qid":"u31FFPtp032300", "from":"<grandeur09@gmail.com>", "size":"5938", "class":"0", "nrcpts":"7", "msgid":"<201604011515.u31FFIAj012911@gmail.com>", "proto":"ESMTP", "daemon":"MTA", "
|
6
|
-
{"time":1459523725, "mta":"mta001", "qid":"u31FFPtp032300", "from":"<grandeur09@gmail.com>", "size":"5938", "class":"0", "nrcpts":"7", "msgid":"<201604011515.u31FFIAj012911@gmail.com>", "proto":"ESMTP", "daemon":"MTA", "
|
1
|
+
{"time":1459523725, "mta":"mta001", "qid":"u31FFPtp032300", "from":"<grandeur09@gmail.com>", "size":"5938", "class":"0", "nrcpts":"7", "msgid":"<201604011515.u31FFIAj012911@gmail.com>", "proto":"ESMTP", "daemon":"MTA", "relay_from":{"ip":"64.233.187.27", "host":null}, "status_canonical":"sent", "to":["<sent1@example.com>", "<sent2@example.com>"], "delay":"00:00:00", "xdelay":"00:00:00", "mailer":"esmtp", "pri":"245938", "dsn":"2.0.0", "stat":"Sent (ok: Message 40279894 accepted)", "relay_to":{"ip":"93.184.216.34", "host":null}, "delay_in_sec":0}
|
2
|
+
{"time":1459523725, "mta":"mta001", "qid":"u31FFPtp032300", "from":"<grandeur09@gmail.com>", "size":"5938", "class":"0", "nrcpts":"7", "msgid":"<201604011515.u31FFIAj012911@gmail.com>", "proto":"ESMTP", "daemon":"MTA", "relay_from":{"ip":"64.233.187.27", "host":null}, "status_canonical":"deferred", "to":["<deferred1@example.com>"], "delay":"00:00:15", "xdelay":"00:00:15", "mailer":"esmtp", "pri":"34527", "dsn":"4.3.5", "stat":"Deferred: 451 4.3.5 Server configuration problem", "relay_to":{"ip":"93.184.216.34", "host":null}, "delay_in_sec":15}
|
3
|
+
{"time":1459610140, "mta":"mta001", "qid":"u31FFPtp032300", "from":"<grandeur09@gmail.com>", "size":"5938", "class":"0", "nrcpts":"7", "msgid":"<201604011515.u31FFIAj012911@gmail.com>", "proto":"ESMTP", "daemon":"MTA", "relay_from":{"ip":"64.233.187.27", "host":null}, "status_canonical":"deferred", "to":["<deferred2@example.com>"], "delay":"1+00:00:15", "xdelay":"00:00:15", "mailer":"esmtp", "pri":"34527", "dsn":"4.3.5", "stat":"Deferred: 451 4.3.5 Server configuration problem", "relay_to":{"ip":"93.184.216.34", "host":null}, "delay_in_sec":86415, "canonical_status":"bounced"}
|
4
|
+
{"time":1459523726, "mta":"mta001", "qid":"u31FFPtp032300", "from":"<grandeur09@gmail.com>", "size":"5938", "class":"0", "nrcpts":"7", "msgid":"<201604011515.u31FFIAj012911@gmail.com>", "proto":"ESMTP", "daemon":"MTA", "relay_from":{"ip":"64.233.187.27", "host":null}, "status_canonical":"sent", "to":["<sent3@example2.com>", "<sent4@example2.com>"], "delay":"00:00:00", "xdelay":"00:00:00", "mailer":"esmtp", "pri":"245938", "dsn":"2.0.0", "stat":"Sent (ok: Message 40279895 accepted)", "relay_to":{"ip":"93.184.216.34", "host":null}, "delay_in_sec":0}
|
5
|
+
{"time":1459523930, "mta":"mta001", "qid":"u31FFPtp032300", "from":"<grandeur09@gmail.com>", "size":"5938", "class":"0", "nrcpts":"7", "msgid":"<201604011515.u31FFIAj012911@gmail.com>", "proto":"ESMTP", "daemon":"MTA", "relay_from":{"ip":"64.233.187.27", "host":null}, "status_canonical":"sent", "to":["<deferred1@example.com>"], "delay":"00:00:00", "xdelay":"00:00:00", "mailer":"esmtp", "pri":"245938", "dsn":"2.0.0", "stat":"Sent (ok: Message 40279894 accepted)", "relay_to":{"ip":"93.184.216.34", "host":null}, "delay_in_sec":0}
|
6
|
+
{"time":1459523725, "mta":"mta001", "qid":"u31FFPtp032300", "from":"<grandeur09@gmail.com>", "size":"5938", "class":"0", "nrcpts":"7", "msgid":"<201604011515.u31FFIAj012911@gmail.com>", "proto":"ESMTP", "daemon":"MTA", "relay_from":{"ip":"64.233.187.27", "host":null}, "status_canonical":"sent_local", "to":["root@localhost.localdomain"], "ctladdr":"root@localhost.localdomain (0/0)", "delay":"00:00:00", "xdelay":"00:00:00", "mailer":"local", "pri":"245938", "dsn":"2.0.0", "stat":"Sent", "delay_in_sec":0}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-sendmail
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- yudai09
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-11-
|
11
|
+
date: 2016-11-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lru_redux
|