Hi,

I have the following hier for chrooting local users:
/var/mail/.u336084
/var/mail/.u336084/bin
/var/mail/.u336084/dev
[cut here]
/var/mail/.u336084/proc
/var/mail/.u336084/var/
[cut here]
/var/mail/.u336084/var/mail/
/var/mail/.u336084/var/mail/u336084
/var/mail/.u336084/var/mail/u336084/Mail
/var/mail/.u336084/Mail -> var/mail/u336084/Mail (symlink)

passwd file:
u336084:x:1340334:255::/var/mail/.u336084:/bin/bash

Chroot works fine, for SSH, FTP and etc, for example:
# chroot /var/mail/.u336084 /bin/bash

Given the current hierarchy, is it possible to tell the dovecot to do the same chroot?

I found strange behavior that users cannot delete IMAP-folders:
[pid 25055] stat("/var/mail/.u336084/Mail/.www1", {st_mode=S_IFDIR|0700, st_size=167, ...}) = 0
[pid 25055] stat("/var/mail/.u336084/Mail/.Trash.www1", 0x7ffeddc3d5c0) = -1 ENOENT (No such file or directory)
[pid 25055] stat("/var/mail/.u336084/Mail/.Trash", {st_mode=S_IFDIR|0777, st_size=198, ...}) = 0
[pid 25055] fcntl(16, F_SETLK, {l_type=F_UNLCK, l_whence=SEEK_SET, l_start=0, l_len=0}) = 0
[pid 25055] fcntl(16, F_SETLK, {l_type=F_WRLCK, l_whence=SEEK_SET, l_start=0, l_len=0}) = 0
[pid 25055] fstat(16, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
[pid 25055] stat("/var/mail/.u336084/Mail/mailboxes.lock", {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
[pid 25055] unlink("/var/mail/.u336084/Mail/mailboxes.lock") = 0
[pid 25055] close(16)                   = 0
[pid 25055] write(7, "96 NO [CANNOT] Renaming not supported across conflicting directory permissions (0.002 + 0.000 + 0.001 secs).\r\n", 110) = 110
[pid 25055] epoll_wait(11, [{EPOLLIN, {u32=1794732256, u64=94916277006560}}], 7, 1800000) = 1

Btw I don't see any conflicting dirs:
root@:/var/mail/u336084# ls -ld /var/mail/.u336084/Mail/.www1
drwx------ 5 u336084 virtmail 167 Jun 27 13:26 /var/mail/.u336084/Mail/.www1
root@:/var/mail/u336084# ls -ld /var/mail/.u336084/Mail
lrwxrwxrwx 1 u336084 virtmail 26 Apr 28 21:43 /var/mail/.u336084/Mail -> var/mail/u336084/Mail
root@:/var/mail/u336084# ls -ld Mail
drwx------ 16 u336084 virtmail 4096 Jun 30 01:25 Mail

All folders have right owner u336084. With this configuration Courier worked properly, I noteced the problem after migration to Dovecot.

Thanks in advance.