Re: [Dovecot] dovecot mounts user home dir?
On 29.7.2004, at 11:38, Peter Evans wrote:
TM (offmct@yahoo.com) wrote:
Why does dovecot mount the user home directory whenever the user checks his email (either pop or imap)?
Is there a way to disable this?
Ask the system nicely, its not dovecot per se, its the system doing things when dovecot becomes the user for the duration of the check.
I don't think simply changing user id for process does that. It's more likely because of this code in src/master/mail-process.c:
/* NOTE: if home directory is NFS-mounted, we might not
have access to it as root. Change the effective UID
temporarily to make it work. */
if (reply->uid != master_uid && seteuid(reply->uid) < 0)
i_fatal("seteuid(%s) failed: %m", dec2str(reply->uid));
ret = chdir(full_home_dir);
if (reply->uid != master_uid && seteuid(master_uid) < 0)
i_fatal("seteuid(%s) failed: %m", dec2str(master_uid));
/* If user's home directory doesn't exist and we're not
trying to chroot anywhere, fallback to /tmp as the mails
could be stored elsewhere. */
Dovecot just wants to set current directory to user's home directory as that's the most logical location. I hadn't thought about any automounters.. One way to fix it would be to not use home directories in userdb at all, instead set the "mail" setting in it. Then Dovecot would chdir to /tmp. Another fix would be to just delete the code above and make it always chdir to /tmp. Maybe there should be a setting for this? ..
participants (1)
-
Timo Sirainen