[Dovecot] Replication and LAYOUT=fs
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.
The users are all in LDAP, and virtual, hence the generic mail_home format and mail_location being set. The userdb lookup has been told to return no attributes ("user_attrs = "), but I have also tried it with requesting 'home' and specifying a default of /mail/spool/%u in the userdb config.
The service is perfectly functional as far as a mail client is concerned: it can access all the folders and messages it expects on the server that had them added. It's only the replication using LAYOUT=fs that seems to be troublesome.
Here is doveconf -n
for the first of the pair of servers (dcot1a and
dcot1b). The configuration on the other is identical except for the
hostname differences.
Simon
# 2.2.2: /mail/etc/dovecot/dovecot.conf # OS: Linux 3.2.0-27-virtual x86_64 Ubuntu 12.04.2 LTS disable_plaintext_auth = no doveadm_password = secret first_valid_uid = 100 mail_gid = dovecot mail_home = /mail/spool/%u mail_location = maildir:~/mail:LAYOUT=fs mail_plugins = notify replication mail_uid = dovecot namespace inbox { inbox = yes location = mailbox Drafts { special_use = \Drafts } mailbox Junk { special_use = \Junk } mailbox Sent { special_use = \Sent } mailbox "Sent Messages" { special_use = \Sent } mailbox Trash { special_use = \Trash } prefix = separator = / } passdb { args = /mail/etc/dovecot/dovecot-ldap.conf.ext driver = ldap } plugin { mail_replica = tcp:dcot1b:12345 } protocols = imap lmtp service aggregator { fifo_listener replication-notify-fifo { mode = 0600 user = dovecot } unix_listener replication-notify { mode = 0600 user = dovecot } } service config { unix_listener config { user = dovecot } } service doveadm { inet_listener { port = 12345 } user = dovecot } service replicator { process_min_avail = 1 } shutdown_clients = no ssl_cert = </etc/ssl/certs/dcot1a-cert.pem ssl_key = </etc/ssl/private/dcot1a-key.pem userdb { args = /mail/etc/dovecot/dovecot-ldap.userdb.conf.ext driver = ldap }
-- 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.
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@domain" work with LAYOUT=fs?
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@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@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.
participants (2)
-
Simon Fraser
-
Timo Sirainen