Fluentd plugin to parse and merge postfix syslog. This plugin is a clone of fluent-plugin-sendmail written by muddydixon.
<source>
type postfix
path /var/log/maillog
pos_file /var/log/td-agent/mail.log.pos
tag postfixlog
</source>
This plugin emit record like below:
2014-08-19T09:25:10Z postfixlog
{
"client":"localhost[127.0.0.1]",
"from":"<[email protected]>",
"authid":"user",
"to":[
{
"recipient":"<[email protected]>",
"relay":"gmail-smtp-in.l.google.com[74.125.23.27]:25",
"status":["sent","250 2.0.0 OK 1408440312 ar2si14557666pbc.249 - gsmtp"]
},
{
"recipient":"<[email protected]>",
"relay":"none",
"status":["deferred","connect to example.com[93.184.216.119]:25: Connection timed out"]
}
]
}
Write test code (This plugin is worked on CentOS release 6.5, fluentd 0.10.50, and Postfix 2.6.6.)
See CHANGELOG.md for details.
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Copyright (c) 2014 muddydixon. See LICENSE for details.