Package: exim4-base Version: 4.96-4 Severity: normal Dear Maintainer,
Since several months now I noticed that exim4.service fails to start at boot when I am at work. If I run systemctl status exim4 I get: exim4.service - LSB: exim Mail Transport Agent Loaded: loaded (/etc/init.d/exim4; generated) Active: failed (Result: exit-code) since Thu 2022-10-06 12:43:29 CEST; 1min 10s ago Docs: man:systemd-sysv-generator(8) Process: 2777 ExecStart=/etc/init.d/exim4 start (code=exited, status=1/FAILURE) CPU: 238ms ott 06 12:43:29 capitanata systemd[1]: Starting LSB: exim Mail Transport Agent... ott 06 12:43:29 capitanata exim4[2777]: Starting MTA: ott 06 12:43:29 capitanata exim4[4169]: 2022-10-06 12:43:29 Exim configuration error in line 508 of /var/lib/exim4/config.autogenerated.tmp: ott 06 12:43:29 capitanata exim4[4169]: Unexpected end of configuration file: .endif missing ott 06 12:43:29 capitanata exim4[4245]: Invalid new configfile /var/lib/exim4/config.autogenerated.tmp, not installing ott 06 12:43:29 capitanata exim4[4245]: /var/lib/exim4/config.autogenerated.tmp to /var/lib/exim4/config.autogenerated ott 06 12:43:29 capitanata systemd[1]: exim4.service: Control process exited, code=exited, status=1/FAILURE ott 06 12:43:29 capitanata systemd[1]: exim4.service: Failed with result 'exit-code'. ott 06 12:43:29 capitanata systemd[1]: Failed to start LSB: exim Mail Transport Agent. ott 06 12:43:29 capitanata systemd[1]: exim4.service: Unit cannot be reloaded because it is inactive. This does _not_ occur if I boot up my laptop with wifi disabled, or at home. My guess is that exim4 at work tries to start when the laptop already successfully associated to the access point, but it did not yet get an IP address assigned by the DHCP server (somewhat slow). In turn, this causes some problem with the autogeneration of the total config file from all the configuration fragments, resulting in an invalid config and hence failure to start. Exim4 invariably starts without a hitch if I manually issue a systemctl start exim4 after boot. This is somewhat a problem, since it may result in a system in which email is not working without the user(s) realising that. I guess a simple workaround might be to just add some delay before attempting to start exim4. Or adding some dependency that makes sure that the construction of the total config file is done when the system is either properly connected or disconnected from the net, but not in the middle of connecting. Of course, I'm willing to help finding out the precise concatenation of causes that makes this happen, and/or testing solutions. Thanks, best regards Giacomo Mulas -- Package-specific info: Exim version 4.96 #2 built 11-Sep-2022 11:38:26 Copyright (c) University of Cambridge, 1995 - 2018 (c) The Exim Maintainers and contributors in ACKNOWLEDGMENTS file, 2007 - 2022 Berkeley DB: Berkeley DB 5.3.28: (September 9, 2013) Support for: crypteq iconv() IPv6 PAM Perl Expand_dlfunc GnuTLS TLS_resume move_frozen_messages Content_Scanning DANE DKIM DNSSEC 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 # /etc/exim4/update-exim4.conf.conf # # Edit this file and /etc/mailname by hand and execute update-exim4.conf # yourself or use 'dpkg-reconfigure exim4-config' # # Please note that this is _not_ a dpkg-conffile and that automatic changes # to this file might happen. The code handling this will honor your local # changes, so this is usually fine, but will break local schemes that mess # around with multiple versions of the file. # # update-exim4.conf uses this file to determine variable values to generate # exim configuration macros for the configuration file. # # Most settings found in here do have corresponding questions in the # Debconf configuration, but not all of them. # # This is a Debian specific file dc_eximconfig_configtype='smarthost' dc_other_hostnames='capitanata.oa-cagliari.inaf.it:capitanata.ca.astro.it' dc_local_interfaces='' dc_readhost='' dc_relay_domains='' dc_minimaldns='true' dc_relay_nets='' dc_smarthost='smtp.gmail.com::587' CFILEMODE='644' dc_use_split_config='true' dc_hide_mailname='false' dc_mailname_in_oh='true' dc_localdelivery='mail_spool' mailname:capitanata.oa-cagliari.inaf.it # /etc/default/exim4 EX4DEF_VERSION='' # 'combined' - one daemon running queue and listening on SMTP port # 'no' - no daemon running the queue # 'separate' - two separate daemons # 'ppp' - only run queue with /etc/ppp/ip-up.d/exim4. # 'nodaemon' - no daemon is started at all. # 'queueonly' - only a queue running daemon is started, no SMTP listener. # setting this to 'no' will also disable queueruns from /etc/ppp/ip-up.d/exim4 QUEUERUNNER='combined' # how often should we run the queue QUEUEINTERVAL='30m' # options common to quez-runner and listening daemon COMMONOPTIONS='' # more options for the daemon/process running the queue (applies to the one # started in /etc/ppp/ip-up.d/exim4, too. QUEUERUNNEROPTIONS='' # special flags given to exim directly after the -q. See exim(8) QFLAGS='' # Options for the SMTP listener daemon. By default, it is listening on # port 25 only. To listen on more ports, it is recommended to use # -oX 25:587:10025 -oP /run/exim4/exim.pid SMTPLISTENEROPTIONS='' -- System Information: Debian Release: bookworm/sid APT prefers unstable APT policy: (401, 'unstable'), (10, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 5.19.0-2-amd64 (SMP w/12 CPU threads; PREEMPT) Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages exim4-base depends on: ii adduser 3.129 ii anacron 2.3-35 ii cron [cron-daemon] 3.0pl1-150 ii debconf [debconf-2.0] 1.5.79 ii exim4-config [exim4-config-2] 4.96-4 ii libc6 2.35-2 ii libdb5.3 5.3.28+dfsg1-0.10 ii netbase 6.3 ii systemd-sysv 251.5-1 ii sysvinit-utils [lsb-base] 3.05-6 Versions of packages exim4-base recommends: ii bsd-mailx [mailx] 8.1.2-0.20220412cvs-1 ii mailutils [mailx] 1:3.15-3 ii psmisc 23.5-3 Versions of packages exim4-base suggests: ii bsd-mailx [mail-reader] 8.1.2-0.20220412cvs-1 ii emacs-gtk [mail-reader] 1:28.1+1-4 ii evolution [mail-reader] 3.46.0-2 ii exim4-doc-html 4.96-1 ii exim4-doc-info 4.96-1 ii eximon4 4.96-4 ii file 1:5.41-4 ii gnutls-bin 3.7.8-2 ii kmail [mail-reader] 4:22.08.0-2 ii mailutils [mail-reader] 1:3.15-3 ii mutt [mail-reader] 2.2.7-1 ii openssl 3.0.5-4 ii s-nail [mail-reader] 14.9.24-1+b1 pn spf-tools-perl <none> ii swaks 20201014.0-2 ii thunderbird [mail-reader] 1:102.3.1-1 ii xemacs21-nomule [mail-reader] 21.4.24-10 -- debconf information: exim4-base/drec: exim4/purge_spool: false