June 2025
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
30  

Categories

June 2025
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
30  

How to disable cron based mail alerts

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.

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>