Hierarchy separator and LAYOUT=FS change

Simeon Ott simeon.ott at onnet.ch
Tue Oct 25 05:14:58 UTC 2016


Anyone?

What are the steps to take to migrate from dot-to slash-separator with LAYOUT=fs?

> On 11.10.2016, at 00:06, Simeon Ott <simeon.ott at onnet.ch> wrote:
> 
> Hello,
> 
> I stumbled across a 5-year-old post on the dovecot list about changing the dovecot hierarchy separator to enable shared mailboxes (http://www.dovecot.org/list/dovecot/2011-January/056201.html <http://www.dovecot.org/list/dovecot/2011-January/056201.html>).
> At the moment I’m stuck in a pretty similar situation. Migrated from courier to dovecot 2 years ago and preserved the dot-separator. 
> Because I’m using the e-mail adress as a username, the dots for folder separation and the dots in the email adresses getting messed up -
> 
> I do have a pretty small mailserver with about 150 accounts. The Maildir filestructur of a typical mail account looks like this:
> drwx------  2 vmail vmail  4096 Oct 10 20:02 cur
> drwx------  5 vmail vmail  4096 Oct  3 07:48 .Daten.Administration
> drwx------  5 vmail vmail  4096 Oct  3 09:51 .Daten.Anfragen, Werbung
> drwx------  5 vmail vmail  4096 Oct  3 08:02 .Daten
> drwx------  5 vmail vmail  4096 Oct  6 09:57 .Daten.Intern
> drwx------  5 vmail vmail  4096 Oct  3 08:03 .Daten.Intern.Fahrzeuge
> drwx------  5 vmail vmail  4096 Oct  6 12:57 .Daten.Intern.Infos, FileMaker etc
> drwx------  5 vmail vmail  4096 Oct  3 09:19 .Daten.Intern.Sonstiges
> drwx------  5 vmail vmail  4096 Oct  3 07:47 .Daten.Kunden
> drwx------  5 vmail vmail  4096 Sep 16 08:29 .Daten.Lieferanten
> drwx------  5 vmail vmail  4096 Oct  3 08:28 .Daten.Marketing
> drwx------  2 vmail vmail  4096 Oct 10 20:02 new
> drwx------  5 vmail vmail  4096 Oct 10 18:00 .Sent
> drwx------  5 vmail vmail  4096 Oct 10 18:00 .Spam
> drwx------  5 vmail vmail  4096 Oct 10 18:00 .Trash
> 
> When changing the separator in my inbox namespace the documentation mentions that the filestructur doesn’t change. This means I will get the same problems when using shared boxes with email adresses as usernames. I definitly need to change to maildir:~/Maildir:LAYOUT=fs
> When changing to LAYOUT=fs i need to convert all the mailboxes manually, is that correct? Is dsync is the way to go? 
> Or is it better to leave the separator and change to a different username schema (without dots in it) and advise the clients to change their credentials? 
> 
> I know there are people out there who successfully converted this - but I can’f find that many information about this subject.
> 
> doveconf -n:
> # 2.1.7: /etc/dovecot/dovecot.conf
> # OS: Linux 3.2.0-4-amd64 x86_64 Debian 7.11 
> auth_mechanisms = plain login
> auth_verbose = yes
> lda_mailbox_autocreate = yes
> lda_mailbox_autosubscribe = yes
> listen = *
> login_log_format_elements = user=<%u> method=%m rip=%r lip=%l mpid=%e %c
> mail_gid = 5000
> mail_location = maildir:~/Maildir
> mail_plugins = zlib quota acl
> mail_uid = 5000
> managesieve_notify_capability = mailto
> managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date ihave
> namespace inbox {
>   inbox = yes
>   location = 
>   mailbox Drafts {
>     auto = subscribe
>     special_use = \Drafts
>   }
>   mailbox Sent {
>     auto = subscribe
>     special_use = \Sent
>   }
>   mailbox "Sent Messages" {
>     special_use = \Sent
>   }
>   mailbox Spam {
>     auto = subscribe
>     special_use = \Junk
>   }
>   mailbox Trash {
>     auto = subscribe
>     special_use = \Trash
>   }
>   prefix = INBOX.
>   separator = .
> }
> passdb {
>   args = /etc/dovecot/dovecot-ldap.conf
>   driver = ldap
> }
> plugin {
>   acl = vfile
>   acl_shared_dict = file:/var/spool/postfix/virtual/shared-mailboxes
>   quota = maildir:User quota
>   quota_exceeded_message = 4.2.2 Mailbox full
>   quota_rule = *:storage=1G
>   quota_rule2 = INBOX.Trash:storage=+100M
>   quota_rule3 = INBOX.Spam:ignore
>   quota_warning = storage=95%% quota-warning 95 %u
>   sieve = ~/.dovecot.sieve
>   sieve_before = /var/lib/dovecot/sieve/default.sieve
>   sieve_dir = ~/sieve
>   sieve_max_actions = 32
>   sieve_max_redirects = 4
>   sieve_max_script_size = 1M
>   sieve_quota_max_scripts = 0
>   sieve_quota_max_storage = 0
> }
> protocols = " imap lmtp sieve pop3"
> service auth {
>   group = dovecot
>   unix_listener /var/spool/postfix/private/auth {
>     group = postfix
>     mode = 0660
>     user = postfix
>   }
>   unix_listener auth-master {
>     group = vmail
>     mode = 0660
>     user = vmail
>   }
>   user = dovecot
> }
> service lmtp {
>   unix_listener lmtp {
>     mode = 0666
>   }
> }
> service managesieve-login {
>   inet_listener sieve {
>     port = 4190
>   }
>   inet_listener sieve_deprecated {
>     port = 2000
>   }
>   process_min_avail = 1
>   service_count = 1
>   vsz_limit = 64 M
> }
> ssl_cert = </etc/ssl/private/startssl-onnet.ch <http://startssl-onnet.ch/>-chain.crt
> ssl_cipher_list = ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA:AES256-SHA:DHE-RSA-CAMELLIA128-SHA:DHE-RSA-CAMELLIA256-SHA:CAMELLIA128-SHA:CAMELLIA256-SHA:ECDHE-RSA-DES-CBC3-SHA:DES-CBC3-SHA:!SSLv2
> ssl_key = </etc/ssl/private/startssl-onnet.ch.key
> userdb {
>   args = /etc/dovecot/dovecot-ldap.conf
>   driver = ldap
> }
> protocol lmtp {
>   mail_plugins = zlib quota acl sieve
> }
> protocol lda {
>   auth_socket_path = /var/run/dovecot/auth-master
>   deliver_log_format = msgid=%m: %$
>   mail_plugins = zlib quota acl sieve
>   postmaster_address = postmaster at onnet.ch <mailto:postmaster at onnet.ch>
> }
> protocol imap {
>   mail_plugins = zlib quota acl imap_quota imap_acl
> }
> protocol sieve {
>   info_log_path = /var/log/sieve.log
>   log_path = /var/log/sieve.log
>   mail_max_userip_connections = 10
>   managesieve_implementation_string = Dovecot Pigeonhole
>   managesieve_logout_format = bytes=%i/%o
>   managesieve_max_compile_errors = 5
>   managesieve_max_line_length = 65536
> }
> … parts of the ldap config
> user_attrs = homeDirectory=home=/var/spool/postfix/virtual/%$,uidNumber=uid,gidNumber=gid,quota=quota_rule=*:bytes=%$
> user_filter = (&(objectClass=CourierMailAccount)(mail=%u))
> 
> … my shared configuration is currently commented out. 
> # namespace {
> #   type = shared
> #   separator = .
> #   prefix = shared.%%u.
> #   location = maildir:%h/Maildir:INDEX=~/Maildir/shared/%%u
> #   subscriptions = yes
> #   list = children
> #}
> 
> thanks in advance for any help
> 
> Sincerely, 
> Simeon - onnet.ch <http://onnet.ch/>


More information about the dovecot mailing list