一台服务器检查程序需要将检查结果自动发送给指定邮箱,想当然的使用mail命令,结果在测试时发现有错误:
mail: cannot send message: process exited with a non-zero status
其没有提到明确的问题,但从其中提出的log查看,倒是发现了线索。
有两个log都记录了对应的信息,即syslog和mail.err。mail.err中的信息更明确:
postfix/sendmail[27115]: fatal: open /etc/postfix/main.cf: No such file or directory
然后意识到这台服务器安装完成后并没有配置postfix服务,于是重新配置:
sudo dpkg-reconfigure postfix
然后再使用mail命令发送邮件就正常了:
echo "FTP2 dataset file has been changed. Please use the attachment to find the differences." | mail -s "FTP2 dataset file change" -A Diff.html [email protected]
DeepSeek多模态怎么样及保姆级配置教程(codex、claude)实用指南
WSL2+Docker+Ollama本地部署大模型思路和实践指南(Qwen1.8b)实用指南
DeepSeek Harness热门插件盘点:10个实用插件,覆盖多Agent、上下文和多模态实用指南
grep文本搜索与正则表达式完整代码示例实用指南
AI漫剧伪装直男1‑24集无雾版夸克网盘资源免费分享
AI漫剧玉僧入尘1-68集无雾无删版夸克网盘资源免费分享