带有名称的crontab邮寄
我的crontab设置为波纹管:
MAILFROM=name <[email protected]>
[email protected]
* * * * * root echo "Message here"
因此,我会收到错误:
May 4 14:31:01 ubuntu22 CRON[71554]: (root) UNSAFE MAIL (name <[email protected]>)
消息是默认发送的: cron daemon&root@ubuntu22&gt;
如果我设置 [email&nbsp; procented]
有没有一种方法可以自定义邮件名称,而不仅仅是电子邮件?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您缺少围绕邮寄值的报价。
如果它具有该值的空间,则需要引号。
未测试。
You're missing quotes around the MAILFROM value.
If it has a space in the value, it needs the quotes.
Not tested.
通过编写shell脚本而不是sendmail,并判断和修改接收到的电子邮件内容,然后将参数转发到原始的bsendmail以拦截和修改它。
By writing a shell script instead of sendmail, and judging and modifying the received email content, and forwarding the parameters to the original bsendmail to intercept and modify it.