There are a few SMTP client/server libraries:
- GitHub - mirage/colombe: Implementation of SMTP protocols in OCaml
- GitHub - janestreet/async_smtp: SMTP client and server
- …
And an archived IMAP client library
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