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

Gary Duncan gduncan at engr.UVic.CA
Thu May 19 03:45:33 EEST 2011


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
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.

It does this even though home is properly overridden within.
I suspect this is part of changing to invoke as the user
as the *-login process are ok but then they are still running as dovecot.
Various recent attempts to explicitly respecify HOME for mail_executable
via a wrapper script or using env have been to no avail
(as seen below).

How can I resolve?
And no I don't just want to override /home at the system level.
Thanks
	-- Gary

# 1.0.9: /etc/dovecot.conf
base_dir: /var/run/dovecot/
syslog_facility: local1
protocols: imap imaps pop3 pop3s
listen(default): *:143
listen(imap): *:143
listen(pop3): *:110
ssl_listen(default): *:993
ssl_listen(imap): *:993
ssl_listen(pop3): *:995
ssl_ca_file: /etc/ssl/certs/gd_bundle.crt
ssl_cert_file: /etc/ssl/certs/engr.uvic.ca.crt
ssl_key_file: /etc/ssl/private/engineeringwildcard.key
ssl_parameters_regenerate: 24
disable_plaintext_auth: no
login_dir: /var/run/dovecot/login
login_executable(default): /usr/libexec/dovecot/imap-login
login_executable(imap): /usr/libexec/dovecot/imap-login
login_executable(pop3): /usr/libexec/dovecot/pop3-login
login_log_format_elements: %u [%r] %c
login_process_size: 32
login_processes_count: 8
login_max_processes_count: 150
verbose_proctitle: yes
first_valid_uid: 100
default_mail_env: mbox:/mail/home/%u/mail/:INBOX=/mail/boxes/%u:INDEX=/mail/indexes/%u
mail_location: mbox:/mail/home/%u/mail/:INBOX=/mail/boxes/%u:INDEX=/mail/indexes/%u
mbox_read_locks: fcntl dotlock
mbox_write_locks: fcntl dotlock
mail_executable(default): /bin/env 'HOME=/mail/home/$USER' /usr/libexec/dovecot/imap
mail_executable(imap): /bin/env 'HOME=/mail/home/$USER' /usr/libexec/dovecot/imap
mail_executable(pop3): /usr/libexec/dovecot/pop3-home
mail_plugin_dir(default): /usr/lib/dovecot/imap
mail_plugin_dir(imap): /usr/lib/dovecot/imap
mail_plugin_dir(pop3): /usr/lib/dovecot/pop3
imap_client_workarounds(default): delay-newmail outlook-idle netscape-eoh tb-extra-mailbox-sep
imap_client_workarounds(imap): delay-newmail outlook-idle netscape-eoh tb-extra-mailbox-sep
imap_client_workarounds(pop3): outlook-idle
pop3_uidl_format(default): 
pop3_uidl_format(imap): 
pop3_uidl_format(pop3): %v.%u
pop3_client_workarounds(default): 
pop3_client_workarounds(imap): 
pop3_client_workarounds(pop3): oe-ns-eoh outlook-no-nuls
auth default:
  passdb:
    driver: pam
  userdb:
    driver: passwd
    args: home=/mail/home/%u
plugin:
  home: /mail/home/%u


More information about the dovecot mailing list