sendmail部署使用

sendmail发送邮件:
yum install -y sendmail sendmail-cf
/etc/init.d/sendmail restart

命令: mail -s “pv统计” one@nazoua.com </tmp/count.txt

第三方邮箱发送邮件:

yum install mailx –y

vim /etc/mail.rc #在最后增加

set from=zabbix@nazoua.com smtp=smtp.qq.com
set smtp-auth-user=zabbix@nazoua.com smtp-auth-password=abcd-1234
set smtp-auth=login

测试:
echo “zabbix test mail” |mail -s “zabbix” one@nazoua.com #测试发送邮件

发表评论

邮箱地址不会被公开。