[Dovecot] plugin development guide for non-FS backing store

Timo Sirainen tss at iki.fi
Mon Sep 21 08:44:07 EEST 2009


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.



More information about the dovecot mailing list