I recently performed a MailScanner upgrade on a mail server that I maintain, and I noticed that afterwards I was receiving tons of messages from the MailScanner cron jobs that were running.
The messages didn't indicate any problems, just that things were running smoothly. While this is great information, I really only need to know when there is a problem so I can correct it. Anything else will just clutter my inbox or be filtered to the trash.
My initial thought was to just pipe the output to /dev/null and forget about it. However if I did this I would no longer receive emails alerting me of problems, which I need to get.
The three scripts that were causing a problem are check_mailscanner, update_phishing_sites, and update_bad_phishing_sites.
The check_mailscanner has an easy fix, and that is to just add a -q parameter to the cron entry that calls the script. This will suppress the positive output.
The other two scripts I had to manually edit. I commented out the line calling wget and modified the command to call curl to have the --silent and --show-error options.
Not sure this was the best way to fix the problem, but it has seemed to do the trick. Other suggestions are welcome.
#wget http://www.mailscanner.info/phishing.safe.sites.conf.master || \
curl --silent --show-error -O http://www.mailscanner.info/phishing.safe.sites.conf.master || \
( logger -p mail.warn -t update.phishing.sites Cannot find wget or curl, update failed. ; echo Cannot find wget or curl to do phishing sites update. ; exit 1 )
#wget http://www.mailscanner.eu/phishing.bad.sites.conf.master || \
curl --silent --show-error -O http://www.mailscanner.eu/phishing.bad.sites.conf.master || \
( logger -p mail.warn -t update.phishing.sites Cannot find wget or curl, update failed. ; echo Cannot find wget or curl to do phishing bad sites update. ; exit 1 )