天天看点

ubuntu20.04 发送邮件设置

一 添加软件源

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]      

五 验证邮件