MAILTO不适用于CRON。 我该如何解决这个问题?
我已经为root用户设置了cronjob。 但是,当cron失败,我应该收到来自cronjob的电子邮件,因为我已经在/ etc / crontab中设置了MAILTO: [email protected] 我已经安装了mailx使用 yum install mailx 但是当我看到cron日志时,我得到这些行: Feb 23 14:13:01 internal crond[6858]: (root) CMD (/var/www/vded/build/bin/sync.sh) Feb 23 14:13:01 internal crond[6857]: (root) MAIL (mailed 79 bytes of output but got status 0x0001 ) 我该如何解决这个问题? 更新: 我用yum安装了mailx和sendmail。 我开始发送邮件。 所以现在发送电子邮件正在从命令行工作! 我在maillog中得到这个错误: Feb 23 16:06:01 internal sendmail[7210]: o1NG61cd007210: from=root, size=425, class=0, nrcpts=1, msgid=<[email protected]>, relay=root@localhost Feb […]