[Mimedefang] REVISED: postfix/mimedefang socket

Michael Fox news at mefox.org
Sun Sep 24 17:13:16 EDT 2017


> Dianne will likely give a definitive authoritative answer but having
> adapted the MD startup script to multiple system control environments, I
> don't see anything especially risky. The only potential issue I can
> think of is if you're trying to shut down or reboot in a pathological
> circumstance where the mimedefang.pl worker perl sub-processes refuse to
> exit and the supervisory process (e.g. init) has no last resort
> mechanism to arbitrarily slaughter hung children. There's nothing quite
> so annoying as a "hung going down" system.

Thanks Bill,

That makes sense.

One option would be for the MIMEDefang team to provide the necessary systemd control files (whatever they're called).  That way, they could define restart any way they like, such as "stop wait" followed by "start".  I know systemd is hated by many.  But it is what Ubuntu 16.04 LTS uses.  

Without the proper files, apparently what happens is systemd auto-generates the file(s) it needs from the init script.  And in the autogenerated file, a 'restart' is simply a 'stop' followed by a 'start'.  I guess they can depend on at least those two basic commands being in every init script.  And because 'stop' doesn't wait unless the added "wait" option is given, we have the problem.

A friend of mine found the actual "fix" that was submitted.  It's a bit different than what I did.  Instead of commenting out the if statement in stop_it() like I did, they changed the line that calls stop_it from "stop_ip $2" to "stop_it wait", so stop_it is always called with the "wait" option.  See below.  Same result - the (formerly conditional) wait part always runs.  1 line changed instead of 2.

Michael


*** mimedefang-16.04    2017-09-23 17:53:51.046863700 -0700
--- mimedefang-17.04    2017-09-23 17:50:18.456864400 -0700
***************
*** 412,418 ****
      ;;
  
    stop)
!   stop_it $2
      ;;
  
    restart|force-reload)
--- 412,418 ----
      ;;
  
    stop)
!   stop_it wait
      ;;
  
    restart|force-reload)





More information about the MIMEDefang mailing list