I configured email subsystem of my Centos 7 so it sends emails to outside world. Since then I started receiving about 10 emails every minutes from crond process. It is useless for me and want crond not to send any emails.
I tried to set
MAILTO=""
in /etc/crontab and in /etc/crontab.d (there's no more MAILTO=root in crontab related files) but the emails are still coming. I restarted crond service and later I restarted whole system. Nothing helps so far.
Add the following to /etc/sysconfig/crond and then restart crond. This will send the outputs to syslog instead of mail:
CRONDARGS="-s -m off"
If you don't want to receive any emails from running cron jobs, you can redirect stdout and stderr to
/dev/null
or to some log file.You can still redirect stdout to a log file and stderr to
/dev/null
if needed.