Hello, In what situations will Dovecot 1.2.11 rebuild its uidlist? I am using the maildir storage format, and I am also modifying the uidlist manually (so it's possible I could jack* things up). I have found some related code in maildir-uidlist.c: maildir_uidlist_next. 1) Blank filename or UID 0 2) Any UID not being greater than the proceeding UID 3) Any UID being greater than ~4 billion. 4) Any UID being greater than the suggested next uid. 6) If a filename contains a / 7) General header line sanity checking. Are there any other sections of the code that do sanity checks on dovecot-uidlist (for Maildir type storage)? And optionally do you agree that maildir_uidlist_set_corrupted is the best place to watch to see if I have mangled the uidlist? Thanks in advance, Pat * 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.
Timo Sirainen
2010-Apr-29 18:16 UTC
[Dovecot] What causes dovecot to rebuild dovecot-uidlist?
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 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20100429/9fb12cf0/attachment-0002.bin>
On Thu, Apr 29, 2010 at 1:16 PM, Timo Sirainen <tss at iki.fi> wrote:> On Fri, 2010-04-23 at 17:26 -0500, Pat wrote: > > > * 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. > > Yes, we use the dovecot UIDs as the key for our webmail cache. It waseasier to do it this way than to make dovecot use our existing keys. And I'm sure much more stable for a novice C developer like myself since I have modify dovecot less. Also we do not plan to upgrade our version of dovecot once it is stable on our end, so I think that changes to locking are OK. If we do have to upgrade I will keep this in mind.> 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 >Thanks, this is very interesting I wasn't aware of this feature, I will look into it some more. Pat