{"id":37111395,"url":"https://github.com/corpix/smtpd","last_synced_at":"2026-01-14T13:12:20.304Z","repository":{"id":57483352,"uuid":"82197317","full_name":"corpix/smtpd","owner":"corpix","description":"Simple smtp server in go","archived":false,"fork":false,"pushed_at":"2017-07-17T20:04:14.000Z","size":1056,"stargazers_count":11,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-06-20T12:39:11.868Z","etag":null,"topics":["go-packages","golang","smtp-server"],"latest_commit_sha":null,"homepage":null,"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/corpix.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}},"created_at":"2017-02-16T15:48:56.000Z","updated_at":"2023-07-22T04:42:37.000Z","dependencies_parsed_at":"2022-08-27T23:21:57.012Z","dependency_job_id":null,"html_url":"https://github.com/corpix/smtpd","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/corpix/smtpd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corpix%2Fsmtpd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corpix%2Fsmtpd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corpix%2Fsmtpd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corpix%2Fsmtpd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/corpix","download_url":"https://codeload.github.com/corpix/smtpd/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corpix%2Fsmtpd/sbom","scorecard":{"id":305233,"data":{"date":"2025-08-11","repo":{"name":"github.com/corpix/smtpd","commit":"2e35f13f5e0427831128958853209336ed7cbcb7"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 0/15 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-17T21:51:55.148Z","repository_id":57483352,"created_at":"2025-08-17T21:51:55.148Z","updated_at":"2025-08-17T21:51:55.148Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28420848,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:47:48.104Z","status":"ssl_error","status_checked_at":"2026-01-14T10:46:19.031Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["go-packages","golang","smtp-server"],"created_at":"2026-01-14T13:12:19.737Z","updated_at":"2026-01-14T13:12:20.287Z","avatar_url":"https://github.com/corpix.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"smtpd\n-----\n\n[![Build Status](https://travis-ci.org/corpix/smtpd.svg?branch=master\u002612312556)](https://travis-ci.org/corpix/smtpd)\n\nThis package is trying to implement RFC-compatible SMTP server fo go.\n\n## Example\n\n### Requirements\n\n* `swaks` to test our SMTP server\n\n### Starting\n\n\u003e See `examples/`.\n\nSave this code to `example.go`(same code could be found in `examples/logging-smtpd/main.go`):\n\n``` go\npackage main\n\nimport (\n\t\"io/ioutil\"\n\t\"net\"\n\t\"time\"\n\n\t\"github.com/Sirupsen/logrus\"\n\t\"github.com/davecgh/go-spew/spew\"\n\n\t\"github.com/corpix/smtpd\"\n)\n\ntype smtpServer struct{}\n\nfunc (s *smtpServer) ServeSMTP(c net.Conn, e *smtpd.Envelope) {\n\tlogrus.Infof(\n\t\t\"Received message from %s those envelope: %s\\n\",\n\t\tc.RemoteAddr(),\n\t\tspew.Sdump(e),\n\t)\n\tmsg, err := e.Message()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tbody, err := ioutil.ReadAll(msg.Body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tlogrus.Infof(\"Message body: %s\\n\", body)\n}\n\nfunc main() {\n\tvar err error\n\n\tc, err := net.Listen(\"tcp\", \"127.0.0.1:2525\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfor {\n\t\terr = smtpd.Serve(c, \u0026smtpServer{})\n\t\tif err != nil {\n\t\t\tlogrus.Error(err)\n\t\t\ttime.Sleep(1 * time.Second)\n\t\t}\n\t}\n}\n\n```\n\nAnd run the server:\n\n``` shell\ngo run example.go\n```\n\nIt will listen on `127.0.0.1:2525`.\n\n### Send mail\n\n``` shell\nswaks -f me@example.org -t test@example.com --server 127.0.0.1:2525\n```\n\nYou should see output similar to this:\n\n``` text\n# remote 127.0.0.1:55912 at 2017-02-16 15:42:56 +0000\nw 220 localhost go-smtpd\nr EHLO localhost\nw 250-localhost Hello 127.0.0.1:55912\nw 250-8BITMIME\nw 250-PIPELINING\nw 250 HELP\nr MAIL FROM:\u003cme@example.org\u003e\nw 250 Okay, I'll believe you for now\nr RCPT TO:\u003ctest@example.com\u003e\nw 250 Okay, I'll believe you for now\nr DATA\nw 354 Send away\nr . \u003cend of data\u003e\nw 250 I've put it in a can\nr QUIT\nw 221 Goodbye\n# finished at 2017-02-16 15:42:56 +0000\nINFO[0004] Received message from 127.0.0.1:55912 those envelope: (*smtpd.Envelope)(0xc4200d2000)({\n From: (string) (len=14) \"me@example.org\",\n To: ([]string) (len=1 cap=1) {\n  (string) (len=16) \"test@example.com\"\n },\n Data: ([]uint8) (len=208 cap=208) {\n  00000000  44 61 74 65 3a 20 54 68  75 2c 20 31 36 20 46 65  |Date: Thu, 16 Fe|\n  00000010  62 20 32 30 31 37 20 31  35 3a 34 32 3a 35 36 20  |b 2017 15:42:56 |\n  00000020  2b 30 30 30 30 0a 54 6f  3a 20 74 65 73 74 40 65  |+0000.To: test@e|\n  00000030  78 61 6d 70 6c 65 2e 63  6f 6d 0a 46 72 6f 6d 3a  |xample.com.From:|\n  00000040  20 6d 65 40 65 78 61 6d  70 6c 65 2e 6f 72 67 0a  | me@example.org.|\n  00000050  53 75 62 6a 65 63 74 3a  20 74 65 73 74 20 54 68  |Subject: test Th|\n  00000060  75 2c 20 31 36 20 46 65  62 20 32 30 31 37 20 31  |u, 16 Feb 2017 1|\n  00000070  35 3a 34 32 3a 35 36 20  2b 30 30 30 30 0a 58 2d  |5:42:56 +0000.X-|\n  00000080  4d 61 69 6c 65 72 3a 20  73 77 61 6b 73 20 76 32  |Mailer: swaks v2|\n  00000090  30 31 33 30 32 30 39 2e  30 20 6a 65 74 6d 6f 72  |0130209.0 jetmor|\n  000000a0  65 2e 6f 72 67 2f 6a 6f  68 6e 2f 63 6f 64 65 2f  |e.org/john/code/|\n  000000b0  73 77 61 6b 73 2f 0a 0a  54 68 69 73 20 69 73 20  |swaks/..This is |\n  000000c0  61 20 74 65 73 74 20 6d  61 69 6c 69 6e 67 0a 0a  |a test mailing..|\n }\n})\n\n\nINFO[0004] Message body: This is a test mailing\n```\n\n## Credits\n\n* [@siebenmann](https://github.com/siebenmann/smtpd) for awesome work on SMTPD package this packaged is based on.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorpix%2Fsmtpd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcorpix%2Fsmtpd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorpix%2Fsmtpd/lists"}