High performance IMAP client in Java based on Netty
This client is well tested and heavily used at HubSpot, but it is still under active development and its public API is not guaranteed to be stable.
- High performance, designed to handle many concurrent connections.
- TLS supported out of the box
XOAUTH2
support- Support for most GMail IMAP extensions
- Implemented RFCs
- RFC 3501 (not all commands supported, but its easy to add new ones, PRs always welcome!)
- RFC 2595 (TLS)
- RFC 6154 (Special-Use list)
- Many commands are still not implemented (most command related to appending/updating messages are not implemented)
- Pipelining of commands is not supported. It is hard to tell when the responses to these commands may be ambiguous, if you really need to execute concurrent commands we suggest simply opening multiple connections.
- The client currently provides no facilities for tracking message sequence numbers, we rely more heavily on UIDs.
- The server can send arbitrary untagged responses at any time, currently these get attached to the tagged response for the current command, this API needs improvement.
(in no particular order)
- RFC 5465 (
NOTIFY
) - RFC 2177 (
IDLE
) - RFC 2971 (
ID
) - Sequence number tracking
- Full RFC 3501
- NEVER execute blocking commands on an eventloop thread (i.e.
CountDownLatch.await
orFuture.get
)- Calls out to unknown functions (i.e. callbacks or event listeners) should always be done on isolated thread pools.
- Slow but not necessarily blocking operations should also be avoided
- Attempt to avoid doing long running tasks on event loop threads
- Use
new
as sparingly as possible to avoid creating garbage:- Share objects when possible
- Use netty bytebuf allocators when possible
- Use netty recyclers for objects that can be recycled.