[Dovecot] Maildirs location migration

Timo Sirainen tss at iki.fi
Tue Apr 16 18:11:02 EEST 2013


On 16.4.2013, at 18.03, Thomas Hummel <hummel at pasteur.fr> wrote:

> On Tue, Apr 16, 2013 at 05:51:21PM +0300, Timo Sirainen wrote:
> 
>> dsync in general resolves UID conflicts. If there's any chance that an IMAP client could have seen two different messages with the same UID, both of the messages get assigned new UIDs. 
> 
> I'm not sure I understand this correctly :
> 
> let's say that :
> 
> 1. in old, foobar as uid 100
> 2. initial dsync
> 3. user gets relocated, kicked and reconnects to new, then deletes foobar
> 4. final dsync. dsync somehow manages to understand it should not sync foobar from old to new

Yes. It sees that uid 100 was deleted, and keeps nextuid=101.

> 5. migration is over, new message foobaz comes in. Oh, I get it, you mean since
> uids gets only incremented, this new could not get uid 100 and then confuse the
> client index ?

The new message gets uid 101, as according to nextuid value. A slightly more complex one would have been:

1. you have mails up to 100
2. dsync
3. old server gets new mail uid=101
4. old server deletes uid 101
5. new server gets new mail uid 101
5. dsync sees that there's a conflict (even though the old mail was already deleted), and gives the new server's new mail uid 102



More information about the dovecot mailing list