sdbox and IMAP folders

Jeff Larsen jlar310 at gmail.com
Mon Dec 8 17:11:50 UTC 2014


We have just migrated from cyrus-imap to dovecot 2.2.9 on Ubuntu. By
default, all our user's manually created folders appear at the same
folder level as INBOX (i.e., they are next to INBOX, and not inside
INBOX in a typical tree view of the folders).

But on Dovecot, users are able to create new folders either parallel
to INBOX or as subfolders within INBOX, which I think is going to lead
to confusion for our users, especially when working from the limited
UI of a smartphone client where folder hierarchy is not as easy to
visualize.

With cyrus, this behavior depended on the client setting for "IMAP
server directory" as it is called in Thunderbird. If the setting was
given the value "INBOX", then all folders were parallel to INBOX and
you could not create any folder that would appear in the tree inside
INBOX. With the setting empty, then all folders appeared as subfolders
of INBOX. It was all or nothing.

When the mail accounts were migrated to dovecot, the existing
top-level user folders were created in dovecot at the same level as
INBOX. We did nothing intentional to get this result. We just used
cyrus2dovecot to export to maildir, then doveadm sync to convert to
the final sdbox.

With dovecot, when "IMAP server directory" is empty, we get the
original folder tree with all folders parallel to inbox, but users are
also able to create subfolders inside INBOX . We are using sdbox
storage and the folder heirarchy as seen in the client tree (parallel
folders and subfolders) is also reflected in the server's local file
system.

If we change the "IMAP server directory" setting on the client while
using dovecot, then all the folders that were previously at the same
level as INBOX become inaccessible, so that's not a viable option.

So, my question is this: Can I replicate the cyrus behavior where
INBOX subfolders are an all-or-nothing option? Or are we stuck with
users (having questionable file management skills in the first place)
getting lost between INBOX subfolders and top-level folders.

Thanks,

Jeff

root:~# doveconf -n
# 2.2.9: /etc/dovecot/dovecot.conf
# OS: Linux 3.13.0-40-generic x86_64 Ubuntu 14.04.1 LTS
auth_mechanisms = plain login
auth_verbose = yes
listen = *
mail_location = sdbox:%h:LAYOUT=fs:ALT=/var/alt-vmail/%n
mail_plugins = " quota"
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 {
    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 = /etc/dovecot/dovecot-ldap.conf.ext
  driver = ldap
}
plugin {
  quota = dict:%n::file:%h/dovecot-quota
  quota_grace = 10%%
  quota_rule = *:storage=100M
  quota_rule2 = Trash:storage=+20M
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/sieve
}
protocols = " imap sieve"
service auth {
  unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0666
    user = postfix
  }
  unix_listener auth-userdb {
    mode = 0666
  }
}
service imap-login {
  inet_listener imap {
    address = localhost
    port = 143
  }
  inet_listener imaps {
    port = 0
  }
}
service managesieve-login {
  inet_listener sieve {
    address = localhost
    port = 4190
  }
}
ssl = required
ssl_cert = </etc/ssl/certs/mail.XXXX.com.crt
ssl_key = </etc/ssl/private/mail.XXXX.com.key
userdb {
  args = username_format=%n /etc/dovecot/qec-quota-override
  default_fields = uid=vmail gid=vmail home=/var/vmail/%n
  driver = passwd-file
}
userdb {
  args = /etc/dovecot/dovecot-ldap.conf.ext
  default_fields = uid=vmail gid=vmail home=/var/vmail/%n
  driver = ldap
}
protocol lda {
  mail_plugins = " quota sieve"
}
protocol imap {
  mail_plugins = " quota imap_quota"
}


More information about the dovecot mailing list