OfflineIMAP-project Digest, Vol 67, Issue 21

Sebastian Spaeth Sebastian at SSpaeth.de
Wed Apr 22 07:38:59 BST 2015



Am 22. April 2015 04:33:43 MESZ, schrieb chris coleman <christocoleman at yahoo.com>:

>The only truly static, universally unique ID is the "message-ID"
>header. 

Unfortunately that is not true. Sent yourself a mail, you will have a mail with the same message-id in both your INBOX and your SENT folder, for the easiest example. The messages will be different in content (have Differennt headers), so treating them equivalent would be a failure. Also broken software has been known to use non-unique values when sending out mails ( or no value at all). Also draft mails often have no id yet.

And lastly, it is a string determined by the sending client, so relying on it opens up a box of security concerns. Let mensend you a bill and send you a bill with twice the amount (but the same message-id) a few days later. Do we really want to replace the first message?

Lastly, some servers allow searching for mails by message-id, but others don't. How would you want to deal with that?

Message-id is useful as a hint, and in combination with message size and a hash value over the body content we definitely could be using it for cool things. (For instance reconstructing our cache when Uidvalidity has changed).

But to claim that this is the id to use in preference to message UIDS? No, I would disagree with that.

Sebastian



>
>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.
>
>This is what I meant by improving the algo.
>
>
>Chris Coleman
>
>
>
>At Apr 17, 2015, 9:01:50 AM, Sebastian Spaeth wrote:
>
>
>
>
>>Von: Chris Coleman notifications at github.com>
>>An: OfflineIMAP/offlineimap offlineimap at noreply.github.com>
>>Gesendet: Thu Apr 16 19:50:01 MESZ 2015
>>Betreff: Re: [offlineimap] mini refactoring etc (#190)
>>
>>One algo that needs improving is the algo that determines message
>>unique identity.
>>
>>Currently using only the IMAP UID, which is not a dependable
>indicator.
>>
>>The IMAP server can reset the UIDs at any time.
>
>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.
>
>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).
>
>Sebastian
>-- 
>Sent from mobile phone. Please excuse brevity.
>
>_______________________________________________
>OfflineIMAP-project mailing list:
>OfflineIMAP-project at lists.alioth.debian.org
>http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/offlineimap-project
>
>OfflineIMAP homepages:
>- https://github.com/OfflineIMAP
>- http://offlineimap.org

-- 
Sent from mobile phone. Please excuse brevity.




More information about the OfflineIMAP-project mailing list