On Sat, 2007-12-08 at 10:11 -0500, Sacha Bernstein wrote:
I would like to develop a new mailbox format for a very specialized application. Can anyone point me in the appropriate direction to get started writing a plugin?
More detail for anyone interested: I need to store mail in a format that's quickly accessible and modifiable to an external process. This is for a very low-volume mail system (averaging less than 50 messages stored at any one time) that needs very good indexing. I need to create new mailboxes on the fly and perform fast searches across all the mailboxes. I intend to store all the messages in an SQL database. Any help getting started interfacing with dovecot (other than reading through _all_ the source code) would be greatly appreciated.
v1.1 makes this a lot easier, so start with it instead of v1.0. You can probably get started with my existing SQL backend code: http://dovecot.org/list/dovecot/2007-November/026632.html
The main idea is to implement APIs in lib-storage/mail-storage-private.h and lib-storage/mailbox-list-private.h. Most of these calls can be implemented by calling generic index_*() functions in lib-storage/index/.