2.使用mail发送邮件
1.下载安装mailx
yum install mailx -y
2.配置发件服务地址
[root@prometheus-server scripts]# tail -n 4 /etc/mail.rc
#测试
set from=138xxxx@163.com smtp=smtp.163.com
set smtp-auth-user=138xxxx@163.com smtp-auth-password=123456
set smtp-auth=login
3.测试发送命令
echo "test mail" |mail -s "monitor" xxxxx@qq.com
4.登录QQ邮箱验证

浙公网安备 33010602011771号