Chang Song
2009-Sep-20 01:42 UTC
[Dovecot] plugin development guide for non-FS backing store
Hi, folks. I was wondering if anyone has some sort of guide or reference on plugin development. We are trying to develop a non-filesystem backing store. So basically we do not store mailboxes for users in local filesystem. We do RPC call to fetch from fileservers. Thank you in advance. Chang
Timo Sirainen
2009-Sep-21 05:44 UTC
[Dovecot] plugin development guide for non-FS backing store
On Sep 20, 2009, at 4:42 AM, Chang Song wrote:> I was wondering if anyone has some sort of guide or reference on > plugin development. > We are trying to develop a non-filesystem backing store. > > So basically we do not store mailboxes for users in local > filesystem. We do RPC call > to fetch from fileservers.Well, the best there exists currently is http://dovecot.org/list/dovecot/2007-November/026632.html but it's for an old Dovecot version. You really should start with Dovecot v1.2. Do you need to use some existing mail database or is it something completely new? I'm just wondering if my upcoming dbox filesystem abstraction layer would help you. Anyway, basically just go and look at lib-storage/mail-storage.h and mail-storage-private.h and mailbox-list.h and mailbox-list-private.h. Implement those using your RPC calls, using index_*() functions wherever possible, just like the filesystem backends. You can also make Dovecot use in-memory indexes only with your database, although it probably would be better to just create them on local disk and act as kind of a cache.