[Dovecot] revision control on maildir possible?
skdovecot at smail.inf.fh-brs.de
Thu Feb 18 10:44:08 EET 2010
-----BEGIN PGP SIGNED MESSAGE-----
On Sun, 14 Feb 2010, Markus Beyer wrote:
> I was wondering if it is possible to put a dovecot managed maildir under
> a vcs like system, for example git or bzr. I'd like to have a seamless
> history of all mail going in and out of my mailboxes, so a vcs like
> system seams a good choice for me. I'm not quite sure however if that
> would cause any problems to dovecot and what the best way of handling
> commits would be.
+ avoid to create ".*" files in your Maildir base directory. I don't know
bzr, but IMHO git creates a single .git directory, hence, you should
create the repo at the same level as the Maildir, e.g.:
Subversion won't work, because it creates a .SVN directory in each
versioned directory. They will be misunderstood as mailbox.
+ avoid to version the index files, they are binary anyway.
+ avoid the content of all tmp/ dirs.
+ Maybe: instead of to blacklist files, use a whitelist:
anything in cur/ and new/, subscriptions, maildirfolder, dovecot-uidlist,
dovecot-keywords,& others like .dovecot-shared, .dovecot-acl, sieve/ ...
+ message files are renamed, when their status or keywords / labels / tags
change, either you live with these duplicates or you need to keep track of
the filename changes by looking at the filename stem (up to, but not
including the colon); some VCSs can keep track of filename changes.
The same applies when messages are "seen" and moved from new/ to cur/.
+ when you move/copy messages around, you could track them by their
message id, in order to avoid duplicates.
+ You can use a script to wrap deliver to trigger add/remove for the
Maildir. But I think to schedule the sync would be better.
IMHO, if you want to avoid duplicates, a VCS does not seem to fit. Or you
could delay the checkin for, say, one day, one could argue that then the
messages are read, spooled in the "final" mailbox, tagged a.s.o.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
-----END PGP SIGNATURE-----
More information about the dovecot