Wednesday, March 25, 2020

CentOS 8 crond not sending email

This took a while to work out, since I was wrongly assuming it would work by default as in previous versions, but in order for crond to send email on CentOS 8, I had to change /etc/sysconfig/crond to:

$ cat /etc/sysconfig/crond
# Settings for the CRON daemon.
# CRONDARGS= :  any extra command-line startup arguments for crond
CRONDARGS=-m "/usr/sbin/sendmail -t"

as root.  Once the file is changed, restart crond:

# systemctl restart crond

which leads to the following

$ ps -ef |grep cron
root     21528     1  0 23:06 ?        00:00:00 /usr/sbin/crond -n -m /usr/sbin/sendmail -t
rfifarek 21812 20404  0 23:14 pts/1    00:00:00 grep --color=auto cron

This was from a minimal install, fully patched as of 2020-02-28

0 Comments:

Post a Comment

<< Home