On Fri, 2010-04-23 at 17:26 -0500, Pat wrote:
Are there any other sections of the code that do sanity checks on dovecot-uidlist (for Maildir type storage)?
I can't remember..
And optionally do you agree that maildir_uidlist_set_corrupted is the best place to watch to see if I have mangled the uidlist?
Probably.
- I insert into dovecot-uidlist manually when I deliver new messages, or discover a message that is not in uidlist for some reason. For compatability reasons I maintain a completely separate cache. If there is a better way to keep the uidlist up to date when the user isn't necessarily accessing the account via dovecot imap, I'm open to suggestions. However my situation is fairly unique I think.
Why do you need to update uidlist at all? Or do you need access to IMAP UIDs outside Dovecot? I've changed the uidlist writing rules/locking already a few times and probably will change in future versions, so changing it without Dovecot's code doesn't seem all that good of an idea to me.
If you need the uidlist updated, what about if you just tell Dovecot to update it, for example one easy way is to use http://wiki.dovecot.org/PreAuth
printf "1 examine inbox\n2 logout\n" | dovecot --exec-mail imap