graceful shutdown

Julian Field mailscanner at ecs.soton.ac.uk
Sat Dec 13 18:57:03 GMT 2003


At 17:49 13/12/2003, you wrote:
>On Sat, 13 Dec 2003, Stephen Swaney wrote:
> > > If I do
> > > kill `/usr/sbin/check_mailscanner`
> > > will this cause a problem with mail that it is currently working on ?
> >
> > This will not work. Mail will still be received but since MailScanner
> is not
> > running, this mail will just pile up in the incoming mail queue. It
> will not
> > be processed, delivered or relayed.
> >
>Thats ok I have a separate script for the postfix in and out, and one just
>for MailScanner. I do not have a redhat/suse linux so I want to just issue
>the command that will gracefully stop just MailScanner. Having the queue
>pile up is not a concern but I just do not want MailScanner to be
>interuppted in the middle of processing a message and then possibly delete
>or corrupt it.

Don't worry, that can't happen. MailScanner never actually takes ownership
of a message at all. You can kill the MailScanner processes any way you
like, but if you do it with a simple "kill" command then they will tidy up
all their temporary working directories before shutting down, so you don't
leave stray temp dirs behind.


>Looking through the rpm I see the line
>killproc MailScanner -15
>
>killproc is a redhat/suse function and it appears that it will basically
>do
>
>kill -15 `/usr/sbin/check_mailscanner`

It's a bit more complicated than that, as running check_mailscanner will
output some words other than the actual list of PIDs. It prints out
"MailScanner running with pid" as well as the PIDs themselves.
So you could do

kill `/usr/sbin/check_mailscanner | sed -e 's/^MailScanner running with pid//'`

--
Julian Field
www.MailScanner.info
Professional Support Services at www.MailScanner.biz
MailScanner thanks transtec Computers for their support
PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654



More information about the MailScanner mailing list