Skip to content

User's cron on CentOS don't send email

Problem: CentOS 6.4. Cron does not send mail when running the script from the user. Error in the log.

Oct 25 18:19:06 v12 CROND[31169]: (admin) MAIL (mailed 644 bytes of output but got status 0x0001#012)

The mail command sends it successfully.

echo "test message body CRON" | mail -v -s "subject test" root

Reason: The MAILTO parameter, which is written in /etc/crontab, does not work for user cron processes

Solution: You need to write MAILTO via crontab -e, in the user cron file. In CentOS, all this is in /var/spool/cron/{username}