Ad Widget

Collapse

Sending a notification through Gmail SMTP server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JBo
    Senior Member
    • Jan 2011
    • 310

    #16
    Maybe zabbix is launching zext_msmtp.sh with a reduced PATH that doesn't contain /usr/local/bin.
    You may try to add at the beginning of the script:
    Code:
    PATH=$PATH:/usr/local/bin
    or replace
    Code:
    sed 's/$/\r/' <<EOF | msmtp --account ...
    with
    Code:
    sed 's/$/\r/' <<EOF | /usr/local/bin/msmtp --account ...

    Comment

    • fallwor
      Junior Member
      • Mar 2013
      • 19

      #17
      JBo,

      Setting the path did wonders. It is working now.

      Thanks a lot!

      Comment

      • iouri_k
        Junior Member
        • Mar 2013
        • 1

        #18
        You can get it to work without any additional software or setups. Gmail provides an alternative smtp server address, commonly used for printers and other devices that do not support secure servers.

        SMTP server: "aspmx.l.google.com"
        SMTP helo: "aspmx.l.google.com"
        SMTP email: "[email protected]"

        Comment

        • vic
          Member
          • Jul 2013
          • 58

          #19
          Originally posted by iouri_k
          You can get it to work without any additional software or setups. Gmail provides an alternative smtp server address, commonly used for printers and other devices that do not support secure servers.

          SMTP server: "aspmx.l.google.com"
          SMTP helo: "aspmx.l.google.com"
          SMTP email: "[email protected]"
          Some reports this won't work anymore. Can anyone confirm?

          Comment

          • barbaros
            Member
            • Aug 2010
            • 32

            #20
            I've just checked, it still works .

            Comment

            • skarllot
              Junior Member
              • Oct 2011
              • 21

              #21
              I use sendEmail (note capital E), is a lightweight Perl script.

              Comment

              • mattsl
                Junior Member
                • Jun 2014
                • 4

                #22
                After much hassle trying to get msmtp to compile on my box that didn't have the dependencies in the repo, I Googled "zabbix gmail -msmtp" and found this:

                Zabbix SMTP Alert script for gmail. GitHub Gist: instantly share code, notes, and snippets.


                Super quick and easy. Just change your username and password and you're done.

                Comment

                Working...