文章标题

来源:互联网 发布:史上最搞笑的淘宝评价 编辑:程序博客网 时间:2024/06/06 21:39

zabbix+postfix邮件告警配置
一、
1.本机若安装sendmail,则必须关闭并卸载。

service sendmail stop

chkconfig sendmail off

rpm -e sendmail –nodeps

2.安装postfix

yum install postfix -y

更改postfix配置文件中的参数

postconf -e myhostname=mail.zabbix.example.cn

postconf -e myorigin=zabbix.example.cn

postconf -e mydomain=zabbix.example.cn

postconf -e mydestination=localhost

postconf -e mynetworks=127.0.0.0/8

配置完成会添加参数到/etc/postfix/main.cf下末行

vi /etc/hosts

添加一行:
127.0.0.1 mail.zabbix.example.cn zabbix.example.cn

重启postfix服务

service postfix restart

yum install mailx

测试发送一封邮件到公网邮箱
echo “zabbix test mail” |mail -s “zabbix” xxx@163.com
若远程邮箱收到,则配置成功

0 0
原创粉丝点击