#1080434 exim4-base: exim4 starts before home directories are mounted

Package:
exim4-base
Source:
exim4-base
Description:
support files for all Exim MTA (v4) packages
Submitter:
Peter Chubb
Date:
2024-09-08 12:33:01 UTC
Severity:
normal
#1080434#5
Date:
2024-09-03 21:18:35 UTC
From:
To:
Dear Maintainer,

After a recent apt update and reboot, exim4 started and grabbed a
reference to /home before autofs started making home directories
available.  This meant it could not deliver email.

Autofs map for /home looks like:
* nfs-server:/export/home/&


exim4 needs to look for ~/.forward when delivering email; (and we often end up
delivering into ~/Mail/inbox for each user)


I think exim4's systemd unit file needs something like
After= ... remote-fs.target autofs.service
RequireMountsFor=/home/someuser

to make sure that home directories are available by the time it starts (but
systemd is a bit of a mystery to me)

Package-specific info:
Exim version 4.98 #2 built 11-Jul-2024 05:41:31
Copyright (c) University of Cambridge, 1995 - 2018
(c) The Exim Maintainers and contributors in ACKNOWLEDGMENTS file, 2007 - 2024
Hints DB:
 Berkeley DB: Berkeley DB 5.3.28: (September  9, 2013)
Support for: Content_Scanning crypteq Expand_dlfunc iconv() IPv6 PAM Perl GnuTLS move_frozen_messages TLS_resume DANE DKIM DNSSEC ESMTP_Limits ESMTP_Wellknown Event I18N OCSP PIPECONNECT PRDR PROXY Queue_Ramp SOCKS SPF SRS TCP_Fast_Open
Lookups (built-in): lsearch wildlsearch nwildlsearch iplsearch cdb dbm dbmjz dbmnz dnsdb dsearch ldap ldapdn ldapm mysql nis nis0 passwd pgsql sqlite
Authenticators: cram_md5 cyrus_sasl dovecot external plaintext spa tls
Routers: accept dnslookup ipliteral iplookup manualroute queryprogram redirect
Transports: appendfile/maildir/mailstore/mbx autoreply lmtp pipe smtp
Malware: f-protd f-prot6d drweb fsecure sophie clamd avast sock cmdline
Fixed never_users: 0
Configure owner: 0:0
Size of off_t: 8
Configuration file search path is /etc/exim4/exim4.conf:/var/lib/exim4/config.autogenerated
Configuration file is /var/lib/exim4/config.autogenerated

#1080434#10
Date:
2024-09-08 12:30:06 UTC
From:
To:
[...]

Hello,

Adding remote-fs.target (and nss-user-lookup.target) might be a good idea.

Listing autofs.target does not look right to me. There are multiple
automounters and autofs.target is just one of them. I could add
RequiresMountsFor=/home but not RequireMountsFor=/home/someuser because
we do not have someuser that is present on all Debian systems.

From my POV this looks like somthing I cannot /generically/ carter for
in the exim service file but needs to be set locally by the admin.

cu Andreas