[Dovecot] versioning of mailbox index files

morrison morrisonli at 126.com
Wed Mar 19 15:12:51 UTC 2014


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,


More information about the dovecot mailing list