Lao*_*neo 6 email linux sendmail cron
网络上充满了如何禁用 cron 中的邮件的建议,就像这里所问的那样,阻止 linux 向我发送 cron 错误?. 是否真的没有全局配置标志可以设置为所有用户和所有命令禁用 cron 中的邮件。我真的不想告诉所有用户你必须添加
MAILTO=""
Run Code Online (Sandbox Code Playgroud)
或者
<command> > /dev/null 2>&1
Run Code Online (Sandbox Code Playgroud)
到您的 crontab。
根据手册页可以通过添加-m off到守护进程 args来禁用 cron 邮件
Run Code Online (Sandbox Code Playgroud)-m This option allows you to specify a shell command to use for sending Cron mail output instead of using sendmail(8) This command must accept a fully formatted mail message (with headers) on stan? dard input and send it as a mail message to the recipients specified in the mail headers. Specify? ing the string off (i.e., crond -m off) will disable the sending of mail.
| 归档时间: |
|
| 查看次数: |
3002 次 |
| 最近记录: |