{"id":18566630,"url":"https://github.com/youyo/fluent-plugin-postfix-parser","last_synced_at":"2025-10-24T10:22:14.406Z","repository":{"id":85802473,"uuid":"152460929","full_name":"youyo/fluent-plugin-postfix-parser","owner":"youyo","description":null,"archived":false,"fork":false,"pushed_at":"2018-10-11T16:10:54.000Z","size":32,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-17T13:28:05.974Z","etag":null,"topics":["fluentd","fluentd-filter-plugin","fluentd-plugin"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/youyo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-10T17:13:14.000Z","updated_at":"2024-09-12T05:10:21.000Z","dependencies_parsed_at":"2023-03-13T06:48:56.301Z","dependency_job_id":null,"html_url":"https://github.com/youyo/fluent-plugin-postfix-parser","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/youyo%2Ffluent-plugin-postfix-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/youyo%2Ffluent-plugin-postfix-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/youyo%2Ffluent-plugin-postfix-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/youyo%2Ffluent-plugin-postfix-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/youyo","download_url":"https://codeload.github.com/youyo/fluent-plugin-postfix-parser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254407793,"owners_count":22066316,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fluentd","fluentd-filter-plugin","fluentd-plugin"],"created_at":"2024-11-06T22:23:47.320Z","updated_at":"2025-10-24T10:22:09.376Z","avatar_url":"https://github.com/youyo.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fluent-plugin-postfix-parser\n\nThis is [fluentd](https://fluentd.org/) filter plugin.  \nParse postfix logs, multi lines become a one line log.\n\n## Installation\n\n### RubyGems\n\n```\n$ gem install fluent-plugin-postfix-parser\n```\n\n### Bundler\n\nAdd following line to your Gemfile:\n\n```ruby\ngem \"fluent-plugin-postfix-parser\"\n```\n\nAnd then execute:\n\n```\n$ bundle\n```\n\n## Usage\n\n### Configuration\n\n```\n\u003csource\u003e\n  @type forward\n\u003c/source\u003e\n\n\u003cfilter postfix.log\u003e\n  @type grep\n  \u003cexclude\u003e\n    key message\n    pattern (dovecot|postfix-script)\n  \u003c/exclude\u003e\n\u003c/filter\u003e\n\n\u003cfilter postfix.log\u003e\n  @type postfix_parser\n  # key (string) (optional) Default value: `message`.\n  key message\n\u003c/filter\u003e\n\n\u003cmatch **.**\u003e\n  @type stdout\n\u003c/match\u003e\n```\n\n### Input\n\n```\n$ echo '{\"message\":\"Oct 10 15:59:28 mail postfix/smtpd[1830]: C6E0DDB74006: client=example.com[127.0.0.1]\"}' | fluent-cat postfix.log\n$ echo '{\"message\":\"Oct 10 15:59:28 mail postfix/cleanup[1894]: C6E0DDB74006: message-id=\u003cA40CF64D-7F2D-42E4-8A76-CBFFF64A6EB1@example.com\u003e\"}' | fluent-cat postfix.log\n$ echo '{\"message\":\"Oct 10 15:59:28 mail postfix/qmgr[18719]: C6E0DDB74006: from=\u003ctest@example.com\u003e, size=309891, nrcpt=1 (queue active)\"}' | fluent-cat postfix.log\n$ echo '{\"message\":\"Oct 10 15:59:32 mail postfix/smtp[1874]: C6E0DDB74006: to=\u003ctest@example.ddd\u003e, relay=example.ddd[192.168.0.30]:25, delay=3.4, delays=0.11/0/0.38/2.9, dsn=2.0.0, status=sent (250 2.0.0 OK 1539154772 az9-v6si5976496plb.190 - gsmtp)\"}' | fluent-cat postfix.log\n$ echo '{\"message\":\"Oct 10 15:59:32 mail postfix/qmgr[18719]: C6E0DDB74006: removed\"}' | fluent-cat postfix.log\n```\n\n### Output\n\n```\n2018-10-11 02:03:25.369299000 +0900 postfix.log: {\"time\":\"Oct 10 15:59:28\",\"hostname\":\"mail\",\"process\":\"postfix/smtpd[1830]\",\"queue_id\":\"C6E0DDB74006\",\"client_hostname\":\"example.com\",\"client_ip\":\"127.0.0.1\",\"messages\":[{\"time\":\"Oct 10 15:59:32\",\"to\":\"test@example.ddd\",\"relay_hostname\":\"example.ddd\",\"relay_ip\":\"192.168.0.30\",\"relay_port\":\"25\",\"delay\":\"3.4\",\"delays\":\"0.11/0/0.38/2.9\",\"dsn\":\"2.0.0\",\"status\":\"sent\",\"comment\":\"250 2.0.0 OK 1539154772 az9-v6si5976496plb.190 - gsmtp\"}],\"message_id\":\"A40CF64D-7F2D-42E4-8A76-CBFFF64A6EB1@example.com\",\"from\":\"test@example.com\",\"size\":\"309891\",\"nrcpt\":\"1\",\"queue_status\":\"queue active\"}\n```\n\n## Copyright\n\n* Copyright(c) 2018- youyo\n* License\n* Apache License, Version 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyouyo%2Ffluent-plugin-postfix-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyouyo%2Ffluent-plugin-postfix-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyouyo%2Ffluent-plugin-postfix-parser/lists"}