Is there a way to get a running transaction log from a Dovecot instance to synchronize (and I use that word very, very loosely) multiple instances that don't share a network? Why I would want to do such a thing: I have a couple way stations along a long, winding road through very hilly country, and at each of these stations, I have a few people (and many, many more at one end of the road). Which people are where varies from hour to hour (but they're all members of a known, larger, group of people with accounts). It would be helpful to get communication (however limited) along this road (and establishing direct communication, either through radio or landline, is not feasible within the budget constraints I have), and it is possible to store a complete copy of the mail spool to a small box at each station (the total mail spool over the period I care about is in the tens of megs). There are trams shuttling back and forth along this road (stopping at each station), and adding a small box (such as a weatherproofed Raspberry Pi with a wifi dongle) to transport files up and down the road is pretty simple. Doing incremental copies of the mail spool is also simple, keeping track of files that get moved or deleted is a bit harder (but still not that bad), but I have no idea how hard it is to track what messages have been seen, especially for the shared folders (which we use instead of mailing lists). I realize this is not a "normal" use of Dovecot, but given this, does anyone who knows the software (and how it keeps track of messages) better have suggestions on how to approach the problem?
On 28.11.2013, at 5.17, David Bishop <dovecot at dpe.lusars.net> wrote:> Is there a way to get a running transaction log from a Dovecot instance to > synchronize (and I use that word very, very loosely) multiple instances > that don't share a network?dsync replication was designed in a way that would allow transferring the state over e.g. USB sticks, although it?s missing some code to make it actually possible.> There are trams shuttling back and forth along this road (stopping at each > station), and adding a small box (such as a weatherproofed Raspberry Pi > with a wifi dongle) to transport files up and down the road is pretty > simple.But if you do it this way and you can keep a full copy of the shared mail storage on your Raspberry, that would be possible already with dsync I think. dsync supports quick incremental updates by keeping track of the previous state between the servers. This state is saved in a file, so you could keep a different state for each different dsynced server.
D'oh. Replied to Timo instead of to the list. Apologies! On Thu, Nov 28, 2013 at 1:07 PM, David Bishop <dovecot at dpe.lusars.net>wrote:> On Thu, Nov 28, 2013 at 1:02 AM, Timo Sirainen <tss at iki.fi> wrote: > >> On 28.11.2013, at 5.17, David Bishop <dovecot at dpe.lusars.net> wrote: >> >> > There are trams shuttling back and forth along this road (stopping at >> each >> > station), and adding a small box (such as a weatherproofed Raspberry Pi >> > with a wifi dongle) to transport files up and down the road is pretty >> > simple. >> >> But if you do it this way and you can keep a full copy of the shared mail >> storage on your Raspberry, that would be possible already with dsync I >> think. dsync supports quick incremental updates by keeping track of the >> previous state between the servers. This state is saved in a file, so you >> could keep a different state for each different dsynced server. >> > > Bravo for a solution that doesn't require a code change and doesn't seem > to require directly touching the spools! :) > > Reading the man page, it looks like only mirroring for people who happen > to be checking email at a given place (as well as people who have received > mail and the shared mailboxes) seems like a pretty simple thing to do. > Hurrah! > > Thank you, this is wonderful. > > And more questions... > > If I'm running a virtual mail domain, the user/pass I give is for the > virtual mail user, correct? And, in a virtual mail setup, do I specify > "username" or "username at domain"? > > Is there a window beyond which synchronization becomes more difficult? For > instance, if messages (or metadata updates, like "I deleted this message") > get parked overnight without updating, and in the morning (9 hours later), > the trams (one at a time) pull into range of wifi, there won't be > confusion, right? > >
David Bishop <dovecot at dpe.lusars.net> writes:> Is there a way to get a running transaction log from a Dovecot instance to > synchronize (and I use that word very, very loosely) multiple instances > that don't share a network?I think what you want is not synchronize the state of one mail server across multiple computers, but have mail transport from one system to another via sneakernet. In other words, you want UUCP. It might be ancient, but it should do exactly what you want. In short, you'd configure your MTA to deliver mails to your sneakernet via pipe to uucico (not sure if I got the command 100% right), and configure your individual boxes to push and pull mail using uusomething whenever your moving Raspberry comes in range. Hope that helps, Nikolaus -- Encrypted emails preferred. PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C ?Time flies like an arrow, fruit flies like a Banana.?