[Dovecot] Replication and LAYOUT=fs

Simon Fraser srf at sanger.ac.uk
Thu Jun 13 12:41:43 EEST 2013

On Thu, 2013-06-13 at 04:59 +0300, Timo Sirainen wrote:
> On Wed, 2013-06-12 at 11:39 +0100, Simon Fraser wrote:
> > Hello folks,
> > 
> > I have a problem with replication and mail_location with LAYOUT=fs set.
> > 
> > If I set "mail_location = maildir:~/mail" (leaving out the :LAYOUT=fs),
> > create and populate some mailboxes and subfolders, they all get
> > replicated. If I start with a clean mail spool and LAYOUT=fs, I can
> > create some new mailboxes and subfolders but only the inbox is
> > replicated. Subfolders are ignored.
> I can't think of how that's possible, unless you have different
> mail_location settings in different places (e.g. doveadm sees something
> different than imap). Does "doveadm mailbox list -u user at domain" work
> with LAYOUT=fs?

Good question: no, it doesn't. I only have one mail_location setting,
though, which is global rather than in a scoped area.

# doveadm mailbox list -u testuser at sanger.ac.uk
# find /mail/spool/testuser/mail/ -type d

I asked Thunderbird to create 'test1' as a subfolder of 'INBOX'. I've
tested some more with folders on the same level as inbox, and those
work, including their subfolders.

So it must be the non-folder 'INBOX' that isn't replicated: without
LAYOUT=fs it's represented as ".INBOX.test1", which has all the relevant
folder entries in it. Presumably it skips a directory and its
subdirectories if it doesn't contain this data? 

I found the following option, which moves INBOX and so makes it all
mail_location = maildir:~/mail:LAYOUT=fs:INBOX=~/mail/INBOX

Is this a relatively sane thing to do?

Thank you for your help,

 The Wellcome Trust Sanger Institute is operated by Genome Research 
 Limited, a charity registered in England with number 1021457 and a 
 company registered in England with number 2742969, whose registered 
 office is 215 Euston Road, London, NW1 2BE. 

More information about the dovecot mailing list