[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
test2
test2/test3
Trash
INBOX
# find /mail/spool/testuser/mail/ -type d
/mail/spool/testuser/mail/
/mail/spool/testuser/mail/test2
/mail/spool/testuser/mail/test2/test3
/mail/spool/testuser/mail/test2/test3/cur
/mail/spool/testuser/mail/test2/test3/tmp
/mail/spool/testuser/mail/test2/test3/new
/mail/spool/testuser/mail/test2/cur
/mail/spool/testuser/mail/test2/tmp
/mail/spool/testuser/mail/test2/new
/mail/spool/testuser/mail/Trash
/mail/spool/testuser/mail/Trash/cur
/mail/spool/testuser/mail/Trash/tmp
/mail/spool/testuser/mail/Trash/new
/mail/spool/testuser/mail/cur
/mail/spool/testuser/mail/tmp
/mail/spool/testuser/mail/INBOX
/mail/spool/testuser/mail/INBOX/test1
/mail/spool/testuser/mail/INBOX/test1/cur
/mail/spool/testuser/mail/INBOX/test1/tmp
/mail/spool/testuser/mail/INBOX/test1/new
/mail/spool/testuser/mail/new

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
work:
mail_location = maildir:~/mail:LAYOUT=fs:INBOX=~/mail/INBOX

Is this a relatively sane thing to do?

Thank you for your help,
Simon.



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