{"id":16147977,"url":"https://github.com/stdevpavelmc/mail2influx","last_synced_at":"2025-03-18T18:32:21.567Z","repository":{"id":101670783,"uuid":"293964532","full_name":"stdevPavelmc/mail2influx","owner":"stdevPavelmc","description":"A simple mail log parser to get the live data and inject it to a influxdb server","archived":false,"fork":false,"pushed_at":"2020-10-30T15:47:18.000Z","size":285,"stargazers_count":6,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-28T11:38:11.288Z","etag":null,"topics":["dovecot","grafana","grafana-dashboard","grafana-influxdb","influxdb","mail","mail-monitoring","postfix","sysadmin-tool"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stdevPavelmc.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":"2020-09-09T00:59:22.000Z","updated_at":"2024-08-12T02:34:31.000Z","dependencies_parsed_at":"2023-06-07T16:45:24.128Z","dependency_job_id":null,"html_url":"https://github.com/stdevPavelmc/mail2influx","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stdevPavelmc%2Fmail2influx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stdevPavelmc%2Fmail2influx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stdevPavelmc%2Fmail2influx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stdevPavelmc%2Fmail2influx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stdevPavelmc","download_url":"https://codeload.github.com/stdevPavelmc/mail2influx/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243945478,"owners_count":20372894,"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":["dovecot","grafana","grafana-dashboard","grafana-influxdb","influxdb","mail","mail-monitoring","postfix","sysadmin-tool"],"created_at":"2024-10-10T00:29:23.438Z","updated_at":"2025-03-18T18:32:21.558Z","avatar_url":"https://github.com/stdevPavelmc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mail2Influx\n\n![](./example.png)\n\nA simple mail log data parser and influx data injector. It can parse any log generated by postfix \u0026 dovecot, even from giants as Proxmox Mail Gateway and Zimbra.\n\n## Motivation\n\nTelegraf and other solutions do not fill my needs of mail monitoring, so I put python3 and some regex rules to make this parser, it's given as a GPL 3.0 software, so no warranty in you use case; but you can modify it to fit your needs.\n\n## Installation\n\nYou need to install python-influxdb support, search it on the repository or use pip for that.\n\nAnd no, you don't need to create the influxdb database in advance, mail2influx take care of that too, just be sure to name it as your wish in the user variables in the header of the script. \n\n0. Clone this repository to somewhere in you PC `git clone https://github.com/stdevPavelmc/mail2influx \u0026\u0026 cd mail2influx` \n1. Copy the \"mail2influx.py\" script to `/usr/local/bin/`\n2. Make it executable `chmod +x /usr/local/bin/mail2influx.py`\n3. Edit the `/usr/local/bin/mail2influx.py` file and change:\n    - The variable named `influxhost` to your influxdb server ip/name.\n    - The variable named `influxdb` if you want to name the influxdb with other name.\n4. Copy \"mail2influx.service\" file to the systemd folder `cp mail2influx.service /lib/systemd/system/`\n5. Activate and start the service.\n    - `systemctl daemon-reload`\n    - `systemctl enable mail2influx`\n    - `systemctl start mail2influx`\n6. Go to Grafana and create a new dashboard and import the data from one of the files in this repository:\n    - The `influx-grafana_dashboard.json` file is tailored to a postfix + dovecot server, and it has a default datasource named **InfluxDB-mail**, you may need to update the influxdb source in grafana to make it work.\n    - The `influx-grafana_dashboard-PMG.json` file is tailored for a Proxmox Mail Gateway, and it has a default datasource named **InfluxDB-mailgw**, you may need to update the influxdb source in grafana to make it work.\n\n## Known issues\n\n- No authentication against the influxdb, no need on my env\n- No ssl/tls against the influxdb, no need on my env\n- May contain bugs (code is a work in progress)\n- May not be 100% optimized\n\n## About the author\n\nThis is free software, see [stdevPavelmc](https://github.com/stdevPavelmc/stdevPavelmc)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstdevpavelmc%2Fmail2influx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstdevpavelmc%2Fmail2influx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstdevpavelmc%2Fmail2influx/lists"}