The Apache James Mailbox is a library providing a flexible Mailbox storage accessible by mail protocols (IMAP4, POP3, SMTP,...) and other protocols.
It can also be embedded into your application to implement for example the Mailbox Pattern.
The prime usage of this library is clearly to serve as mailbox persistence for IMAP protocol. The API and implementations rely on RFC 2060 IMAP4rev1 definitions and requirements but can perfectly be used in any other (non mail server) context.
The mailbox library supports different persistence mechanisms: SQL Database via Apache OpenJPA or in-memory implementation.
You can download current 0.4 release. The API as the schemas for the different implementations are susceptible to evolve.
Apache James Server 3 uses this library to implement its user mailboxes.
Apache James Mailbox is tested and fully compatible with other Apache James libraries such as the Apache James IMAP (see this link for the Mailbox/IMAP integration tests source code)
Go to the source code page to get more information on how to develop on Apache James Mailbox.
Apache James Mailbox uses SLF4J as logging facade. For specific bindings one needs to add a particular SLF4J binding.