目录标题
zabbix结合qqmail发送故障信息
设置qq邮箱白名单
手机qq邮箱app—>设置—>白名单---->添加zabbix@server4.localdomain
- 使server4可以上网
真机开启路由
server4:添加主机ip为网关,在/etc/resolv.conf添加解析nameserver 114.114.114.114 [root@server4 ~]# yum install mailx -y
[root@server4 ~]# netstat -antlpe|grep :25 # 25邮件端口
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 0 16503 1080/master
tcp6 0 0 ::1:25 ::😗 LISTEN 0 16504 1080/master- 测试邮件
[root@server4 ~]# mail root # 发送邮件
Subject: test
hshshsh
xixixi
xiixix
EOT
[root@server4 ~]# mailq # 队列中没有邮件等待
Mail queue is empty
[root@server4 ~]# mail # 查看邮件
Heirloom Mail version 12.5 7/5/10. Type ? for help.
"/var/spool/mail/root": 1 message 1 new
>N 1 root Sun Mar 15 18:17 20/606 "test"
& 1
Message 1:
From root@server4.localdomain Sun Mar 15 18:17:51 2020
Return-Path: <root@server4.localdomain>
X-Original-To: root
Delivered-To: root@server4.localdomain
Date: Sun, 15 Mar 2020 18:17:50 +0800
To: root@server4.localdomain
Subject: test
User-Agent: Heirloom mailx 12.5 7/5/10
Content-Type: text/plain; charset=us-ascii
From: root@server4.localdomain (root)
Status: R
hshshsh
xixixi
xiixix
7. [root@server4 ~]# systemctl restart zabbix-server
测试:关闭server3邮件是否发送
[root@server3 zabbix_agentd.d]# systemctl stop zabbix-agent