25 Sep
2006
25 Sep
'06
12:18 p.m.
On Mon, 2006-09-25 at 12:37 +1000, James Turnbull wrote:
Hi
Just wondering if Virtual Folder functionality was on the roadmap for Dovecot?
I've been thinking about implementing them once in a while. They'd be nice to have, so maybe some day when I have more time.
I don't think this would necessarily even be difficult to implement, so if anyone wants to try to do it I could help. I think the way it should work is:
- create a new vfolder mail storage backend
- create dovecot index files for each vfolder. for each mail remember the original mailbox ID and message UID
- keep track of all the mailboxes that match the vfolder rule
- in storage syncing code check which mailboxes have changed, open those mailboxes and sync the changes from them to the vfolder
- the syncing could be faster if it was done by looking at the transaction log file, but this is just an optimization
Currently there doesn't exist mailbox ID <-> name mapping, but I'll soon implement a mailbox list index into CVS HEAD which has it. The mailbox list index also makes it faster to check which mailboxes have changed.
All of this should be possible to be implemented with a plugin.