Claus Fischer <[EMAIL PROTECTED]> wrote on Fri, 13 Oct 2000:
> 1. I'm thinking of using rsync for the mail folders. I'd have to use
>    an mbox since rsync doesn't know about mail spool locking.

How about you use Maildir instead?  It's file-per-message, so rsync
presumably would work better with that, instead of having to compare
file contents and find the differences...

The problems I see with Maildir is:
- message flags changes, if these are reflected in the filenames, then
rsync thinks they are two different files, when they're still the same
message
- message deletion -- can rsync be instructed to look at contents of
directory A and compare it to directory B, and as well as create any
missing files in directory B, also delete any extra files?

In fact solving the delete problem also solves the first problem, since
the old message with old flags will get deleted, and the message with
new flags will get created.

Since Maildir stores new messages in a separate directory from the
old/read messages, you can have different synchronising methods for
each -- that way you won't ever delete messages during a sync from
the "new" dir, only the old/read dir ("cur").


>    Can I somehow run mutt in batch mode to move all mail from
>    /var/spool/username to ~username/mbox before syncing?

Hmm, I suppose it could be doable: create a special .muttrc with
$move set to "yes", and then push something to mark everything as
read, and then exit Mutt -- it will then automatically move every
message from the folder on exit.

But I wouldn't use Mutt for this, I would use some specialised script or
some other tool maybe.  Or better yet, use a Maildir-format INBOX which
would be located somewhere under the home directory, and deliver all
incoming mail there with procmail or maildrop.

> 3. I need to guarantee that mutt isn't running while I do the
>    rsync, otherwise something will be corrupted.

This won't be a problem under Maildir, the same design which eliminates
the need for locking also means this isn't a problem.


Regards,
Mikko
-- 
// Mikko Hänninen, aka. Wizzu  //  [EMAIL PROTECTED]  //  http://www.iki.fi/wiz/
// The Corrs list maintainer  //   net.freak  //   DALnet IRC operator /
// Interests: roleplaying, Linux, the Net, fantasy & scifi, the Corrs /
"Out of my mind.  Back in five minutes."

Reply via email to