I installed nullmailer
on a Debian 10 VPS.
root@:~# cat /etc/nullmailer/remotes
hotmail-com.olc.protection.outlook.com
echo "Subject: test" | sendmail -v me@hotmail.com
works, I receive the e-mail.echo "Subject: test" | sendmail -v me@example.com
doesn't work, saying:smtp: Failed: 550 5.5.0 Requested action not taken: mailbox unavailable. [DM6NAM12FT063.eop-nam12.prod.protection.outlook.com]
As far as I understand, for example.com
to work, I have to resolve it's MX record and put the value into /etc/nullmailer/remotes
.
Sendmail seems to handle that automatically.
- Can
nullmailer
do that as well? - If not, what is a lightweight yet capable alternative (
msmtp
,swaks
)? - Or should I have a wrapper script doing
dig
first, saving to/etc/nullmailer/remotes
, and only then callingnullmailer
?
Please advise!