[Mimedefang] REVISED: postfix/mimedefang socket

Richard Laager rlaager at wiktel.com
Thu Sep 28 20:42:46 EDT 2017


For those of you that don't use systemd, you can just ignore this. None
of this affects the SysV init scripts in any way.

Here's a first run at the diff from the generated unit to a manual unit
to fix the issue. The relevant change is making ExecStop use "stop wait"
instead of just "stop".

The init script (at least on my system, which is Ubuntu 16.04) does not
do a "wait" on stop, but only on restart. That arguably seems fine in
the SysV world.

The other changes I made in the [Service] section weren't required for
this particular problem, but seem like things we'd want.

This fixes the problem for me.

I think a more correct solution for systemd is to make this two units,
one for mimedefang and one for mimedefang-multiplexor. I'm going to work
on that next, before submitting anything to Debian.

--- /run/systemd/generator.late/mimedefang.service	2017-09-16 01:25:06.772000000 -0500
+++ /lib/systemd/system/mimedefang.service	2017-09-28 18:41:38.651481894 -0500
@@ -1,10 +1,5 @@
-# Automatically generated by systemd-sysv-generator
-
 [Unit]
-Documentation=man:systemd-sysv-generator(8)
-SourcePath=/etc/init.d/mimedefang
-Before=multi-user.target
-Before=multi-user.target
+Documentation=man:mimedefang(8)
 Before=multi-user.target
 Before=graphical.target
 Before=shutdown.target
@@ -14,12 +9,11 @@
 
 [Service]
 Type=forking
-Restart=no
+Restart=on-failure
 TimeoutSec=5min
-IgnoreSIGPIPE=no
-KillMode=process
+KillMode=control-group
 GuessMainPID=no
 RemainAfterExit=yes
 ExecStart=/etc/init.d/mimedefang start
-ExecStop=/etc/init.d/mimedefang stop
+ExecStop=/etc/init.d/mimedefang stop wait
 ExecReload=/etc/init.d/mimedefang reload


-- 
Richard



More information about the MIMEDefang mailing list