James Leifer
2004-Dec-27 15:11 UTC
[Dovecot] bidirectional synchronization of dovecot-managed maildirs
Hello and happy holidays, I've been thinking about high performance bidirectional synchronizing the mail on my laptop (which is frequently disconnected) and my workstation at work (which is always on and receives all inbound mail). Both run dovecot on top of maildir. I've been playing with offlineimap, unison (which I already use for all my non-mail files), as well as the gnus agent (in IMAP "disconnected mode"). None of these solutions is really satisfactory: * offlineimap treats a message refile between folders as a delete-plus-resend; * unison doesn't understand the semantics of flag changes at the end of files in maildirs; it also has to stat all the files (which can become slow) to detect changes; * gnus agent can't refile messages between folders when in disconnected mode. Perhaps there are better disconnected IMAP modes available for other MUAs, but, it seems like a more general solution would be appropriate. In particular, the "uniq" field of a maildir filename is an easy way of tracking the identity of a message as it gets refiled. My question: would it be difficult to patch dovecot so that it maintained the *same* uniq when copying messages between folders? What about adding hooks that get triggered whenever dovecot copies or deletes messages? These hooks could log the changes. Later, when one tries to sync, one merges the changes from both replicas and then applies them. I'm aware that dovecot has an option to do copies as hardlinks, which is a good start, but still requires one to stat the files to discover which have the same inode. This is *much* slower than simply listing the directories and comparing maildir "uniq" fields. I'm aware that this invariant wouldn't be maintained if other programs modified the maildirs under dovecot's nose, but I'm willing to exclude this possibility. Suggestions? Best regards, -James Leifer
Marcus Rueckert
2004-Dec-27 15:24 UTC
[Dovecot] bidirectional synchronization of dovecot-managed maildirs
On 2004-12-27 16:11:35 +0100, James Leifer wrote:> Suggestions?kmail - offline imap mailsync darix -- irssi - the client of the smart and beautiful people http://www.irssi.de/
Timo Sirainen
2004-Dec-28 14:05 UTC
[Dovecot] bidirectional synchronization of dovecot-managed maildirs
On Mon, 2004-12-27 at 16:11 +0100, James Leifer wrote:> * offlineimap treats a message refile between folders as a > delete-plus-resend;What other way is there to treat it? IMAP doesn't track message copies across folders in any case.> In particular, the "uniq" field of a maildir filename is an easy way > of tracking the identity of a message as it gets refiled. My > question: would it be difficult to patch dovecot so that it maintained > the *same* uniq when copying messages between folders?I don't think it's a good idea. Then copying a message into folder, setting a flag for it, and copying the same message there again would create maildir file with duplicate unique part. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20041228/0acd3869/attachment-0001.bin>
Apparently Analagous Threads
- I'm unable to download R from any of the CRAN mirrors. Any sugge (PR#7823)
- Dovecot setup fails w. multiple mail locations (gnus/dovecot/offlineimap)
- (slightly OT) syncing / migrating IMAP mailboxes
- [fdo] Request to host project "OpenSync" a synchronization framework
- Syncing several emails accounts with offlineimap and dovecot