<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:v = 
"urn:schemas-microsoft-com:vml" xmlns:o = 
"urn:schemas-microsoft-com:office:office" xmlns:w = 
"urn:schemas-microsoft-com:office:word" xmlns:m = 
"http://schemas.microsoft.com/office/2004/12/omml"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.21383" name=GENERATOR>
<STYLE>@font-face {
        font-family: Cambria Math;
}
@font-face {
        font-family: Calibri;
}
@font-face {
        font-family: Tahoma;
}
@page WordSection1 {size: 8.5in 11.0in; margin: 1.0in 1.0in 1.0in 1.0in; }
</STYLE>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></HEAD>
<BODY lang=EN-US vLink=purple link=blue bgColor=#ffffff background="">
<DIV><FONT face=Arial size=2>&gt;&gt; I just went through a painful upgrade of 
an Ubuntu server ...<BR></FONT></DIV>
<DIV><FONT face=Arial size=2>Welcome to the club :-}<BR></FONT></DIV><FONT 
face=Arial size=2>
<DIV><BR>&gt;&gt; It seems as if MailScanner can’t tell whether it’s already 
running.<BR>&gt;&gt; I have “Restart Every” set to 7200. Every time the time 
passes, a new primary process of MailScanner starts.<BR>&gt;&gt; Over the period 
of a day, I’ll have a large number of parent processes running.<BR>&gt;&gt; 
<BR>&gt;&gt; If this helps at all… the mailscanner script in /etc/init.d uses 
start-stop-daemon to start and stop the MailScanner process.<BR>&gt;&gt; It 
would start fine, but it wouldn’t stop as it didn’t recognize the MailScanner 
name in the process list.<BR>&gt;&gt; I had to modify the script to use the PID 
file to stop the processes.<BR></DIV>
<DIV>You basically found out what your problem is/was.<BR><BR>Issue more 
thorougly described 
at:<BR>https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=649835#25<BR><BR>So 
basically you need to change "$NAME"s to "$PIDFILE" like:</FONT></DIV><FONT 
face=Arial size=2>
<DIV><BR>&lt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; start-stop-daemon --start 
--quiet --startas $STARTAS --name $NAME --test &gt; /dev/null 
\<BR>---<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; start-stop-daemon --start 
--quiet --startas $STARTAS --pidfile "$PIDFILE" --test &gt; /dev/null 
\<BR><BR><BR>&lt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; start-stop-daemon --start 
--quiet --nicelevel $run_nice --exec $DAEMON --name $NAME -- $DAEMON_ARGS 
\<BR>---<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; start-stop-daemon --start 
--quiet --nicelevel $run_nice --exec $DAEMON --pidfile "$PIDFILE" -- 
$DAEMON_ARGS \<BR><BR><BR>&lt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
start-stop-daemon --stop --retry=TERM/10/TERM/20 --name 
$NAME<BR>---<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; start-stop-daemon 
--stop --quiet --retry=TERM/10/TERM/20 --pidfile 
"$PIDFILE"<BR><BR>&lt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; start-stop-daemon 
--stop --signal 1 --quiet --name 
$NAME<BR>---<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; start-stop-daemon 
--stop --signal 1 --quiet --pidfile "$PIDFILE"</DIV>
<DIV>&nbsp;</DIV>
<DIV>
<DIV><FONT face=Arial size=2>(with having a</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;PIDFILE=`${QUICKPEEK} 'PID file' 
${CONFFILE}`</FONT></DIV>
<DIV><FONT face=Arial size=2>line as well at the beginning)</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>Here is a link to the script I'm using currently without problems in case 
you don't want to edit</DIV>
<DIV><A 
href="http://maques.hu/linux/mailscanner">http://maques.hu/linux/mailscanner</A></DIV>
<DIV>There are some extras like possibiliity to ulimit and checking for multiple 
installation directories to start the daemon&nbsp;(tgz:opt/deb:bin).</DIV>
<DIV>You might need to edit though...</DIV>
<DIV>&nbsp;</DIV>
<DIV>G.</DIV></FONT></DIV></BODY></HTML>