Chinaunix首页 | 论坛 | 博客

OPS

  • 博客访问: 493882
  • 博文数量: 117
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 1210
  • 用 户 组: 普通用户
  • 注册时间: 2015-05-05 14:50
个人简介

hellow 运维

文章分类

全部博文(117)

文章存档

2019年(1)

2018年(1)

2017年(45)

2016年(38)

2015年(32)

我的朋友

分类: 系统运维

2016-10-04 17:59:10

[root@zabbix ~]# /etc/init.d/postfix start
[root@zabbix ~]# vim /etc/mail.rc 
#######set mail
set from=hz7726@163.com
set smtp=smtp.163.com
set smtp-auth-user=hz7726
set smtp-auth-password=*******
set smtp-auth=login

[root@zabbix ~]# mail -s linuxea hz7726#163.com < /etc/rc.local 

测试邮件是否可以发送的脚本
[root@zabbix alertscripts]# vim /usr/lib/zabbix/alertscripts/mail.sh
#!/bin/sh
MAIL_TITLE=$2
MAIL_CON=$3
echo "$MAIL_CON" | /bin/mail -s "$MAIL_TITLE" $1
在zabbix上创建用户:
管理->用户->创建用户

2:给用户设置调用shijing媒介

3:用户调用示警媒介




4设置报警动作:

这样你就可以收到zabbix的邮件了

转载至:
阅读(1301) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~