zabbix3.x发邮件爆“Support for SMTP authentication was not compil

发布时间:2020-09-22 20:27:45 来源:51CTO 阅读:15403 作者:pangfc 栏目:网络安全

如题所示,在zabbix的面板中配置好STMP之后,测试发送邮件时爆“Support for SMTP authentication was not compiled in”这个错误。其实出现这种问题的原因是我们机器上的libcurl版本太低所致。在zabbix的官方说明文档上我们可以知道:zabbix3.x要想使用SMTP,那么需要7.20.0及以上版本的curl并且zabbix服务端在编译安装时需要添加–with-libcurl模块,官方原文如下:

To make SMTP authentication options available, Zabbix server should be compiled with the –with-libcurl compilation option with cURL 7.20.0 or higher.

然后,我通过

[root@localhost ~]# curl -V

这个命令查看我机器上的curl版本,果然是版本太低

curl 7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.21 Basic ECC zlib/1.2.3 libidn/1.18 libssh3/1.4.2 Protocols: tftp ftp telnet dict ldap ldaps http file https ftps scp sftp Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz

因此,解决方案就很简单了:升级curl,然后再重新编译安装zabbix服务端

(1)升级curl:

[root@localhost ~]# rpm -Uvh  [root@localhost ~]# yum install libcurl

注:如果发现爆这个错的话:

错误:Package: libcurl-7.49.1-3.1.cf.rhel6.x86_64 (city-fan.org)           Requires: libnghttp2.so.14()(64bit)  You could try using --skip-broken to work around the problem  You could try running: rpm -Va --nofiles --nodigest

可以这样解决:

[root@localhost ~]# rpm -Uvh  [root@localhost ~]# yum install libnghttp2

然后再重新安装curl:

[root@localhost ~]# yum install libcurl

(2)重新编译安装zabbix3:

[root@localhost zabbix-3.0.3]# cd /usr/local/src/zabbix-3.0.3 [root@localhost zabbix-3.0.3]# ./configure --prefix=/usr/local/zabbix --enable-server --enable-agent --with-mysql --enable-ipv6 --with-net-snmp --with-libcurl --with-libxml2 [root@localhost zabbix-3.0.3]# make && make install


郑重声明:本文版权归原作者所有,转载文章仅为传播更多信息之目的,如作者信息标记有误,请第一时间联系我们修改或删除,多谢。