[Dovecot] mail_chroot: no variables support?
Hello dovecot,
It seems, that mail_chroot setting can't use variables. I try to set it to `%h' and it deosn't work :( Are here any security considerations, or it is bug?
-- Best regards, Lev mailto:lev@serebryakov.spb.ru
On Sat, 2006-11-11 at 11:24 +0300, Lev Serebryakov wrote:
Hello dovecot,
It seems, that mail_chroot setting can't use variables. I try to set it to `%h' and it deosn't work :( Are here any security considerations, or it is bug?
I'll add in my TODO, but if your userdb isn't passwd, you could do it there as well.
Hello Timo,
Sunday, November 12, 2006, 2:37:35 PM, you wrote:
TS> I'll add in my TODO, but if your userdb isn't passwd, you could do it TS> there as well. Yep, my userdb is SQL, so I found workaround already. IMHO, documentation should mention, that maildir and home will be calcualted relative to new root, if chroot is set! I've found this experementally, but it is not evident, IMHO. Oh... And it is good question: if home is relative to chroot, and chroot is %h... Hmm... Will it work at all?!
-- Best regards, Lev mailto:lev@serebryakov.spb.ru
On Sun, 2006-11-12 at 21:08 +0300, Lev Serebryakov wrote:
Hello Timo,
Sunday, November 12, 2006, 2:37:35 PM, you wrote:
TS> I'll add in my TODO, but if your userdb isn't passwd, you could do it TS> there as well. Yep, my userdb is SQL, so I found workaround already. IMHO, documentation should mention, that maildir and home will be calcualted relative to new root, if chroot is set! I've found this experementally, but it is not evident, IMHO. Oh... And it is good question: if home is relative to chroot, and chroot is %h... Hmm... Will it work at all?!
They're not really relative to anything, and you should only use absolute paths everywhere. It's just that chroot is set first before the other paths are used, so they have a new root directory.
You actually can't really use %h for chroot. Otherwise you'll end up having your home directory in /home/user/home/user. If you want to chroot to home, you should return chroot=/home/%u and home=/.
participants (2)
-
Lev Serebryakov
-
Timo Sirainen