Re: [Dovecot] mbox folders on-disc layout

2012-04-20 Thread John Robinson

On 18/04/2012 17:45, Timo Sirainen wrote:

On 18.4.2012, at 14.36, John Robinson wrote:


I'd like to change the on-disk layout for my mboxes from being
  ~/mail/foo/bar
to
  ~/mail/foo.bar
so that I can have folders containing both messages and subfolders, without 
having subfolders beginning with . and then having to do all the other fiddling 
with locations of index files etc. that goes along with LAYOUT=maildir++, and 
also leaving the filesystem layout looking sensible so my users see their 
mailboxes instead of the index and control files.

Is this possible or do I need to patch something?


Not possible without patching. There's also the other possibility of doing 
something like:

# Trick mbox configuration which allows a mail folder which contains both
# messages and sub-folders
mail_location = 
mbox:~/mail/mailboxes:DIRNAME=mBoX-MeSsAgEs:INDEX=~/mail/index:CONTROL=~/mail/control

from http://wiki2.dovecot.org/MboxChildFolders


Yes, I read all that, and thought all the options were pretty ugly - and 
the comment that it's a trick configuration would seem to suggest that 
the original author thought so to. And I think Maildir++ is pretty ugly 
too. If I wanted to try writing a new LAYOUT, where should I begin?


Cheers,

John.


Re: [Dovecot] mbox folders on-disc layout

2012-04-20 Thread Timo Sirainen
On 20.4.2012, at 12.01, John Robinson wrote:

 Yes, I read all that, and thought all the options were pretty ugly - and the 
 comment that it's a trick configuration would seem to suggest that the 
 original author thought so to. And I think Maildir++ is pretty ugly too. If I 
 wanted to try writing a new LAYOUT, where should I begin?

src/lib-storage/mailbox-list-private.h has the API you need to implement
src/lib-storage/list/mailbox-list-fs* is the fs implementation
src/lib-storage/list/mailbox-list-maildir* is the maildir++ implementation

So decide which one looks more like the one you want, and either copypaste it 
or start extending it. For example imapdir is nearly the same implementation 
as maildir++ but almost all of the code is shared.



[Dovecot] mbox folders on-disc layout

2012-04-18 Thread John Robinson

I'd like to change the on-disk layout for my mboxes from being
  ~/mail/foo/bar
to
  ~/mail/foo.bar
so that I can have folders containing both messages and subfolders, 
without having subfolders beginning with . and then having to do all the 
other fiddling with locations of index files etc. that goes along with 
LAYOUT=maildir++, and also leaving the filesystem layout looking 
sensible so my users see their mailboxes instead of the index and 
control files.


Is this possible or do I need to patch something?

(CentOS 6, dovecot 2.0.9)

Cheers,

John.



Re: [Dovecot] mbox folders on-disc layout

2012-04-18 Thread Timo Sirainen
On 18.4.2012, at 14.36, John Robinson wrote:

 I'd like to change the on-disk layout for my mboxes from being
  ~/mail/foo/bar
 to
  ~/mail/foo.bar
 so that I can have folders containing both messages and subfolders, without 
 having subfolders beginning with . and then having to do all the other 
 fiddling with locations of index files etc. that goes along with 
 LAYOUT=maildir++, and also leaving the filesystem layout looking sensible so 
 my users see their mailboxes instead of the index and control files.
 
 Is this possible or do I need to patch something?

Not possible without patching. There's also the other possibility of doing 
something like:

# Trick mbox configuration which allows a mail folder which contains both
# messages and sub-folders
mail_location = 
mbox:~/mail/mailboxes:DIRNAME=mBoX-MeSsAgEs:INDEX=~/mail/index:CONTROL=~/mail/control

from http://wiki2.dovecot.org/MboxChildFolders