namespace private {
separator = /
prefix = snapshot/
location =
maildir:~/.zfs/snapshot/2007-06-18/Maildir:CONTROL=~/.dovecot/control:INDEX=~/.dovecot/index
}
...
We are switching from the UW IMAP server with local disks to Dovecot
using a NetApp filer. The filer provides snapshots too, although with a
slightly different layout as the ".snapshot" directory appears in each
and every directory with its files and folders. For example:
~/Maildir/.snapshot/nightly.0/...
~/Maildir/.snapshot/nightly.1/...
~/Maildir/.snapshot/nightly.2/...
etc
where the ".0" suffixed directory is the most recent etc.
Uh.. I'n your case I think it would be quite easy. I think this should work:
namespace private {
separator = /
prefix = snapshot-0/
location =
maildir:~/Maildir/.snapshot/nightly.0:CONTROL=~/.dovecot/control:INDEX=~/.dovecot/index
}
namespace private {
separator = /
prefix = snapshot-1/
location =
maildir:~/Maildir/.snapshot/nightly.1:CONTROL=~/.dovecot/control:INDEX=~/.dovecot/index
}
etc... You won't see the INBOX either (like me) unless you create the
symlink suggested (.INBOX -> .) before taking the snapshots.
I think I tried setting up hierarchical namespaces but it didn't work
(I would have liked to see snapshot/0, snapshot/1 etc).
In your example your snapshots seem to be in directories named after a
specific date (when the snapshot was taken?). I was wondering if you
had some clever way of providing access to these; in your example above
you hard-code the names into the Dovecot configuration file, which
doesn't seem practical for a live system?
In ZFS you can name your snapshots anything you like, it's just a tag
that you select when you create it like this:
zfs snapshot -r andromeda/[EMAIL PROTECTED]
(-r = take snapshot of all the subfilesystems too. Each user has their
own filesystem here).
In a real live situation I'd probably name them "yesterday" "last-week"
or something more suitable for the hardcoding in the dovecot.conf file.
Our I'd look at creating some kind of dynamic internal namespaces
(requires hacking of Dovecot :-).
I'd really like to be able to present all the available snapshots over
IMAP if possible. However, I'm a bit worried though that the mail client
will walk thru all the mailboxes in all the snapshots when accessing the
server though...
Basically I'm trying to mimic your setup and was wondering if you had
already solved the problem of getting down from your "snapshot"
directory through the intermediate level to the Maildir itself.
In passing, would I need to use a separate CONTROL and INDEX storage
area for these, or will the files for the snapshot folders live happily
alongside those for the live area? (I'm not too sure how the
organisation of these storage areas works when namespaces and prefixes
are concerned!)
You need to point the CONTROL and INDEX storage things outside of the
readonly snapshots or Dovecot will complain when it wants to update the
indexes...
- Peter