{"id":15680548,"url":"https://github.com/tintinweb/python-smtpd-tls","last_synced_at":"2026-03-11T19:32:17.937Z","repository":{"id":57468761,"uuid":"51092223","full_name":"tintinweb/python-smtpd-tls","owner":"tintinweb","description":"An extension to the standard python 2.x smtpd library implementing implicit/explicit SSL/TLS/STARTTLS","archived":false,"fork":false,"pushed_at":"2018-11-29T01:43:57.000Z","size":24,"stargazers_count":11,"open_issues_count":4,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-13T05:04:16.646Z","etag":null,"topics":[],"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/tintinweb.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":"2016-02-04T17:21:23.000Z","updated_at":"2020-01-16T21:00:40.000Z","dependencies_parsed_at":"2022-09-19T14:00:14.076Z","dependency_job_id":null,"html_url":"https://github.com/tintinweb/python-smtpd-tls","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tintinweb%2Fpython-smtpd-tls","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tintinweb%2Fpython-smtpd-tls/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tintinweb%2Fpython-smtpd-tls/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tintinweb%2Fpython-smtpd-tls/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tintinweb","download_url":"https://codeload.github.com/tintinweb/python-smtpd-tls/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252856555,"owners_count":21814858,"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":[],"created_at":"2024-10-03T16:42:44.936Z","updated_at":"2026-03-11T19:32:12.887Z","avatar_url":"https://github.com/tintinweb.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# smtpd-tls\n\nAn extension to the python 2.x smtpd standard library implementing implicit/explicit (STARTTLS) SSL/TLS support\n\n* added STARTTLS handling\n* added implicit tls\n\njust pass a configured ssl.context (certs, keys, protocols, auth, ...) to smtpd-tls.SMTPServer()\n\noriginal smtpd pydoc: https://docs.python.org/2/library/smtpd.html\n\n**Requires Python 2.7 or higher**\n\n# Install\n\nfrom pip\n\n    pip install smtpd-tls\n\nfrom source\n\n    python setup.py install\n\nverify:\n\n    #\u003e python -c \"import smtpd_tls; print smtpd_tls\"\n    #\u003e python -m smtpd_tls --help\n\n# Example\n\nSTARTTLS via smtp port 25:\n\n    #\u003e python -m smtpd_tls --debug -c DebuggingServer --starttls --keyfile=../server.pem 0.0.0.0:25\n    DebuggingServer started at Thu Feb  4 16:57:06 2016\n            Local addr: ('0.0.0.0', 25)\n            Remote addr:('mail.somehost.com', 25)\n            TLS Mode: explicit (plaintext until STARTTLS)\n            TLS Context: \u003cssl.SSLContext object at 0x7f8fd8adbbb0\u003e\n    Incoming connection from ('192.168.139.1', 39983)\n    Peer: ('192.168.139.1', 39983)\n    Data: 'ehlo [192.168.139.1]'\n    Data: 'STARTTLS'\n    Peer: ('192.168.139.1', 39983) - negotiated TLS: ('ECDHE-RSA-AES256-GCM-SHA384', 'TLSv1/SSLv3', 256)\n    Data: 'ehlo [192.168.139.1]'\n    Data: 'mail FROM:\u003csender@example.com\u003e'\n    ===\u003e MAIL FROM:\u003csender@example.com\u003e\n    sender: sender@example.com\n    Data: 'rcpt TO:\u003cuser@example.com\u003e'\n    ===\u003e RCPT TO:\u003cuser@example.com\u003e\n    recips: ['user@example.com']\n    Data: 'data'\n    Data: \"From: sender@example.com\\r\\nTo: user@example.com\\r\\nSubject: Hello!\\r\\n\\r\\nThis message was sent with Python's smtplib.\"\n    ---------- MESSAGE FOLLOWS ----------\n    From: sender@example.com\n    To: user@example.com\n    Subject: Hello!\n    X-Peer: 192.168.139.1\n\n    This message was sent with Python's smtplib.\n    ------------ END MESSAGE ------------\n    Data: 'quit'\n\n\nImplicit TLS via smtp port 465:\n\n    #\u003e python -m smtpd_tls --debug -c DebuggingServer --tls --keyfile=../server.pem 0.0.0.0:465\n    DebuggingServer started at Thu Feb  4 17:00:53 2016\n            Local addr: ('0.0.0.0', 465)\n            Remote addr:('mail.somehost.com', 25)\n            TLS Mode: implicit (encrypted from the beginning)\n            TLS Context: \u003cssl.SSLContext object at 0x7fee6ec36bb0\u003e\n    Incoming connection from ('192.168.139.1', 40028)\n    Peer: ('192.168.139.1', 40028) - negotiated TLS: ('ECDHE-RSA-AES256-GCM-SHA384', 'TLSv1/SSLv3', 256)\n    Peer: ('192.168.139.1', 40028)\n    Data: 'ehlo [192.168.139.1]'\n    Data: 'mail FROM:\u003csender@example.com\u003e'\n    ===\u003e MAIL FROM:\u003csender@example.com\u003e\n    sender: sender@example.com\n    Data: 'rcpt TO:\u003cuser@example.com\u003e'\n    ===\u003e RCPT TO:\u003cuser@example.com\u003e\n    recips: ['user@example.com']\n    Data: 'data'\n    Data: \"From: sender@example.com\\r\\nTo: user@example.com\\r\\nSubject: Hello!\\r\\n\\r\\nThis message was sent with Python's smtplib.\"\n    ---------- MESSAGE FOLLOWS ----------\n    From: sender@example.com\n    To: user@example.com\n    Subject: Hello!\n    X-Peer: 192.168.139.1\n\n    This message was sent with Python's smtplib.\n    ------------ END MESSAGE ------------\n    Data: 'quit'\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftintinweb%2Fpython-smtpd-tls","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftintinweb%2Fpython-smtpd-tls","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftintinweb%2Fpython-smtpd-tls/lists"}