Maildir in Subversion
kbloom at gmail.com
Sun Aug 13 05:38:47 CEST 2006
On Saturday 12 August 2006 14:59, Joerg Lange wrote:
> I am wondering if it makes sense to store emails in a Maildir in a
> versioned repository.
> I had my personal data in a CVS repository for years now, last month
> I changed to SVN. I use Windows mostly, Linux only rarely. However, I
> have set up Courier IMAP on a server and I am thinking about moving
> my email archives from Outlook PST files to that IMAP account and
> have a cron job on the server do a "svn add" periodically.
Adding files to the mailbox isn't the only file operation that a mail
client has to do to a Maildir. There are several others:
* various flags (including whether a message has been read) are stored
in a filename, so the filename for a message *will* change.
See http://cr.yp.to/proto/maildir.html for more information about the
* files get moved between directories (from new to cur) when the mail
client sees them for the first time.
* you might delete mail.
It's going to be incrediby difficult or impossible to keep svn
synchronized with the changes your mail client or IMAP server will make
to the contents of the maildir.
(Btw, the third bullet point is also an argument against storing MH
mailboxes in a version control system)
Arguably these are less problematic in your setup (which is just
archiving) than in a setup with delivery and active reading, but why
wouldn't you just use mbox format? Obviously you'll answer, "because
that's all that courier supports." So I'll ask: is Courier IMAP
essential, or can you switch to a different IMAP server, such as
dovecot which supports both mbox and maildir?
With mbox, you only need to deal with svn when you add/remove *folders*
(not individual messages), which will be a lot less common, even on a
setup with active delivery.
An interesting side point: in my setup, I don't version or synchronize
my mail at all. Anything mail related is handled over SSH to my server.
I back up using
$ mkisofs -root backup-$VERSION -old-root backup-$OLDVERSION
so mkisofs takes care of only backing up the files that have changed.
(The ones that haven't changed it essentially hard-links in from
elsewhere on the CD, although it's not exactly hard-linking because the
two files don't have the same inode)
Seeing as how I use Maildir, this works great. It would work horriby for
incremental backups of mbox though.
(This also works great for backing up an FSFS repository).
Ken Bloom. PhD candidate. Linguistic Cognition Laboratory.
Department of Computer Science. Illinois Institute of Technology.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
More information about the vcs-home