How to disable cron based mail alerts
The easiest way to disable cron based email alerts is to append the following to the specified command within the users crontab:
>/dev/null 2>&1
Example:
# m h dom mon dow command
59 23 * * * /root/scripts/hotfixes/vzagentdb.sh >/dev/null 2>&1
CRONDARGS=’-m off’ in /etc/sysconfig/crond may also be specified to turn off mail completely. Other postings have also indicated setting the MAILTO=”” option in the users crontab also works.
Note that I’ve seen cases where the qmail queue was so high that even after implementing these measures, it seemed to not work, but that was because the qmail queue was draining. Once it completely drained, the madness stopped.
Recent Comments