On Tuesday, August 20 at 03:24 PM, quoth Leon Waldman:
Do any one have any inputs or caveats in store the Maildir folders on dropbox to sync them between different computers?

I think the caveat is going to be race conditions; and given that Dropbox can be used offline, the race conditions can be quite easy to trigger. There is no inherent tracking of unique messages in Maildir folders. Imagine the relatively simple situation where you receive a new message. In location A you read it, and in location B you delete it. As long as you haven't had a full A sync followed by a full B sync BEFORE you delete that message, you can run into trouble (imagine B's dropbox client does a scheduled sync before A does, so B will wait a full refresh timeout before it will see the changes to A). Reading the email causes the underlying mail file to be renamed, which means that the delete operation on the slower (temporarily un-sync'd) host will be reversed, and your message will magically re-appear. However, since it shows back up marked as "read", not only will it be easy for you to not notice, it will be easy for mutt to not notice (don't worry, mutt will notice eventually).

Since Dropbox can be used offline as well as online, imagine the same thing happening where A is offline when you read the message (it queues up the "delete file X, store file X.newname" operations), and comes back online sometime after you deleted the message in location B. Changes to the mail directory done on A will supersede operations done on location B in unexpected ways. As another example, imagine that on location B, instead of delete the message, you reply to it. Replying causes another rename operation, which means that after a full sync, you will have two copies of that message: one marked read, and the other marked "replied".

So okay, maybe Maildir isn't the right storage technique, how about Mbox? This is an even bigger problem, because in situations like I just described, the entire MAILBOX will be duplicated (by Dropbox itself), because Dropbox has no real way of handling change conflicts in the internals of files (all files, to them, are binary blobs, not text blocks whose changes can be merged).

The fact of the matter is that Dropbox is not designed for frequently changing data, or for handling even slightly-overlapping synchronization issues ESPECIALLY of filesystem meta-data, such as file names and directories, which Maildir relies on for correct operation. In terms of how it technically functions, Dropbox can be better thought of as an on-line backup system: synchronization operations are not instantaneous, and has only rudimentary conflict resolution mechanisms.

On the other hand, such synchronization issues (and worse) are EXACTLY what IMAP was designed to handle.

~Kyle
--
As far as the laws of mathematics refer to reality, they are not certain, and as far as they are certain, they do not refer to reality.
                                                    -- Albert Einstein

Reply via email to