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.
signature.asc
Description: This is a digitally signed message part