{"id":20121804,"url":"https://github.com/parseword/util-mailstats","last_synced_at":"2026-05-31T21:31:40.386Z","repository":{"id":82258365,"uuid":"79962945","full_name":"parseword/util-mailstats","owner":"parseword","description":"Miscellaneous scripts to gather statistics from postfix","archived":false,"fork":false,"pushed_at":"2020-01-15T22:50:40.000Z","size":17,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-11-30T23:23:33.807Z","etag":null,"topics":["dnsbl","dnsbl-rejections","mail","php","postfix","postfix-maillog"],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/parseword.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":"2017-01-24T22:57:21.000Z","updated_at":"2025-10-09T16:20:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"21c59f3d-2d12-4595-8e0d-cf4822610f44","html_url":"https://github.com/parseword/util-mailstats","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/parseword/util-mailstats","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parseword%2Futil-mailstats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parseword%2Futil-mailstats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parseword%2Futil-mailstats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parseword%2Futil-mailstats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/parseword","download_url":"https://codeload.github.com/parseword/util-mailstats/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parseword%2Futil-mailstats/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33750474,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-31T02:00:06.040Z","response_time":95,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["dnsbl","dnsbl-rejections","mail","php","postfix","postfix-maillog"],"created_at":"2024-11-13T19:32:45.022Z","updated_at":"2026-05-31T21:31:40.369Z","avatar_url":"https://github.com/parseword.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# util-mailstats\n\nMiscellaneous scripts to gather statistics from postfix logs. The necessary \nMySQL/Maria DDL is provided in the `schema-` files. You'll need to \ndefine `MAILSTATS_DBHOST`, `MAILSTATS_DBUSER`, `MAILSTATS_DBPASS`, `MAILSTATS_DBNAME`, and `MAILSTATS_RECIPIENT` \nsomewhere, I keep them in a separate config file.\n\n## mailstats-dnsbl-rejections.php\n\nA daily cron job that parses the Postfix maillog for lines indicating DNSBL rejections, e.g.\n\n`Jan 24 17:46:08 mail postfix/smtpd[9762]: NOQUEUE: reject: RCPT from unknown[47.90.x.xx]: 554 5.7.1 Service unavailable; Client host [47.90.x.xx] blocked using sbl-xbl.spamhaus.org; https://www.spamhaus.org/query/ip/47.90.x.xx; from=\u003cAins88@nate.com\u003e to=\u003ckaa16324@xx\u003e proto=SMTP helo=\u003c47.90.x.xx\u003e`\n\nThe number of rejections per DNSBL is tallied, emailed to the administrator, and \nrecorded in a database for later review. Useful for evaluating how well various \nRBLs are performing in your environment, and whether or not you want to continue \nusing them.\n\n## mailstats-no-such-user.php\n\nA daily cron job that parses the Postfix maillog for rejections due to `5.1.1 \nNo such user` (or any arbitrary message) and records them to a database. Sender, \nrecipient, and origin MTA are recorded to the database and an email summary is \nsent. Useful for identifying persistent spammers and RFC-ignorant senders who\nneed to be blocked at the firewall, as 5.1.1 is a permanent failure.\n\n## mailstats-tls-errors.php\n\nA daily cron job that parses the Postfix maillog for errors related to TLS, e.g.\n\n`Apr  8 15:01:17 mail postfix/smtpd[31634]: SSL_accept error from mta2.e.mozilla.org[68.232.195.239]: -1`\n\nThe number of errors per origin MTA is tallied, emailed to the administrator, and \nrecorded in a database for later review.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparseword%2Futil-mailstats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparseword%2Futil-mailstats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparseword%2Futil-mailstats/lists"}