SHELL发送邮件
Last updated
Last updated
# yum install mailx
# vi /etc/mail.rc #添加邮件信息
set from=baojingtongzhi@163.com smtp=smtp.163.com
set smtp-auth-user=baojingtongzhi@163.com smtp-auth-password=123456
set smtp-auth=login
# echo "this is test mail." |mail -s "test mail" xxx@163.com
告警脚本:
# cat /usr/local/zabbix/share/zabbix/alertscripts/sendmail.sh
#!/bin/bash