【问题标题】:Crontab send email to root and postmastercrontab 向 root 和 postmaster 发送电子邮件
【发布时间】:2016-08-19 03:59:51
【问题描述】:

我在一个新的服务器上,我(几天前)在我的crontab -e 中添加了一行。

从那以后,每次 cron 运行时,我的服务器都会尝试向 root(我的 gmail)发送一封电子邮件,并发送到像 postmaster@my_server.my_ip 这样的电子邮件。

我的问题是发送到 root(我的 gmail)的电子邮件还可以,但是发送到 postmaster@my_server.my_ip 的电子邮件都被延迟了,我收到 很多 来自 Mail Delivery Subsystem 的电子邮件,例如:

  • 向以下收件人的递送已延迟 ....

好像 gmail 无法向 postmaster@... 发送电子邮件

我的问题:

  • 为什么 cron 每次都向 root 和 postmaster 发送电子邮件?我没有为此做任何事情。
  • 如何禁用它?

谢谢!

【问题讨论】:

    标签: email cron


    【解决方案1】:

    这个问题好像以前回答过here

    基本上要么更改 crontab 配置中的 MAILTO=root 选项以全局禁用它,要么通过管道将每个作业设置为 null 以阻止它生成电子邮件:>/dev/null 2>&1

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-11-28
      • 2013-02-21
      • 1970-01-01
      • 1970-01-01
      • 2012-06-11
      • 2023-04-10
      相关资源
      最近更新 更多