OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Subject: Re: [OT] synchronizing mbox between 2 machines
From: Bennett Todd (betrahul.net)
Date: Tue Mar 21 2000 - 10:00:00 CST


This problem can be pretty tricky, if you decide to make it so.

"Synchronizing" is a word with some special connotations these days.
If you came up with a real synch solution, new email could be
added to either box and would be replicated across, messages could
be modified on either side and the modifications would propogate,
messages could be deleted on either side and the deletions would
propogate. That's synch as understood by e.g. pocket computer users.

Perhaps the problem you have doesn't deserve that comprehensive a
solution, in which case perhaps something simpler would suffice.

Sounds like you're thinking in terms of simple one-way replication,
where e.g. deletions on the external box wouldn't propogate back
in; if someone logged to the external host while on the road,
read and deleted some email, it'd never go away from the ISDN
server, and would just re-appear on the external host on the next
replication. If this is acceptable to you then something based on
rsync may be a good choice. Rsync can do OK with mboxes, the rsync
distributed-comparison algorithm will do some good, but it'll have a
much easier job if you went to Maildirs.

The permissions problem is wicked, though; if you don't want to give
your replication or synch process root privs on both sides, then you
will have to hope that both email systems are setup to allow a
"mail" admin account to have read/write privs on mailboxes. Or else
run a separate synch for each user, as that user, and ensure that
the user's accounts have free access from the ISDN host to the
external host with no password required. ssh can be helpful for
setting these things up.

Possibly the most thorough and complete solution would be to (a) set
up ssh access for all your users (since you don't want to propogate
root privs); (b) rig 'em to all use Maildirs; and (c) set up
Unison[1] to provide bidirectional synching of those Maildirs
between the two hosts.

-Bennett

[1] <URL:http://www.cis.upenn.edu/~bcpierce/unison/>


  • application/pgp-signature attachment: stored