[Dovecot] Maildir configuration vs ZFS and snapshots...

Mike Brudenell pmb1 at york.ac.uk
Wed Jul 4 17:01:42 EEST 2007


Greetings -

On 4 Jul 2007, at 11:21, Peter Eriksson wrote:

> 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
>   }

I've just been trying something like this and it does indeed work.   
(What I was after was a way of not having to list each nightly.0,  
nightly.1, etc separately, and instead be able to navigate down to  
them: akin to your comments about the design of Maildir not being  
convenient in this respect.)


> etc... You won't see the INBOX either (like me) unless you create the
> symlink suggested (.INBOX -> .) before taking the snapshots.

This is indeed the case.  One downside is that our mail clients then  
see THREE inboxes :-( ... one is the account's real inbox, one the  
symlink, and the third is the one in Outlook's "Outlook Today"  
section of the list.  (I hate the way this is always shown expanded  
but the IMAP section shown collapsed: the number of people we get who  
click on the Outlook Today inbox thinking it's the one on the IMAP  
servers. :-(


> 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...

My testing has shown up a couple of problems...

1)  My mail client (Apple's "Mail") does indeed walk through the  
snapshot hierarchy which, unfortunately leads to:
   * Mail duplicating its local cache of all the messages on my Mac's  
hard disk, and
   * Dovecot creating index files for all the mailboxes in the snapshot.

The former takes time and disk space; the latter effectively doubles  
the space used by someone's index files when you add a snapshot.  And  
of course if you have more than one snapshot namespace each has it's  
own set of index files.

2)  Dovecot logs lots of error messages as my mail client traverses  
the folders in the snapshot.  This is because it is trying to use  
utime() to update the timestamp of the directory in a read-only  
filestore.


>> 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...

It looks like the CONTROL and INDEX settings for the snapshot  
shouldn't use the same setting as is used by the live mailboxes.  I  
took the precaution of pointing them at a directory called SNAPSHOT  
hanging off the normal INDEX storage location and found that  
immediately below it I got a set of Maildirs for the folders in the  
snapshot.

Thus if I had pointed the INDEX setting for the snapshot at the same  
storage location as for the live folders I think I'd have had two  
different sets of folders -- the live and its equivalent in the  
snapshot -- sharing the same index file.  If so I suspect the results  
would not have been good!  (The same goes for CONTROL files, of course.)


Cheers,
Mike B-)

-- 
The Computing Service, University of York, Heslington, York Yo10 5DD, UK
Tel:+44-1904-433811  FAX:+44-1904-433740

* Unsolicited commercial e-mail is NOT welcome at this e-mail address. *




More information about the dovecot mailing list