# Are there any IMAP server libraries?

**URL:** <https://discuss.ocaml.org/t/are-there-any-imap-server-libraries/16175>\
**Category:** Ecosystem\
**Tags:** email, imap, smtp\
**Created:** [February 24, 2025, 5:00pm UTC](https://discuss.ocaml.org/t/are-there-any-imap-server-libraries/16175 "2025-02-24T17:00:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![stepbrobd](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/stepbrobd/32/5624_2.png) [@stepbrobd](https://discuss.ocaml.org/u/stepbrobd)\
**Post date:** [February 24, 2025, 5:00pm UTC](https://discuss.ocaml.org/t/are-there-any-imap-server-libraries/16175/1 "2025-02-24T17:00:37Z")

</div>

There are a few SMTP client/server libraries:

- [GitHub - mirage/colombe: Implementation of SMTP protocols in OCaml](https://github.com/mirage/colombe)
- [GitHub - janestreet/async\_smtp: SMTP client and server](https://github.com/janestreet/async_smtp)
- …

And an archived IMAP client library

- [GitHub - nojb/ocaml-imap: Lwt-compatible IMAP4rev1 client library for OCaml](https://github.com/nojb/ocaml-imap)

IMO IMAP servers are pretty hard to implement comparing with SMTP since there are more commands and states to keep track of as defined in the RFC

I’m curious whether there’s any read-to-use IMAP server library or I guess I have to write my own stripped down version of it to suit my need ☹

---

<div class="post-metadata">

**Author:** ![nojb](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/nojb/32/519_2.png) [@nojb](https://discuss.ocaml.org/u/nojb)\
**Post date:** [February 24, 2025, 5:54pm UTC](https://discuss.ocaml.org/t/are-there-any-imap-server-libraries/16175/2 "2025-02-24T17:54:47Z")

</div>

As far as I know, the answer is “no”.

There was an experimental IMAP server a long time ago with an Irmin backend, but as far as I know, it was never more than an experiment. It was part of the Mirage constellation of projects.

A quick internet search yields [GitHub - gregtatcam/imaplet-lwt: imaplet revamp with Lwt](https://github.com/gregtatcam/imaplet-lwt), and indeed it looks pretty much abandoned 🙂

Cheers,  
Nicolas
