[Dovecot] How to stop mail_executable from cwd to ~home

Joseph Tam jtam.home at gmail.com
Fri May 20 03:32:00 EEST 2011


Gary Duncan <gduncan at engr.UVic.CA> writes:

> In our environment home directories are auto-mounted via /home/<user>
> including on the server provided mail.
> Within the various mail services though we try to isolate
> and override with local /mail/home/<user>
>
> Works well except that dovecot still wants to cd to the real home
> triggering a useless and potentially hindering automount

This becomes really apparent if you have an organization wide-mailing
list, and one delivery to it causes a flurry of automounts.  I similarly
replace per-user mounts with a home mount bundle.

> when it invokes the imap or pop3 process specified by mail_executable,
> ie an lsof of the process shows cwd of /home/<user> and the automounted home.

I see the same behaviour in 2.0.13, which process tracing of imap
shows more clearly (/nfs/user is per user mount, /nfs/home/user
is user home bundle)

 	...
 	4087:   getuid()                                        = 12345 [12345]
 	4087:   chdir("/nfs/test")                              = 0
 	4087:   stat64("/nfs/home/test/mail", 0xFFBFF6C0)       = 0
 	4087:   stat64("/nfs/home/test/mail", 0xFFBFF5A0)       = 0
 	4087:   stat64("/nfs/home/test/mail", 0xFFBFF6C0)       = 0
 	...

This happens fairly early after imap-login forks and execs the imap
process.  I'll see if I can find it after building a debug version,
but I think Timo will beat me to this.

Joseph Tam <jtam.home at gmail.com>


More information about the dovecot mailing list