ImapArchiver is a tool which can be used to save the all imap account into a local directory/archive. The ideal objective is to used it with cron to automatically make a back up of your imap account
MailDB adds a database back-end to an IMAP server for features such as "virtual" mail folders (msgs appearing in multiple folders), "view" folders (dynamic results of searches), etc. The DB is inherently multi-user, allowing msg reference counting.