On Apr 29, 2010, at 1:27 PM, Timo Sirainen wrote: > 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. > Ok gotcha.
> 2) when mbox_snarf_sync_init() is called the first time: > - find mbox_snarf namespace Know how to do that. > - open INBOX from that namespace and keep it open Ok sync init would open /var/mail/%u > - goto 3) > > 3) every time mbox_snarf_sync_init() is called: > - call mbox_snarf() > Oh Ok. So mbox_snarf would open the SNARF FILE and do the move and then return it like it does now. > 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. Yeah your thoughts help here. Thanks. Do you have a working example of mailbox_opened ? Would that solve my IDLE problem(doesn't stat /var/spool at all so no new messages)? -Jonathan
smime.p7s
Description: S/MIME cryptographic signature