Clients creating folders in root when using shared namespace
Jon Cutting
jon at thefiverivers.co.uk
Mon Nov 21 15:31:58 UTC 2016
We have set up dovecot to use a shared namespace, and it works well.
However, when a client attempts to create a folder in the namespace,
although dovecot responds with permission denied, it still goes on to
create a folder, but in the root of our virtual mailbox folder (more
confusingly, even issuing a LIST command for a non-existent subfolder
creates the folder in the root).
I've checked through the documentation for a misconfiguration but so far
to no avail.
Our steps to reproduce are as follows:
* Create shared namespace (in our case we've used prefix Users/%%u/)
* Share folder from one user to another so that the shared folder
displays in LIST
* Create a folder as a subfolder of the shared folder (i.e. . CREATE
Users/testfolder)
Expected behaviour: permission is denied and no folder is created
Actual behaviour: permission is denied, but folder is created at the
root of our vmail store (in the above example a folder
/mnt/storage/vmail/testfolder would be created)
Thanks,
Jon
Output from doveconf -n
# 2.2.13: /etc/dovecot/dovecot.conf
# OS: Linux 3.16.0-4-amd64 x86_64 Debian 8.6 ext4
mail_location = maildir:/mnt/storage/vmail/%d/%n/Maildir
mail_plugins = " quota zlib acl"
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 Users {
list = children
location =
maildir:/mnt/storage/vmail/%%d/%%n/Maildir:INDEX=/mnt/storage/vmail/%d/%n/sharedindex/%%d/%%n/
prefix = Users/%%u/
separator = /
subscriptions = no
type = shared
}
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 = /
type = private
}
passdb {
args = /etc/dovecot/dovecot-ldap.conf.ext
driver = ldap
}
plugin {
acl = vfile
acl_shared_dict = file:/mnt/storage/vmail/%d/shared-mailboxes.db
quota = maildir:User quota
quota_rule = *:storage=50GB
sieve = /mnt/storage/vmail/%d/%n/.dovecot.sieve
sieve_before = /mnt/storage/vmail/dovecot.sieve
sieve_dir = /mnt/storage/vmail/%d/%n/sieve
zlib_save = gz
zlib_save_level = 6
}
protocols = imap lmtp sieve
service imap-login {
inet_listener imaps {
port = 993
ssl = yes
}
}
service lmtp {
inet_listener lmtp {
address = 0.0.0.0
port = 2003
}
user = vmail
}
service managesieve-login {
inet_listener sieve {
port = 4190
}
service_count = 1
vsz_limit = 64 M
}
ssl = required
ssl_ca = </etc/dovecot/dovecotca.pem
ssl_cert = </etc/dovecot/dovecot.pem
ssl_key = </etc/dovecot/private/dovecot.pem
userdb {
args = uid=5000 gid=5000 home=/mnt/storage/vmail/%d/%n
allow_all_users=yes
driver = static
}
protocol imap {
imap_client_workarounds = tb-extra-mailbox-sep
mail_plugins = " quota zlib acl imap_quota"
}
protocol lmtp {
mail_plugins = " quota zlib acl sieve"
}
More information about the dovecot
mailing list