I'm trying to get daemons to send email from a Debian 10 Server.
I'm using msmtp-mta with an OVH SMTP server. It's properly configured.
Everything works fine when sending email directly via the mail command, like so :
echo "test" | mail -s "test" email@domain.com
However, some daemons like smartd try to send email to root@localhost, but with a malformed recipient address root
, which the OVH SMTP doesn't like at all :
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
and in the msmtp log :
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
I tried adding root: email@domain.com
to /etc/aliases adn relaoding with newaliases
, and even put a .forward
in root's homedir.
Has anyone experienced this before ? Shouldn't msmtp honor /etc/aliases and/or .forward and replace root's email address ?