Ad Widget

Collapse

Not being aboe to use smtp.gmail.com within Zabbix

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • diet1975
    Junior Member
    • Dec 2020
    • 1

    #1

    Not being aboe to use smtp.gmail.com within Zabbix

    Hi,
    I just started with Zabbix out of curiosity.
    So far so good and it is pretty straid forward to work with.
    Having said, I'm not able to get smtp.gmail.com to work for notification.

    I have installed zabbix server 5.0.6 on a RaspberryPi
    Gmail via SSMTP works as expected.
    i.e.
    Code:
    echo "hello" | SSMTP [email protected]
    does work

    But when I configure Zabbix with gmail it i'm not able to connect. In the dialog box and /var/log/zabbix/zabbix_server.log I see the following error:
    failed to send email: Couldn't connect to server: Failed to connect to gmail.com port 587: Connection timed out

    via Administration -> media types -> email i have used the following settings:
    Code:
    Name: Email
    Type: Email
    SMTP server: [email protected]
    SMTP server port: 587
    SMTP helo: smtp.gmail.com
    SMTP email: <mail>@gmail.com
    Connection security:STARTTLS
    Authentication: Username and password
    Username: <mail>@gmail.com
    Password: <pwd>
    Message format: HTML/Plain text
    Description: Test ABC
    Besides these settings I also changed my google settings 'access les secure apps'
    What am I doing wrong?

    Thank you for your time and possible answers

    Regs, Diet
  • marianogedisman
    Member
    • Oct 2021
    • 78

    #2
    +1. I'm having the same issue.

    Comment

    • pavels.marhels
      Junior Member
      • Jun 2022
      • 12

      #3
      Starting from 30.may. Google is not supporting smtp auth anymore.
      Click image for larger version

Name:	Selection_264.png
Views:	5619
Size:	111.4 KB
ID:	445874

      Zabbix alerts are not working starting from 6 june. Error in zabbix log is like that:
      648:20220609:115231.083 failed to send email: Login denied

      In frontend is like that:
      Click image for larger version

Name:	Selection_263.png
Views:	5543
Size:	24.4 KB
ID:	445876

      SMTP session underneath looks like:

      Click image for larger version

Name:	Selection_265.png
Views:	5538
Size:	43.2 KB
ID:	445877



      Attached Files

      Comment

      • pavels.marhels
        Junior Member
        • Jun 2022
        • 12

        #4
        Enable 'Less secure apps' within GMAIL is not a option anymore. (strating from 1 june).

        Comment

        • alientm
          Member
          • Aug 2014
          • 51

          #5
          is there any other solution to keep sending notifications via gmail?

          Comment

          • Ferke85
            Junior Member
            • Apr 2020
            • 5

            #6
            Yes, there is a solution.
            You have to enable 2 factor authentication and create an app password for gmail (16 char long generated password). Add this password in the zabbix gmail configuration and will work the mail alerts again.
            I did these steps yesterday and it works fine.

            Comment

            • alientm
              Member
              • Aug 2014
              • 51

              #7
              Originally posted by Ferke85
              Yes, there is a solution.
              You have to enable 2 factor authentication and create an app password for gmail (16 char long generated password). Add this password in the zabbix gmail configuration and will work the mail alerts again.
              I did these steps yesterday and it works fine.
              Thank you for answer, I will try to check this solution.

              Comment

              • Ahmedosos
                Junior Member
                • Sep 2022
                • 1

                #8
                Originally posted by Ferke85
                Yes, there is a solution.
                You have to enable 2 factor authentication and create an app password for gmail (16 char long generated password). Add this password in the zabbix gmail configuration and will work the mail alerts again.
                I did these steps yesterday and it works fine.
                thank you for your help , but can you Please show us the step

                Comment


                • Vikas Negi
                  Vikas Negi commented
                  Editing a comment
                  Hi There
                  See the below screenshot attached by myself from the google account where you can enable 2 factor and also generate a password for your app.
                  To create password choose email and give custom app name such as Zabbix (worked in my case)
              • Vikas Negi
                Junior Member
                • Nov 2022
                • 1

                #9
                Hi All
                1. Click image for larger version

Name:	image.png
Views:	5000
Size:	67.2 KB
ID:	455205Click image for larger version

Name:	image.png
Views:	4981
Size:	67.2 KB
ID:	455206​Setting you need to have for gmail to work with zabbix highlighted in yellow

                Comment

                Working...