build议在Arch Linux中收集crond的电子邮件通知

Arch Linux没有默认安装sendmail 。 所以我在我的系统日志中得到以下消息:

 Sep 15 13:16:01 zorro crond[18497]: mailing cron output for user collectors sh cronjob.sh Sep 15 13:16:01 zorro crond[18497]: unable to exec /usr/sbin/sendmail: cron output for user collectors sh cronjob.sh to /dev/null 

什么是build议的方式来解决这个默认行为,所以实际的消息被发送?

heirloom-mailx已安装并能够使用SMTP发送电子邮件crond可以使用mailx发送通知吗?

是否有任何使用mailx发送的sendmail mailx ? Sendmail甚至不在存储库中。

在这种情况下,我通常使用(并推荐)像nullmailer这样的小型中继专用邮件服务器。 不过不知道是否在你的回购。

我用这个ssmtp。 它只需要一个小的configuration文件,你很好去。 这是一个代替sendmail通过smtp中继somwehere发送电子邮件(比如你的isp的邮件)。 它与cron(我使用fcron)正常工作,它与mailx工作正常。

这是在[额外]。 我的configuration如下。

 # # /etc/ssmtp.conf -- a config file for sSMTP sendmail. # # The person who gets all mail for userids < 1000 [email protected] # The place where the mail goes. mailhub=relay.myisp.net # Where will the mail seem to come from? rewriteDomain=example.com 

去testing:

 $ mailx -s "this is a test" root test message body . EOT