[Dovecot] Clients and dovecot-uidlist

Timo Sirainen tss at iki.fi
Fri Jul 31 19:26:04 EEST 2009


On Fri, 2009-07-31 at 18:15 +0200, Thomas Hummel wrote:
> On Fri, Jul 31, 2009 at 11:30:30AM -0400, Timo Sirainen wrote:
> 
> > For example if you have mails with  
> > UIDs 1, 2, 5 and 10 and you delete dovecot-uidlist and dovecot.index*,  
> > Dovecot gives them UIDs 1, 2, 3, 4.
> 
> Ok, I get it. 
> 
> But the only way I can think of a client can detect that UIDs are not the same
> for the same messages is by detecting that UIDVALIDITY has changed. So if only
> dovecot-uidlist gets deleted but index (which store UIDVALIDITY) survives, what
> will happen in the client ? Will he fetch the wrong data ?

Well, let's say your uidlist contains:

 - uidvalidity = 1234567890
 - next_uid = 11
 - uid 1 = 1248670280.M981281P9896.host:2,
 - uid 5 = 1248673753.M935252P9845.host:2,
 - uid 10 = 1248675280.M904006P9872.host:2,

And index contains information:

 - uidvalidity = 1234567890
 - next_uid = 11
 - message uids: 1, 5, 10

If you delete dovecot-uidlist, it's regenerated as:

 - uidvalidity = 1234567890
 - next_uid = 14
 - uid 11 = 1248670280.M981281P9896.host:2,
 - uid 12 = 1248673753.M935252P9845.host:2,
 - uid 13 = 1248675280.M904006P9872.host:2,

And index is updated:

 - uidvalidity = 1234567890
 - next_uid = 14
 - message uids: 11, 12, 13

i.e. Dovecot gets also the next_uid from index file, and starts
assigning UIDs beginning from it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20090731/76587228/attachment.bin 


More information about the dovecot mailing list