[Dovecot] Question about mbox_snarf and dovecot2.0
Timo Sirainen
tss at iki.fi
Thu Apr 29 20:27:57 EEST 2010
On Thu, 2010-04-29 at 11:11 -0400, Jonathan Siegle wrote:
> > namespace {
> > location = mbox:~/mail
> > ..
> > }
> > namespace {
> > prefix = ~~MboxSnarf~~/ # or whatever unique string you can think of
> > location = mbox:~/mail:INBOX=/var/mail/%u
> > list = no
> > hidden = yes
> > }
> > plugin {
> > mbox_snarf = ~~MboxSnarf~~/
> > }
I guess my idea above was that mbox_snarf would:
1) Do nothing special when opening the mailbox (unlike now), except add
hooks to sync_init and mailbox_close.
2) when mbox_snarf_sync_init() is called the first time:
- find mbox_snarf namespace
- open INBOX from that namespace and keep it open
- goto 3)
3) every time mbox_snarf_sync_init() is called:
- call mbox_snarf()
4) on mailbox_close() close the snarf mailbox
> As I need this to function, I've been thinking about your words above
> and been reading http://wiki.dovecot.org/Design/Storage/Plugins. The
> mentality of it reminds me of the lazy-expunge-plugin, but this API is
> taking some time getting used to. Any pointers would be appreciated.
Maybe the above helps? That Plugins wiki page probably won't help you
much, since the current mbox_snarf already sets up the plugin stuff
correctly. "Overriding methods" is probably the only important part
there. The other Design/* pages could be more helpful.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20100429/ade34ef1/attachment-0001.bin
More information about the dovecot
mailing list