[Kroupware] Re: [Kde-pim] Kaplan: The road ahead
Steffen Hansen
kroupware@mail.kde.org
Sat, 21 Sep 2002 16:00:20 +0200
* Don Sanders <sanders@kde.org> [Sep 21. 2002 10:10]:
> I won't bother the list with this.
>
> Regarding the trustworthiness of IMAP UIDs it's just this kind of
> UW-IMAP server problem that worries me a bit:
> http://lists.kde.org/?l=kmail&m=97680310909416&w=2
>
> But if that's already been solved, in KMail or the IMAP kio-slave then
> never mind I guess it isn't a problem.
Thanks for the info Don. This problem doesn't have to do with the UIDs
for messages, but with a similar number called UidValidity for
_folders_.
The idea is that folders get assigned a strictly increasing ID-number
(for example based on the current time). This will allow the client to
detect situations like this:
While the client is offline, someone else deletes the folder named X and
creates a new folder also named X.
When the client synchronizes next time, it can compare the UidValitidy
of the folder X in cache and on server. If they are different, well,
then it's a new folder (so the old one should be expunged completely and
the contents of the new one downloaded).
But I guess we can't rely on that then :-(
Actually, if the server (cyrus imapd) assigns a new UidValidity to the
folder when it changes while open, it would explain why I lost all my
mail on my test-account a couple of times while hacking the IMAP code...
Would it be true that we wont have the problems if we always (if
possible) open the folder read/write? When our sync. code works, the
first thing it will do is to upload new messages from the local cache to
the server, which should open the folder in read/write mode.
wkr.
--
Steffen Hansen
Senior Software Engineer, Klarälvdalens Datakonsult AB
email: hansen@kde.org, steffen@klaralvdalens-datakonsult.se,
steffen@hrhansen.dk
www: http://www.hrhansen.dk