[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#209116: exim daemon does not restart after last two security upgrades

On Mon, Sep 08, 2003 at 09:04:29PM +0100, Mark Baker wrote:
> The startup script for the daemon only runs it if it isn't running from 
> inetd, in order that you don't get both trying to run. I suppose I could 
> check that inetd is running, though that would only work if exim starts 
> before inetd (which by default it will, but I wouldn't want to rely on 
> that always being the case, especially since there's no obvious reason 
> why it should matter).

I don't much like the way the exim init script tries to do this, and
prefer to leave the decision firmly in the hands of the system
administrator.  I'm currently testing a patched init script (patch
attached FYI) and some defaults in /etc/default/exim:


Of course, if you're using this and running inetd, you have to make
sure the exim maintainer scripts don't try to start exim from inetd,
and might also want to disable the queue-runner cron jobs.

Ideally, these choices would be managed by debconf, and the package
postinst obey the debconf settings.

I haven't looked at the exim4 packages, so apologies if you've already
thoguht through these issues and come up with a cunning solution!

Ray Miller, Unix Systems Programmer & Team Leader
Systems Development & Support, Oxford University Computing Services
--- /etc/init.d/exim.ORI      Mon Mar  4 23:05:40 2002
+++ /etc/init.d/exim    Mon Sep  8 15:31:39 2003
@@ -1,27 +1,32 @@
 #! /bin/sh
 # /etc/init.d/exim
 # Written by Miquel van Smoorenburg <miquels@drinkel.ow.org>.
 # Modified for Debian GNU/Linux by Ian Murdock <imurdock@gnu.ai.mit.edu>.
 # Modified for exim by Tim Cutts <timc@chiark.greenend.org.uk>
 set -e
-# Exit if exim runs from /etc/inetd.conf
-if [ -f /etc/inetd.conf ] && grep -q "^ *smtp" /etc/inetd.conf; then
-    exit 0
-test -x $DAEMON || exit 0
+# Read in some defaults
+if [ -f $DEFAULTS ]
+    . $DEFAULTS
+[ -x $DAEMON ] && [ "$RUN_DAEMON" = "YES" ] || exit 0
 case "$1" in
     echo -n "Starting MTA: "
     start-stop-daemon --start --pidfile /var/run/exim/exim.pid \
-                           --exec $DAEMON -- -bd -q30m
+                           --exec $DAEMON -- $LISTEN_ARGS $QUEUE_ARGS
     echo "exim."
@@ -35,7 +40,7 @@
     start-stop-daemon --stop --pidfile /var/run/exim/exim.pid \
                            --oknodo --retry 30 --exec $DAEMON
     start-stop-daemon --start --pidfile /var/run/exim/exim.pid \
-                           --exec $DAEMON -- -bd -q30m
+                           --exec $DAEMON -- $LISTEN_ARGS $QUEUE_ARGS
     echo "exim."

Reply to: