{"id":26022970,"url":"https://github.com/agrison/ocamail","last_synced_at":"2025-03-06T10:37:37.654Z","repository":{"id":2713535,"uuid":"3707950","full_name":"agrison/ocamail","owner":"agrison","description":"Simple SMTP Server in OCaml","archived":false,"fork":false,"pushed_at":"2013-02-21T06:02:52.000Z","size":124,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-16T07:13:10.745Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"OCaml","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/agrison.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":"2012-03-13T15:25:12.000Z","updated_at":"2024-04-16T07:13:10.746Z","dependencies_parsed_at":"2022-09-03T12:01:01.452Z","dependency_job_id":null,"html_url":"https://github.com/agrison/ocamail","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agrison%2Focamail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agrison%2Focamail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agrison%2Focamail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agrison%2Focamail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/agrison","download_url":"https://codeload.github.com/agrison/ocamail/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242194603,"owners_count":20087615,"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":"2025-03-06T10:37:36.706Z","updated_at":"2025-03-06T10:37:37.644Z","avatar_url":"https://github.com/agrison.png","language":"OCaml","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OCamail, simple SMTP Server written in OCaml\n\n**tldr:** Just because I can and I found the name amusing :-P. See the webpage dedicated to it on my [website](http://grison.me/ocamail).\n\n*OCamail* is a simple SMTP Server acknowledging all requests it receives. It is written in [Objective Caml](http://caml.inria.fr/ocaml/index.fr.html) for development and learning purposes.\n\nAttachments (non-gziped only) are supported and can be saved in a directory in order to be checked if needed.\n\nOCamail is useful for any local development that makes uses of SMTP. But for real needs you may prefer using [smtp4dev](http://smtp4dev.codeplex.com/) which does the same, and even even more (at least on Windows) for free.\n\nThe code contains just three modules for:\n* String Utilities and parsing of SMTP commands\n* Base64 decoding\n* SMTP handling\n\n##Sample session\n\n    $ ocaml ocamail.ml\n    OCaMail - Binding on 0.0.0.0:25.\n    OCaMail - Waiting for client.\n    Responding [220 CaMail - Simple Fake SMTP Server - Ready]\n    \u003e ehlo grisonal.aris-lux.lan\n    Responding [250 OCaMail greets you, whoever you are]\n    \u003e mail FROM:\u003cfoo@bar.com\u003e\n    Responding [250 OK]\n    \u003e rcpt TO:\u003ca.grison@gmail.com\u003e\n    Responding [250 OK]\n    \u003e data\n    Responding [354 Start mail input; end with \u003cCRLF\u003e.\u003cCRLF\u003e]\n    \u003e Hello world!\n    \u003e .\n    Responding [250 OK]\n    \u003e mail FROM:\u003cfoo@bar.com\u003e\n    Responding [250 OK]\n    \u003e rcpt TO:\u003ca.grison@gmail.com\u003e\n    Responding [250 OK]\n    \u003e data\n    Responding [354 Start mail input; end with \u003cCRLF\u003e.\u003cCRLF\u003e]\n    \u003e Content-Type: multipart/mixed; boundary=\"===============1632957673==\"\n    \u003e MIME-Version: 1.0\n    \u003e\n    \u003e --===============1632957673==\n    \u003e Content-Type: text/plain; charset=\"us-ascii\"\n    \u003e MIME-Version: 1.0\n    \u003e Content-Transfer-Encoding: 7bit\n    \u003e\n    \u003e Hello\n    \u003e --===============1632957673==\n    \u003e Content-Type: application/octet-stream\n    \u003e MIME-Version: 1.0\n    \u003e Content-Transfer-Encoding: base64\n    \u003e\n    \u003e SGVsbG8gSSdtIGp1c3QgYSBzaW1wbGUgYXR0YWNobWVudCB0byB0aGF0IGVtYWlsLgpJZiBldmVy\n    \u003e eXRoaW5nIGdvZXMgd2VsbCwgeW91IHNob3VsZCByZXRyaWV2ZSBtZSBpbiB0aGUgT0NhbWFpbCBk\n    \u003e aXJlY3RvcnkuCgpIYXZlIGZ1biE=\n    \u003e --===============1632957673==--\n    \u003e .\n    Responding [250 OK]\n    \u003e quit\n    Responding [221 CaMail - Simple Fake SMTP Server - Service closing transmission channel]\n\n##Compile and run\n\nUsing `ocamlfind` and `ocamlc`\n\n    $ ocamlfind ocamlc -package unix -package str -linkpkg ocamail.ml -o ocamail\n\t$ ./ocamail\n\tOCaMail - Binding on 0.0.0.0:25.\n    OCaMail - Waiting for client.\n\t\nIn case you don't have sufficient right to bind to `0.0.0.0` you might run the process with `sudo`\n\n\t$ sudo ./ocamail\n\tOCaMail - Binding on 0.0.0.0:25.\n    OCaMail - Waiting for client.\n\t\nOr directly using `ocaml`\n\n    $ ocaml ocamail.ml\n\tOCaMail - Binding on 0.0.0.0:25.\n    OCaMail - Waiting for client.\n\t\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagrison%2Focamail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagrison%2Focamail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagrison%2Focamail/lists"}