Mailscanner leaves two running processes when restarting
Julian Field
mailscanner at ecs.soton.ac.uk
Mon May 19 18:57:45 IST 2003
At 18:50 19/05/2003, you wrote:
>Julian Field <mailscanner at ECS.SOTON.AC.UK> writes:
>
> >>mail 11612 0.1 9.8 23272 12624 ? S 09:00 0:06
> [mailscanner]
> >>mail 13598 0.6 15.8 23212 20284 ? S 10:00 0:04
> [mailscanner]
>
> >>This results in the two running mailscanners trying to scan messages
> >>at the same time:
> >
> > The output of the "ps" command changed completely with a recent glibc
> > upgrade. As a result, check_mailscanner (called by an hourly cron job)
> > totally fails, and attempts to start another MailScanner process. If
> > you want to see how to do it these days, take a look in any recent
> > version of MailScanner and transplant the guts of the current
> > check_mailscanner into your old version.
>
>The scripts were almost identical.
>
>However the error came from mailscanner being listed as [mailscanner]
>(probably as some data were swapped out, I guess).
No, this was the result of the recent glibc upgrade. The ps output for
daemons changed rather a lot! MailScanner wasn't the only package to have
problems with this, we had to fix a few other things internally as well IIRC.
> check_mailscanner
>saw no running mailscanner and spawned a new one - resulting in to
>concurrent mailscanners running.
>
>I did this change to the script:
>
>--- check_mailscanner.linux.old Mon May 19 18:44:15 2003
>+++ check_mailscanner.linux Mon May 19 18:44:46 2003
>@@ -40,7 +40,7 @@
> config=/etc/mailscanner/mailscanner.conf
>
> pid=`/bin/ps axww |
>- /bin/grep '[ ]'$virusdir/$process |
>+ /bin/egrep "([ ]$virusdir/$process|\[mailscanner\])" |
> /usr/bin/awk '{ print $1 }'`
> if [ "$pid" = "" ]; then
> # Restart it
>
>Now it works whether mailscanner is listed as the right name
>(/usr/sbin/mailscanner here) or as [mailscanner].
--
Julian Field
www.MailScanner.info
Professional Support Services at www.MailScanner.biz
MailScanner thanks transtec Computers for their support
More information about the MailScanner
mailing list