[Dovecot] dsync - one or two ways?

joakim at verona.se joakim at verona.se
Sat Jul 18 03:37:14 EEST 2009


Timo Sirainen <tss at iki.fi> writes:

> On Sat, 2009-07-18 at 01:43 +0200, joakim at verona.se wrote:
>> Timo Sirainen <tss at iki.fi> writes:
>> 
>> > On Fri, 2009-07-17 at 22:31 +0200, joakim at verona.se wrote:
>> >> This sounds really awesome! How testable is it?
>> >
>> > By "testable" do you mean "is it working now"? It should work except for
>> > mailbox deletions and renames. But I haven't really tested it, just ran
>> > unit tests. :) And it pretty much requires using Dovecot v2.0 for IMAP
>> > so that it can handle expunges properly. And I wouldn't really recommend
>> > doing that yet..
>> 
>> Would this setup work then?
>> - dovecot 1.2 on master and slave machines
>> - dsync on the slave machine, 2 way sync
>> - propagate expunges by some other means, like removing maildir mail
>> files with unison or similar?
>
> Actually there shouldn't be problems with expunges after all. Conflicts
> just are detected less reliably. For example if:
>
> Server 1 saves message with UID=123
> Server 2 saves a different message with UID=123
> Server 1 expunges messages UID=123
>
> dsync is run to move changes from server 2 to server 1. It notices that
> "oh, UID=123 has been expunged from server 1 already" and server 2's
> UID=123 message isn't copied there. Or if you're syncing changes from 1
> to 2, it would expunge the UID=123 from server 2.
>
> If server 1 had been running Dovecot v2.0, the expunge record would have
> message's GUID stored and dsync would notice that there was a GUID
> conflict and copy the server 2's message to server 1 as UID=124.

In my case mail would only arrive on the master. If I interpret you
correctly this case will be very simple for dsync and will work already.

>
>> How would I handle mailbox addition, renaming and deletions?
>
> The reason why dsync can't do that without Dovecot v2.0 is because it
> can't be done reliably without storing extra information.. (And I
> haven't yet even implemented that to v2.0.) So the answer is: Not
> easily.

Will addition work automatically?
Can renaming and deletion be made by renaming/deleting maildir folders
manually?

I guess I can do the setup and test it myself :)

-- 
Joakim Verona


More information about the dovecot mailing list