Reloading MS service via email?
Max Kipness
mkipness at GENIANT.COM
Tue Mar 23 20:50:47 GMT 2004
At 20:11 23/03/2004, you wrote:
>I've got my scripts pretty much ironed out so that a user can simply
>forward a spam message to an email address, have the spam email added
>to the blacklist and then sent a confirmation. What I'd like to also do
>is have the script reload the MailScanner service. Since this is being
>done via the user 'mail', can anyone give me some tips on the best way
>to accomplish this. So far I'm thinking of using SUDO to allow 'mail'
>to run 'kill' and /etc/init.d/MailScanner? Is there a better and/or
more secure way?
>All you need to do in this case is kill -HUP the process group headed
by the main MailScanner process.
>something along the lines of
>kill -HUP -`cat /var/run/MailScanner.pid` so you don't need to kill it
then wait then restart it.
Thanks that seems to work great. I will allow 'mail' to use kill I
suppose.
Does this do the equivalent of a reload, or a restart?
Do you think there is an issue with frequent reloads at times? I was
also thinking of having a cron job run every 5 minutes, but only if
there are additions to the whitelist or blacklist.
Thanks,
Max
More information about the MailScanner
mailing list