配置发送邮箱验证
vi /etc/mail.rc #编辑,添加以下信息
set [email protected] smtp=smtp.163.com
set [email protected] smtp-auth-password=123456
set smtp-auth=login
4.1.2 Mail脚本
#!/bin/sh
FILE=/usr/local/etc/zabbix/alertscripts/log
echo "$3" > $FILE
/usr/bin/dos2unix -k $FILE
/bin/mail -s "$2" $1 < $FILE
4.1.3 添加媒体(Zabbix 3.0增加了3个脚本参数) https://www.zabbix.com/documentation/3.0/manual/config/notifications/media/script