1. Install
sudo apt-get install sendmail
sudo apt-get install sendmail-cf
sudo apt-get install mailutils
2. Check
ps aux | grep sendmail
3. Config
sudo vim /etc/mail/sendmail.mc
Change
DAEMON_OPTIONS(`Family=inet,Name=MTA-v4,Port=smtp,Addr=127.0.0.1')dnl
to
DAEMON_OPTIONS(`Family=inet,Addr=0.0.0.0')dnl
Backup config file
cd /etc/mail
sudo mv sendmail.cf sendmail.cf.bak
sudo cp sendmail.mc sendmail.cf
4. Test
echo “hello,world” | mail -s topic duino@qq.com