On Apr 18, 2009, at 12:41 PM, Renaud Allard wrote:

I am running an asynchronously replicated mail setup. 2 servers are each
running an smtp server which uses dovecot as the LDA.
I am using unison to replicate mail files between servers.
Before, I was using Maildir format and after reading so much good papers about the very good performance of dbox format, I decided to switch to dbox.
However, I now have a very annoying problem, as mails are created with
names like u.1234 and numbers are following each others. So, if there is
for example a mail stored as u.1001 on both servers, and now 2 mails
arrive at about the same time, 1 on each server. Then, they will both be
created as u.1002, that means unison will encounter a conflict as both
files are different.

Are you saying that both the servers are accepting and writing mails? That can't really work unless they can also do global file locking.

So my question would be, is there a way to tell the servers to increment
by 2 instead of 1 and have each an offset (like you can do with mysql
with auto incrementing tables for example)? That way, with former
example, one mail would be stored as u.1002 and the other as u.1003.

Even if u.* files didn't conflict, index files would still break. And even if index files somehow could be made not to break, this would break IMAP protocol and IMAP clients might not download some of the mails anyway. I'm kind of surprised that it already wasn't breaking with Maildir.

Reply via email to