一 添加軟體源
root@node-01:~# add-apt-repository "deb http://cz.archive.ubuntu.com/ubuntu xenial main universe"
二 安裝heirloom-mailx
root@node-01:~# apt-get install -y heirloom-mailx
三 配置s-nail.rc
添加以下内容
set [email protected]
set smtp=smtp.exmail.qq.com
set [email protected]
set smtp-auth-password=xxxxx
set smtp-auth=login
四 發送測試郵件
root@node-01:~# echo "node01" | s-nail -s "title" [email protected]