<table cellspacing="0" cellpadding="0" border="0"><tr><td valign="top"><div id='yahoo__compose_area' style="background-color:white; display:block; font-family:HelveticaNeue-Regular,Helvetica;">Yes Sebastian, this is exactly what I meant. <div><br><div>The UID is not *really* static , this is admitted in the IMAP RFC 2060, UIDVALIDITY must be saved and compared between IMAP sessions, when it changes, our entire local cache is invalid and must be burned and re-downloaded.</div><div><br>This is a huge drawback to the original design by John Goerzen, in my humble opinion. Myself and many other users of OLI have had to slowly redownload entire mailboxes over slow 1-2 mbps links to remote servers...</div><div><br></div><div>The only truly static, universally unique ID is the "message-ID" header. </div><div><br></div><div>I recommend we cache the Message-ID in our SQLite database, plus UID, plus sha256 hash of the message, so that "remote move from Inbox to
 Archive-2015-Q2" will replace "download from Inbox, then re-upload to Archive-2015-Q2", saving often 1-20MB when that message has attached documents.<br><br></div></div><div>This is what I meant by improving the algo.</div><div><br></div><div>Chris Coleman</div><div><br></div></div><div id='yahoo__original_message' class='yQTDBase'><br><blockquote style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex; ">At Apr 17, 2015, 9:01:50 AM, Sebastian Spaeth<'Sebastian@SSpaeth.de'> wrote:<div id="msgSandbox_AO12w0MAAANqVTEEYQTeGFyYF9E" class="msgSandbox" style="padding: 1.5em 0.5em 0.5em 1.2em; word-wrap: break-word;"><br><br><br>>Von: Chris Coleman <<a ymailto="mailto:notifications@github.com" href="javascript:return">notifications@github.com</a>><br>>An: OfflineIMAP/offlineimap <<a ymailto="mailto:offlineimap@noreply.github.com" href="javascript:return">offlineimap@noreply.github.com</a>><br>>Gesendet: Thu Apr 16 19:50:01 MESZ 2015<br>>Betreff:
 Re: [offlineimap] mini refactoring etc (#190)<br>><br>>One algo that needs improving is the algo that determines message<br>>unique identity.<br>><br>>Currently using only the IMAP UID, which is not a dependable indicator.<br>><br>>The IMAP server can reset the UIDs at any time.<br><br>With all due respect, that is without any merit. The imap server does not reset UIDs at any time (nor is it allowed to). Message UIDs are how you reliably identify messages across IMAP sessions.<br><br>What would be good, were to store the md5 hash and message id (taken from the mail header) so we recognize moving messages across folders (rather than deleting and uploading it).<br><br>Sebastian<br>-- <br>Sent from mobile phone. Please excuse brevity.<br><br>_______________________________________________<br>OfflineIMAP-project mailing list: <a ymailto="mailto:OfflineIMAP-project@lists.alioth.debian.org"
 href="javascript:return">OfflineIMAP-project@lists.alioth.debian.org</a><br><a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/offlineimap-project" target="_blank">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/offlineimap-project</a><br><br>OfflineIMAP homepages:<br>- <a href="https://github.com/OfflineIMAP" target="_blank">https://github.com/OfflineIMAP</a><br>- <a href="http://offlineimap.org" target="_blank">http://offlineimap.org</a><br></div><div></div></blockquote></div></html></td></tr></table>