我正在尝试让守护程序从 Debian 10 服务器发送电子邮件。
我将 msmtp-mta 与 OVH SMTP 服务器一起使用。它已正确配置。
通过 mail 命令直接发送电子邮件时一切正常,如下所示:
echo "test" | mail -s "test" email@domain.com
但是,像 smartd 之类的一些守护进程会尝试向 root@localhost 发送电子邮件,但收件人地址格式不正确root
,OVH SMTP 根本不喜欢:
send-mail: recipient address root not accepted by the server
send-mail: server message: 501 5.1.3 Invalid address
send-mail: could not send mail (account default from /etc/msmtprc)
Can't send mail: sendmail process failed with error code 65
并在 msmtp 日志中:
Apr 25 00:39:49 host=ssl0.ovh.net tls=on auth=on user=***REDACTED*** from=***REDACTED*** recipients=root smtpstatus=501 smtpmsg='501 5.1.3 Invalid address' errormsg='recipient address root not accepted by the server' exitcode=EX_DATAERR
我尝试添加root: email@domain.com
到 /etc/aliases 和 relaoding with newaliases
,甚至.forward
在 root 的 homedir 中放一个。
有谁之前经历过这个吗 ?msmtp 不应该尊重 /etc/aliases 和/或 .forward 并替换 root 的电子邮件地址吗?