{"id":20560474,"url":"https://github.com/vodolaz095/msmtpd","last_synced_at":"2026-06-06T15:31:49.467Z","repository":{"id":190264676,"uuid":"672063735","full_name":"vodolaz095/msmtpd","owner":"vodolaz095","description":"Modular SMTP Daemon Framework - toolkit for building email servers","archived":false,"fork":false,"pushed_at":"2024-01-27T10:54:45.000Z","size":371,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-16T19:06:14.973Z","etag":null,"topics":["email-server","esmtp-server","go","golang","lmtp","rspamd","smtp-server","starttls"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vodolaz095.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"custom":["https://www.tinkoff.ru/rm/ostroumov.anatoliy2/4HFzm76801/"]}},"created_at":"2023-07-28T20:31:58.000Z","updated_at":"2024-06-16T13:55:27.000Z","dependencies_parsed_at":"2023-08-23T22:15:36.944Z","dependency_job_id":"91404ed4-a143-447d-b289-947e2d10e0cb","html_url":"https://github.com/vodolaz095/msmtpd","commit_stats":null,"previous_names":["vodolaz095/msmtpd"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vodolaz095%2Fmsmtpd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vodolaz095%2Fmsmtpd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vodolaz095%2Fmsmtpd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vodolaz095%2Fmsmtpd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vodolaz095","download_url":"https://codeload.github.com/vodolaz095/msmtpd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242168936,"owners_count":20083200,"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":["email-server","esmtp-server","go","golang","lmtp","rspamd","smtp-server","starttls"],"created_at":"2024-11-16T03:54:39.184Z","updated_at":"2026-06-06T15:31:49.420Z","avatar_url":"https://github.com/vodolaz095.png","language":"Go","funding_links":["https://www.tinkoff.ru/rm/ostroumov.anatoliy2/4HFzm76801/"],"categories":[],"sub_categories":[],"readme":"msmtpd\n=======================\n\n[![PkgGoDev](https://pkg.go.dev/badge/github.com/vodolaz095/msmtpd)](https://pkg.go.dev/github.com/vodolaz095/msmtpd?tab=doc)\n[![Go Report Card](https://goreportcard.com/badge/github.com/vodolaz095/msmtpd)](https://goreportcard.com/report/github.com/vodolaz095/msmtpd)\n[![Go](https://github.com/vodolaz095/msmtpd/actions/workflows/go.yml/badge.svg)](https://github.com/vodolaz095/msmtpd/actions/workflows/go.yml)\n\nGolang framework for building Simple Mail Transfer Protocol Daemons.\n\nФреймворк для создания почтовых серверов, написанный на Go.\n\nMirrors\n=================\n- https://gitflic.ru/project/vodolaz095/msmtpd\n- https://github.com/vodolaz095/msmtpd\n\nMain features\n================================\n\n1. [Haraka hooks](https://haraka.github.io/core/Plugins#available-hooks) inspired CheckerFunc's being called \n   on different actions of client (connection, HELO/EHLO command, StartTLS)\n2. `StartTLS`, `XClient`, `Proxy` command support\n3. Easy to implement logger interface\n4. Build-in [OpenTelemetry](https://opentelemetry.io/) support - see [dovecot_inbound](example%2Fdovecot_inbound)\n   and [dovecot_outbound](example%2Fdovecot_outbound) examples\n5. Lot of [plugins](plugins), including:\n6. [Dovecot](plugins%2Fdovecot) plugin for authentication and LMTP mail delivery\n7. [Rspamd](plugins%2Frspamd) plugin for blocking spam\n8. Plugins to deliver via 3rd party [SMTP proxy](plugins%2Fdeliver%2Fsmtp_proxy.go), \n   [LMTP](plugins%2Fdeliver%2Flmtp.go) and [SendMail](plugins%2Fdeliver%2Fsendmail.go).\n9. Experimental [Karma](plugins%2Fkarma) plugin to implement connection scoring (IP addresses making failed SMTP transactions will be blacklisted)\n10. HELO/EHLO checkers, including complicated [ones](plugins%2Fhelo)\n11. [Sender resolvable](plugins%2Fsender%2Fsender_resolvable.go) checker plugin to ensure sender's domain can accept our replies \n\nExamples / Примеры\n================================\n\n- [custom_logger](example%2Fcustom_logger)\n- [dovecot_inbound](example%2Fdovecot_inbound)\n- [dovecot_outbound](example%2Fdovecot_outbound)\n- [metrics](example%2Fmetrics)\n- [minimal](example%2Fminimal)\n- [simple](example%2Fsimple)\n- [smtp_proxy](example%2Fsmtp_proxy)\n\nInspiration / Источники вдохновения\n=================================\n\n- https://github.com/chrj/smtpd (часть кода)\n- https://haraka.github.io/ (реализация функционала плагинов, общая идеология)\n- https://github.com/albertito/chasquid/ (реализация проверки получателей и авторизации через сокеты Dovecot)\n\nMinimal example / Минимальный пример\n==================================\n\n```go\n\npackage main\n\nimport (\n\t\"log\"\n\n\t\"github.com/vodolaz095/msmtpd\"\n)\n\nfunc main() {\n\tserver := msmtpd.Server{\n\t\tHostname:       \"localhost\",\n\t\tWelcomeMessage: \"Do you believe in our God?\",\n\t}\n\n\terr := server.ListenAndServe(\":1025\")\n\tif err != nil {\n\t\tlog.Fatalf(\"%s : while starting server on 0.0.0.0:1025\", err)\n\t}\n}\n\n\n```\n\n\n\nServer log / Протокол работы сервера\n=====================\n```\n2023/08/02 16:30:11 INFO [1cca484c18ebe494240b196bc60ee39c]: Accepting connection from [::1]:34142...\n2023/08/02 16:30:11 INFO [1cca484c18ebe494240b196bc60ee39c]: EHLO \u003clocalhost\u003e is accepted!\n2023/08/02 16:30:11 INFO [1cca484c18ebe494240b196bc60ee39c]: MAIL FROM \u003csender@example.org\u003e is checked by 0\nSenderCheckers and accepted!\n2023/08/02 16:30:11 INFO [1cca484c18ebe494240b196bc60ee39c]: Recipient \u003crecipient@example.org\u003e will be 1st one in\ntransaction!\n2023/08/02 16:30:11 INFO [1cca484c18ebe494240b196bc60ee39c]: Subject: test Wed, 02 Aug 2023 16:30:11 +0300\n2023/08/02 16:30:11 INFO [1cca484c18ebe494240b196bc60ee39c]: Body (264 bytes) checked by 0 DataCheckers successfully!\n2023/08/02 16:30:11 WARN [1cca484c18ebe494240b196bc60ee39c]: Message silently discarded - no DataHandlers set...\n2023/08/02 16:30:12 INFO [1cca484c18ebe494240b196bc60ee39c]: Closing transaction.\n2023/08/02 16:30:31 INFO [4dfe768e04186309306b1af3194b05c4]: Accepting connection from [::1]:50596...\n2023/08/02 16:30:31 INFO [4dfe768e04186309306b1af3194b05c4]: EHLO \u003clocalhost\u003e is accepted!\n2023/08/02 16:30:31 INFO [4dfe768e04186309306b1af3194b05c4]: MAIL FROM \u003csender@example.org\u003e is checked by 0\nSenderCheckers and accepted!\n2023/08/02 16:30:31 INFO [4dfe768e04186309306b1af3194b05c4]: Recipient \u003crecipient1@example.org\u003e will be 1st one in\ntransaction!\n2023/08/02 16:30:31 INFO [4dfe768e04186309306b1af3194b05c4]: Recipient \u003crecipient2@example.org\u003e will be 2nd one in\ntransaction!\n2023/08/02 16:30:31 INFO [4dfe768e04186309306b1af3194b05c4]: Recipient \u003crecipient3@example.org\u003e will be 2nd one in\ntransaction!\n2023/08/02 16:30:31 INFO [4dfe768e04186309306b1af3194b05c4]: Recipient \u003crecipient4@example.org\u003e will be 4th one in\ntransaction!\n2023/08/02 16:30:31 INFO [4dfe768e04186309306b1af3194b05c4]: Subject: test Wed, 02 Aug 2023 16:30:31 +0300\n2023/08/02 16:30:31 INFO [4dfe768e04186309306b1af3194b05c4]: Body (334 bytes) checked by 0 DataCheckers successfully!\n2023/08/02 16:30:31 WARN [4dfe768e04186309306b1af3194b05c4]: Message silently discarded - no DataHandlers set...\n2023/08/02 16:30:31 INFO [4dfe768e04186309306b1af3194b05c4]: Closing transaction.\n```\n\nClient log while testing smtp server / Вывод клиента при тестировании почтового сервера\n=====================\n\n```shell\n$ swaks --to recipient1@example.org,recipient2@example.org,recipient3@example.org,recipient4@example.org \\\n    --from sender@example.org \\\n    --server localhost --port 1025 \\\n    --timeout 600\n```\n\n```\n=== Trying localhost:1025...\n=== Connected to localhost.\n\u003c- 220 Do you believe in our God?\n-\u003e EHLO localhost\n\u003c- 250-localhost\n\u003c- 250-SIZE 10240000\n\u003c- 250-8BITMIME\n\u003c- 250 PIPELINING\n-\u003e MAIL FROM:\u003csender@example.org\u003e\n\u003c- 250 Ok, it makes sense, go ahead please!\n-\u003e RCPT TO:\u003crecipient1@example.org\u003e\n\u003c- 250 It seems i can handle delivery for this recipient, i'll do my best!\n-\u003e RCPT TO:\u003crecipient2@example.org\u003e\n\u003c- 250 It seems i can handle delivery for this recipient, i'll do my best!\n-\u003e RCPT TO:\u003crecipient3@example.org\u003e\n\u003c- 250 It seems i can handle delivery for this recipient, i'll do my best!\n-\u003e RCPT TO:\u003crecipient4@example.org\u003e\n\u003c- 250 It seems i can handle delivery for this recipient, i'll do my best!\n-\u003e DATA\n\u003c- 354 Ok, you managed to talk me into accepting your message. Go on, end your data with \u003cCR\u003e\u003cLF\u003e.\u003cCR\u003e\u003cLF\u003e\n-\u003e Date: Wed, 02 Aug 2023 16:30:31 +0300\n-\u003e To: recipient1@example.org,recipient2@example.org,recipient3@example.org,recipient4@example.org\n-\u003e From: sender@example.org\n-\u003e Subject: test Wed, 02 Aug 2023 16:30:31 +0300\n-\u003e Message-Id: \u003c20230802163031.059039@localhost\u003e\n-\u003e X-Mailer: swaks v20190914.0 jetmore.org/john/code/swaks/\n-\u003e\n-\u003e This is a test mailing\n-\u003e\n-\u003e\n-\u003e .\n\u003c- 250 Thank you.\n-\u003e QUIT\n\u003c- 221 Farewell, my friend! Transaction 4dfe768e04186309306b1af3194b05c4 is finished\n```\n\n\n\nSupport development / Поддержать разработку\n====================\nhttps://www.tinkoff.ru/rm/ostroumov.anatoliy2/4HFzm76801/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvodolaz095%2Fmsmtpd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvodolaz095%2Fmsmtpd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvodolaz095%2Fmsmtpd/lists"}