Small check_mailscanner change

Desai, Jason jase at SENSIS.COM
Tue Feb 18 13:55:38 GMT 2003

I would like to run check_mailscanner periodically from cron to make sure
that MailScanner is still running.  But I get an email every time, telling
me the pids.  I don't want to redirect the output to /dev/null to prevent
the emails, because I want to know if check_mailscanner actually had to
start a new MailScanner process.  So, I would like to add a "-q" parameter
(q for quiet) to the check_mailscanner script which, if specified, would not
print out the pids.  Running it without any parameters would print the pids
as normal.  Any thoughts?

This may not be the best way to do it, but here is a patch to
check_mailscanner that accomplishes this.

--- check_mailscanner.orig      Sat Feb  1 11:06:53 2003
+++ check_mailscanner   Tue Feb 18 08:43:31 2003
@@ -105,6 +105,8 @@
   cd $msbindir
   $process $config
-  echo MailScanner running with pid $pid
+  if [ "x$1" != "x-q" ]; then
+    echo MailScanner running with pid $pid
+  fi

Jason Desai
Network Administrator
Sensis Corporation
jase at
(315) 445-5811

More information about the MailScanner mailing list