{"id":19331086,"url":"https://github.com/systemli/mail-tls-helper","last_synced_at":"2025-07-12T07:34:34.702Z","repository":{"id":48954695,"uuid":"79712767","full_name":"systemli/mail-tls-helper","owner":"systemli","description":"Postfix helper for mandatory TLS","archived":false,"fork":false,"pushed_at":"2022-01-20T17:19:39.000Z","size":123,"stargazers_count":18,"open_issues_count":2,"forks_count":2,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-07-12T07:34:34.083Z","etag":null,"topics":["postfix","postfix-helper","python","security","tls"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/systemli.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-22T11:07:55.000Z","updated_at":"2024-07-07T16:53:50.000Z","dependencies_parsed_at":"2022-09-02T02:11:22.167Z","dependency_job_id":null,"html_url":"https://github.com/systemli/mail-tls-helper","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/systemli/mail-tls-helper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemli%2Fmail-tls-helper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemli%2Fmail-tls-helper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemli%2Fmail-tls-helper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemli%2Fmail-tls-helper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/systemli","download_url":"https://codeload.github.com/systemli/mail-tls-helper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemli%2Fmail-tls-helper/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264958196,"owners_count":23689011,"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":["postfix","postfix-helper","python","security","tls"],"created_at":"2024-11-10T02:38:59.750Z","updated_at":"2025-07-12T07:34:34.684Z","avatar_url":"https://github.com/systemli.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mail-tls-helper\n\n[![Build Status](https://travis-ci.org/systemli/mail-tls-helper.svg?branch=master)](https://travis-ci.org/systemli/mail-tls-helper)\n\nPostfix helper script that does the following:\n\n * make TLS mandatory for outgoing mail wherever possible and\n * optionally alert postmasters of domains that don't support STARTTLS\n\nIn case of bugs, ideas, enhancements, feel free to open an *issue* or *pull\nrequest* on Github.\n\n## Prerequisites\n\n * Set *Postfix SMTP client logging* (configuration option\n   [smtp_tls_loglevel](http://www.postfix.org/postconf.5.html#smtp_tls_loglevel))\n   to '1' or higher.\n * Ensure that Python3 is installed.\n * Copy the script to your mail system (e.g. to ```/usr/local/bin/```) and make\n   executable.\n * Make sure that the script can write to *Postfix TLS policy map* and *notls\n   SQLite DB* and that the directories exist.\n\n# *Postfix TLS policy map* Configuration\n\n * Configure the *Postfix TLS policy map* in ```main.cf```:\n \n```smtp_tls_policy_maps = hash:/etc/postfix/tls_policy```\n\n# Running the script\n\n * Run ```mail-tls-helper.py -h``` and learn about the commandline options.\n * Optionally configure logrotate to run the script automatically against the\n   mail log file just after rotation. This can be done by configuring a\n   ```post-script``` in the corresponding *logrotate configure include*\n   (e.g. ```/etc/logrotate.d/rsyslog```):\n\n```\n/var/log/mail.log\n{\n\t[...]\n\tpostrotate\n\t\t[...]\n\t\t/usr/local/bin/mail-tls-helper.py -d example.org\n\tendscript\n}\n```\n\n# Monitoring\n\n* [munin](https://munin-monitoring.org): see the documentation header of `munin-plugin`\n\n\n## Changelog\n\n* 2018-07-18: version 0.9.0\n  * added monitoring of mails sent over Tor\n  * added reporting of blocked domains, because of missing TLS\n  * added munin plugin\n  * added tests\n  * improved file handling\n  * improved Python 3 compatibility\n* 2017-11-11: version 0.8.1\n  * fix version number and update todo list in the script\n* 2017-11-11: version 0.8.0\n  * restructured code, swap out all postfix related code into separate\n    functions.\n  * added new data structure 'relayDict' which can be filled by any\n    mta specific functions\n  * simplified the logic for parsing postfix logs\n  * added IPv6 localhost address ::1 to relay whitlist\n  * TLS domains are deleted from SQLite DB now\n  * fixed calculated numbers of unencrypted mails\n* 2017-06-04: version 0.7.3\n  * add support for a relay whitelist\n* 2017-06-04: version 0.7.2\n  * set envelope sender address to op['from'] when using sendmail.\n* 2017-05-18: version 0.7.1\n  * don't send alert mails by default (Fixes #6)\n  * consequently replace commandline options '-A'/'--no-alerts' by\n    '-a'/'--alerts'.\n* 2017-02-19: version 0.7\n  * renamed to ```mail-tls-helper```\n  * complete rewrite in Python\n  * fixed logfile parsing logic, much more robust now\n  * added support for commandline arguments\n  * added support to create a Postfix TLS policy map\n* 2017-01-22: version 0.5\n  * initial release\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsystemli%2Fmail-tls-helper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsystemli%2Fmail-tls-helper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsystemli%2Fmail-tls-helper/lists"}