Ad Widget

Collapse

zabbix failed to send email

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • njader
    Junior Member
    • Mar 2018
    • 5

    #1

    zabbix failed to send email

    I installed zabbix on Amazon Linux. Almost everything is working as expected but when I activated email notification (SMTP) it failed. Upon checking zabbix_server.log, issue says "failed to send email: Support for SMTP authentication was not compiled in".

    3464:20180319:103806.008 SNMP monitoring: YES
    3464:20180319:103806.008 IPMI monitoring: YES
    3464:20180319:103806.008 Web monitoring: YES
    3464:20180319:103806.008 VMware monitoring: YES
    3464:20180319:103806.008 SMTP authentication: NO
    3464:20180319:103806.008 Jabber notifications: YES
    3464:20180319:103806.008 Ez Texting notifications: YES
    3464:20180319:103806.008 ODBC: YES
    3464:20180319:103806.008 SSH2 support: YES
    3464:20180319:103806.008 IPv6 support: YES
    3464:20180319:103806.008 TLS support: YES

    I installed zabbix server from distribution package with this command: sudo yum install http://repo.zabbix.com/zabbix/3.4/rh...el6.noarch.rpm.

    How can I recompile zabbix to enable SMTP authentication?
  • dimir
    Zabbix developer
    • Apr 2011
    • 1080

    #2
    You basically need to install libcurl >= 7.20 and then download source RPM (SRPM), unpack it and re-compile it.

    See here: https://support.zabbix.com/browse/ZBX-13469

    Comment


    • njader
      njader commented
      Editing a comment
      yum list installed | grep curl
      curl.x86_64 7.53.1-14.81.amzn1 installed
      libcurl.x86_64 7.53.1-14.81.amzn1 installed
      python27-pycurl.x86_64 7.19.0-17.12.amzn1 installed

      rpm -qa | grep zabbix
      zabbix-agent-4.0.0-1.1alpha4.el6.x86_64
      zabbix-web-4.0.0-1.1alpha4.el6.noarch
      zabbix-server-mysql-4.0.0-1.1alpha4.el6.x86_64
      zabbix-release-3.5-1.el6.noarch
      zabbix-web-mysql-4.0.0-1.1alpha4.el6.noarch

      libcurl is installed.

      Is it because of RPM package? Shoud I use other RPM package?
      Last edited by njader; 20-03-2018, 08:29.
  • dimir
    Zabbix developer
    • Apr 2011
    • 1080

    #3
    You have the right curl library version installed, now all you need is recompile zabbix:

    As non-root user do:

    $ sudo yum install rpm-build
    $ wget rpm -ivh http://repo.zabbix.com/zabbix/3.5/rh...a4.el6.src.rpm
    $ rpm -ivh zabbix-4.0.0-1.1alpha4.el6.src.rpm
    $ cd ~/rpmbuild/SPECS/
    $ rpmbuild --define "alphatag alpha4" -ba zabbix.spec

    If your compilation is successful you will find the new RPMs under ~/rpmbuild/RPMS/x86_64

    Comment


    • njader
      njader commented
      Editing a comment
      I recompiled zabbix and SMTP is now enabled but I have another issue. I am using amazon SES for email notification. Below is the configuration on zabbix
      SMTP Server: email-smtp.us-east-1.amazonaws.com
      SMTP server port: 587
      SMTP helo: email-smtp.us-east-1.amazonaws.com
      SMTP email: [email protected]
      Connection security: STARTTLS
      Authentication: Username and Passsword
      Username: AWS SES SMTP Username
      Password: AWS SES SMTP Password

      Zabbix Error is: failed to send email: Failed sending data to the peer: MAIL failed: 501

      Sending email from AWS SES console is working. Please advise what is wrong with my configuration.

      Thank you very much.

    • njader
      njader commented
      Editing a comment
      I ended up using gmail account for Zabbix email notification with ssmtp mailx support. It is now working but it woul be very much appreciated if anyone can help me to use amazon ses

      Thank you dimir for helping me out.
  • Elijah
    Junior Member
    • Dec 2023
    • 1

    #4
    Hello dimir - could you please help me on fixing my issue on sending email alerts? i got this error started last 2 weeks ago. Any advise please?
    Click image for larger version

Name:	image.png
Views:	733
Size:	16.0 KB
ID:	475654

    Click image for larger version

Name:	image.png
Views:	720
Size:	25.1 KB
ID:	475655

    here is the logs when i tried to do the manually test



    Click image for larger version

Name:	image.png
Views:	712
Size:	11.2 KB
ID:	475656​​

    Comment

    Working...