On Fri, Nov 02, 2012 at 02:13:18PM -0400, Dave Abrahams wrote:
> Would it be hard and/or expensive to use message-ids in mbsync's
> index cache (or whatever you call it) instead of just UIDs?
> 
it's called sync state. ;)
it wouldn't be terribly hard/expensive, but it's not trivial, either:
- the msg-id needs to be queried from new messages (not old ones, as
  it's immutable per definition). this costs a bit of bandwidth, but not
  that much compared to later downloading the entire messages.
- the msg-id needs to be stored in the sync records, which will
  typically at least triple their size. this isn't exactly terrible,
  given that the sync state files are usually in the lower kilobyte
  range.
- the msg-ids of new messages on one side need to be matched to msg-ids
  of all messages on the other side. the lookup will be fairly cheap
  with a hash table.
  but now it gets nasty: msg-ids are not unique: it's possible to edit
  messages. per imap this creates a new message (as messages are
  immutable, sans the flags), but msg-id matching will report a
  duplicate. what now? download the entire messages and compare, i
  guess. this makes the whole business a somewhat complex multi-stage
  process.

a very good use of msg-ids would be detecting moves between mailboxes -
somebody who does a lot of manual sorting would get significant benefits
of of that. however, this is significantly more complex: the
synchronization "threads" would have to be joined.

patches welcome, i'd say ...

regards

------------------------------------------------------------------------------
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d
_______________________________________________
isync-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/isync-devel

Reply via email to