giku 发表于 2016-8-22 09:49:53

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

如题所示,在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.然后,我通过
1
# curl -V




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

1
2
3
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 libssh2/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:
1
2
3
4
# rpm -Uvh http://www.city-fan.org/ftp/contrib/yum-repo/rhel6/x86_64/city-fan.org-release-1-13.rhel6.noarch.rpm


# yum install libcurl




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

1
2
3
4
错误: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




可以这样解决:

1
2
3
4
# rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/libnghttp2-1.6.0-1.el6.1.x86_64.rpm


# yum install libnghttp2




然后再重新安装curl:

1
# yum install libcurl




(2)重新编译安装zabbix3:

1
2
3
4
5
# cd /usr/local/src/zabbix-3.0.3

# ./configure --prefix=/usr/local/zabbix --enable-server --enable-agent --with-mysql --enable-ipv6 --with-net-snmp --with-libcurl --with-libxml2

# make && make install





页: [1]
查看完整版本: zabbix3.x发邮件爆“Support for SMTP authentication was not compiled in...