My current approach is to introduce a index version file .dovecot.index.version 
in each mailbox and hooks mailbox_allocated event via my own plugin. If the 
version file does not exist or exist but with version number which need to be 
upgraded, index files in that mailbox are removed. I also tried to hook 
mailbox_opened() event and found that event was too late (index was loaded 
already). The side effect of hooking mailbox_allocated is that the event fires 
not only by 'select' command. 'list' command can also trigger a lot of 
mailbox_allocated events. Are there any better hook points I can use for this 
purpose?

Thanks,

Reply via email to