ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Solved Zabbix - email alerts

    IT Discussion
    zabbix linux centos centos 7 postfix email smtp mta
    7
    68
    13.3k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • StrongBadS
      StrongBad @Mike Davis
      last edited by

      @Mike-Davis that's a huge pain! Why haven't they fixed that already?

      1 Reply Last reply Reply Quote 1
      • hobbit666H
        hobbit666
        last edited by

        Might give this a try when I re-build Zabbix in April/May

        1 Reply Last reply Reply Quote 0
        • C
          cronsloth
          last edited by

          I realize this topic is aging out, but can we get a screen shot of what the localhost config should look like in Zabbix to get it all buttoned up?

          I'm stuggling with the same issues, but I don't have info on what to put in all the other fields to make this work using the local postfix server.

          I don't want to create a whole seperate email just to set up email alerts if postfix is already running.

          Thanks

          Mike DavisM 1 Reply Last reply Reply Quote 0
          • Mike DavisM
            Mike Davis @cronsloth
            last edited by

            @cronsloth Do you mean the config page under Administration -> Media Types -> email?

            C 1 Reply Last reply Reply Quote 0
            • C
              cronsloth @Mike Davis
              last edited by cronsloth

              @mike-davis said in Zabbix - email alerts:

              under Administration -> Media Types -> email

              that's the one! Email alerts aren't working for me either, and I found this thread.. Unfortunately haven't been able to get it going yet, nothing shows in the logs /var/log/maillog yet either, so it is probably something easy I am missing.

              Happy to start a new thread if needs be 🙂

              scottalanmillerS 1 Reply Last reply Reply Quote 1
              • scottalanmillerS
                scottalanmiller @cronsloth
                last edited by

                @cronsloth said in Zabbix - email alerts:

                @mike-davis said in Zabbix - email alerts:

                under Administration -> Media Types -> email

                that's the one! Email alerts aren't working for me either, and I found this thread.. Unfortunately haven't been able to get it going yet, nothing shows in the logs /var/log/maillog yet either, so it is probably something easy I am missing.

                Happy to start a new thread if needs be 🙂

                Does the mail command work on its own?

                C 1 Reply Last reply Reply Quote 0
                • C
                  cronsloth @scottalanmiller
                  last edited by

                  @scottalanmiller

                  yes the mail command by itself works fine and shows up in logs.

                  [root@zabbixv3 ~]# echo "test message" | mail -s "test email for postfix" [email protected]
                  [root@zabbixv3 ~]# cat /var/log/maillog

                  Oct 5 12:56:58 zabbixv3 postfix/qmgr[1292]: 446341013197: from=[email protected], size=475, nrcpt=1 (queue active)
                  Oct 5 12:56:58 zabbixv3 postfix/smtp[14102]: connect to aspmx.l.google.com[2607:f8b0:400e:c01::1b]:25: Network is unreachable
                  Oct 5 12:56:59 zabbixv3 postfix/smtp[14102]: 446341013197: to=[email protected], relay=aspmx.l.google.com[74.125.28.26]:25, delay=1, delays=0.03/0.02/0.75/0.22, dsn=2.0.0, status=sent (250 2.0.0 OK 1507233418 k91si4311249pld.78 - gsmtp)
                  Oct 5 12:56:59 zabbixv3 postfix/qmgr[1292]: 446341013197: removed

                  1 Reply Last reply Reply Quote 0
                  • scottalanmillerS
                    scottalanmiller
                    last edited by

                    Network is unreachable?

                    C 1 Reply Last reply Reply Quote 0
                    • C
                      cronsloth @scottalanmiller
                      last edited by

                      @scottalanmiller

                      i saw that too, but it sends after. maybe something to do with the domain IP being an ipv6 address? The next line it connects successfully using an ipv4 address. I definitely received an email from this test.

                      Further info: I did make sure that my user i'm logged in as and sending to are both 'super zabbix admins'

                      What settings should be populated in 'SMTP: helo' and 'SMTP: email' ?
                      I assume I don't have to use a real email address (like yahoo, gmail, o365, etc) for the smtp email (since the 'mail' command successfully sends as 'zabbixv3@localdomain' ).

                      My Settings (with my domain swapped out for 'mydomain.tv')
                      **[email protected] isn't a real email outside of this config

                      SMTP Server : localhost
                      SMTP Server Port: 25
                      SMTP helo: mydomain.tv
                      SMTP email: Zabbix-Alerts <[email protected]>
                      connection Security: None
                      Authentication: None

                      Mike DavisM 1 Reply Last reply Reply Quote 0
                      • Mike DavisM
                        Mike Davis @cronsloth
                        last edited by

                        @cronsloth Your helo could be zabbix.mydomain.tv but otherwise, that's how your config should look. I built a newer zabbix server than the one where I had the issues above. To get the newer one to work, the only thing I had to do was edit my SPF record in DNS ( it's a txt record) to add my Zabbix server as an authorized sender for my domain.

                        C 1 Reply Last reply Reply Quote 0
                        • C
                          cronsloth @Mike Davis
                          last edited by

                          @mike-davis @scottalanmiller

                          Thanks so much for you quick responses... knowing I got those settings dialed in allowed my brain to stop focusing on them and look elsewhere.

                          After reading some more documentation... there is an added step that I didn't realize I had to do. I must have missed it before because I was too focused on SMTP settings...

                          Administration > User Groups > Permissions --- by default 'All Groups' was set to 'None' instead of 'Read-Write' which means any user in that group wasn't allowed to read host data. Why that is a default config idk...

                          https://www.zabbix.com/documentation/3.2/manual/config/notifications/action/operation/message

                          Thanks for you help, I changed that setting and boom! Emails came through. #bestforumsEver.

                          scottalanmillerS 1 Reply Last reply Reply Quote 1
                          • scottalanmillerS
                            scottalanmiller @cronsloth
                            last edited by

                            @cronsloth Woot

                            1 Reply Last reply Reply Quote 1
                            • 1
                            • 2
                            • 3
                            • 4
                            • 4 / 4
                            • First post
                              Last post