jwma (java webmail app) uses jakarta mail (formerly javamail) to provide access to an imap email store. Multiple users can authenticate, read, send and manipulate email storage and persist a list of contacts, email identities and their own individual preferences.
It works with email stored in mbox or maildir format or stored in a derby database; it has been tested with dovecot.james and exim4. See http://jwma.sourceforge.net/ for further details.