imap-flow
is a thin abstraction over IMAP's distinct "protocol flows".
These are literal handling, AUTHENTICATE, and IDLE.
The way these flows were defined in IMAP couples networking, parsing, and business logic.
imap-flow
untangles these flows, providing a minimal interface allowing sending and receiving coherent messages.
It's a thin layer paving the ground for a correct client or server implementation.
This repository also serves as a playground for crates built on imap-flow
.
These will eventually be moved into their own repositories.
Notably, we have the proxy
, tasks
, and tag-generator
workspace members.
proxy
is an already usable (but still not production-ready) IMAP proxy. It gracefully forwards unsolicited responses, abstracts away literal processing, andDebug
-prints messages. Proxies are great for challenging the usability of a library, and we use them to validate our design decisions. (See the README.)tasks
is our prototype of a higher-level IMAP library that abstracts away command and response handling intoTask
s. This crate will eventually become what a client or server implementor should use to get IMAP right. Currently, only the client side is implemented.tag-generator
generates process-wide unique (and unguessable) IMAP tags. This crate is here for organizational reasons and may be moved (or inlined) eventually.
This crate is dual-licensed under Apache 2.0 and MIT terms.
Thanks to the NLnet Foundation for supporting imap-flow
through their NGI Assure program!