Centos7下使用mail发送邮件配置
yum安装
yum -y install sendmail mailx libreport-plugin-mailx sharutils mutt
修改配置文件/etc/mail.rc在尾部添加
set from=liuym@xxx.cn #之前设置好的邮箱地址 set smtp=smtp.exmail.qq.com #邮件服务器 set smtp-auth-user=liuym@xxx.cn #之前设置好的邮箱地址 set smtp-auth-password=xxxxxxxx #授权码及密码 set smtp-auth=login #默认login<br>
发送测试邮件
mail -s "theme" xxx@qq.com < /etc/hosts
参考
https://www.cnblogs.com/minseo/p/10271220.html