Ad Widget

Collapse

SMTP Authentication with 2.2

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gatesr494
    Junior Member
    • Apr 2014
    • 3

    #1

    SMTP Authentication with 2.2

    When it comes to Linux I am not the smartest guy on the block. If someone could provide a dummy guide on how to configure Zabbix to send emails out through a gmail account that would be great. I am using Suse(Zabbix pre-built image) as the Linux OS running Zabbix 2.2. Any help would be much appreciated.
  • ingus.vilnis
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Mar 2014
    • 908

    #2
    Hello and welcome!

    The task of sending email notifications is described more in Zabbix documentation here: https://www.zabbix.com/documentation.../notifications

    It can be a bit tricky at the beginning so here is a short step-by-step manual for you:
    1. In Zabbix frontend go to Administration -> Media Types
    2. Select Email
    3. Fill the given form with the following
      • Name: Gmail
      • Type: Email
      • SMTP server: aspmx.l.google.com
      • SMTP helo: aspmx.l.google.com
      • SMTP email: [email protected] (this address will be used as sender)
      • Enabled: checked
      • NOTE: Since GMail normally uses SMTP with authentication, we have to use a workaround for this. For testing purposes it is enough to use restricted GMail SMTP services. More details on this please read here: https://support.google.com/a/answer/176600?hl=en
      • Save the Media Types form
    4. Click on Profile link in uper right corner of your Zabbix screen
    5. Choose tab Media
    6. Click Add (or Edit if you have defined something already)
      • In popup window select Type Email
      • Send to: [email protected]
      • NOTE: Since we are using restricted GMail SMTP services you will be able to send emails only to Gmail or Google Apps email addresses
      • Status: Enabled
      • Save the Popup window form
    7. Save the User Profile form
    8. Go to Configuration -> Actions
    9. In upper right dropdown select Triggers
    10. Check and enable action Report problems to Zabbix administrators
    11. Wait for a trigger to fire an action
    12. Check your email (NOTE: Check your Junk folder. Zabbix notifications could be filtered there unless you mark them as Not junk).


    Hope you will find this helpful!

    Best Regards,
    Ingus

    Comment

    • gatesr494
      Junior Member
      • Apr 2014
      • 3

      #3
      I did find this helpful...One quick question, for sending to emails that are not gmail, is their a better SMTP provider you would recommend?

      Comment

      • ingus.vilnis
        Senior Member
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • Mar 2014
        • 908

        #4
        I cannot recommend you any useful SMTP servers myself. You may try to search for some.
        Maybe this list helps: http://www.arclab.com/en/amlc/list-o...rver-list.html

        Comment

        • datzab
          Junior Member
          • Sep 2014
          • 2

          #5
          Hi there,

          I've followed your guidlines but I'm not getting any mail through, on further inspection I'm getting this error in the logs;

          1120:20140930:163538.619 wrong answer on end of data [421 4.7.0 Email Senders Guidelines. dn5si21307288wjb.163 - gsmtp
          ]


          It looks like it can mean a number of things, has anyone experienced this?

          Thanks!

          Comment

          • ingus.vilnis
            Senior Member
            Zabbix Certified Trainer
            Zabbix Certified SpecialistZabbix Certified Professional
            • Mar 2014
            • 908

            #6
            Hi,

            Yes, the free SMTP features of Gmail I described got broken some time ago. I guess GMail is simply treating direct connections as a spam and blocks them.

            However there is a working workaround to this. I will not post a detailed step by step manual here but here are some main points:
            • Install Postfix on your Zabbix server
            • Read postfix docs and google on how to get it working. There is one config file to be edited with your email address added there
            • In Zabbix set the mail server as 127.0.0.1 (localhost) and pass the Zabbix email to Postfix
            • Receive the email from your gmail address to your gmail (and check spam folder).

            Some steps may not be accurate but his is the way to go for you.

            Best Regards,
            Ingus

            Comment

            • datzab
              Junior Member
              • Sep 2014
              • 2

              #7
              Hi Ingus,

              Thanks very much for this, there were a few knocks along the way but my Zabbix alerts are now being sent over email (although they won't go out to my gapps address for my domain which I need, actual gmail and other domains are fine though?!).

              For any future readers, I followed this guide https://www.linode.com/docs/email/po...x-smtp-debian7 one thing that's missing which had me pulling my hair out is ensuring all sasl libraries are installed!

              Thanks!

              Comment

              Working...