Udo Rader wrote:
Michal Soltys wrote:
Timo Sirainen wrote:
http://dovecot.org/releases/1.1/dovecot-1.1.11.tar.gz
http://dovecot.org/releases/1.1/dovecot-1.1.11.tar.gz.sig
- If mail_chroot is set, don't fail at startup in dump-capability.
Now whenever a system user (using passwd passdb/userdb) is trying to
read the mail, it tries to chroot without stripping initial chroot
specific path components, for example:
Feb 8 13:39:10 hargon dovecot: Fatal: chdir(/home/home/test) failed
with uid 2999: No such file or directory
with user 'test' having homedir under /home/test and mail_chroot=/home
but the entire point of chrooting is _changing_ the root directory.
So it seems quite obvious that you need to strip your homedirs yourself.
How else could you otherwise define /home/home/test if you really wanted
to do?
Dovecot is quite flexible in this regard. From the perspective of userdb
- you can set /./ , or /. at the end of user's directory and dovecot
will chroot properly, stripping path before /./ itself.
Or you can return userdb_chroot which can be used with or without /./ -
if it's used without, than you have to setup user directories in userdb
without chroot-part path. With /./ it's the same as above - dovecot will
strip the paths properly itself.
In 1.1rc10, global dovecot.conf's parameter always stripped the paths,
regardless if /./ was or wasn't used (it never was mentioned actually).
I've made some tests now and it seems it has to be used.
Also it's important to use just /. if you chroot at the end of the path.
/./ will confuse dovecot in such case.
Timo - I'll update the wiki page to reflect the current situation, if
the current behavior is assumed proper.