MailScanner starting new parent processes
Gabor FUNK
FUNK.Gabor at hunetkft.hu
Mon Sep 29 22:31:05 IST 2014
>> I just went through a painful upgrade of an Ubuntu server ...
Welcome to the club :-}
>> It seems as if MailScanner can't tell whether it's already running.
>> I have "Restart Every" set to 7200. Every time the time passes, a new primary process of MailScanner starts.
>> Over the period of a day, I'll have a large number of parent processes running.
>>
>> If this helps at all. the mailscanner script in /etc/init.d uses start-stop-daemon to start and stop the MailScanner process.
>> It would start fine, but it wouldn't stop as it didn't recognize the MailScanner name in the process list.
>> I had to modify the script to use the PID file to stop the processes.
You basically found out what your problem is/was.
Issue more thorougly described at:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=649835#25
So basically you need to change "$NAME"s to "$PIDFILE" like:
< start-stop-daemon --start --quiet --startas $STARTAS --name $NAME --test > /dev/null \
---
> start-stop-daemon --start --quiet --startas $STARTAS --pidfile "$PIDFILE" --test > /dev/null \
< start-stop-daemon --start --quiet --nicelevel $run_nice --exec $DAEMON --name $NAME -- $DAEMON_ARGS \
---
> start-stop-daemon --start --quiet --nicelevel $run_nice --exec $DAEMON --pidfile "$PIDFILE" -- $DAEMON_ARGS \
< start-stop-daemon --stop --retry=TERM/10/TERM/20 --name $NAME
---
> start-stop-daemon --stop --quiet --retry=TERM/10/TERM/20 --pidfile "$PIDFILE"
< start-stop-daemon --stop --signal 1 --quiet --name $NAME
---
> start-stop-daemon --stop --signal 1 --quiet --pidfile "$PIDFILE"
(with having a
PIDFILE=`${QUICKPEEK} 'PID file' ${CONFFILE}`
line as well at the beginning)
Here is a link to the script I'm using currently without problems in case you don't want to edit
http://maques.hu/linux/mailscanner
There are some extras like possibiliity to ulimit and checking for multiple installation directories to start the daemon (tgz:opt/deb:bin).
You might need to edit though...
G.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.mailscanner.info/pipermail/mailscanner/attachments/20140929/595f8d04/attachment.html
More information about the MailScanner
mailing list