Ad Widget

Collapse

No trigger emails using zext_msmtp.sh

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • qube-admin
    Junior Member
    • Mar 2015
    • 1

    #1

    No trigger emails using zext_msmtp.sh

    Hello Everyone,

    I am relatively new to the Zabbix administration scene, but a veteran power user. I have set up a fully functioning Zabbix server running version 2.4, and have everything ticking over nicely. I might mention this is on a machine running Ubuntu 14.04.

    My only problem is sending emails vis msmtp. I am using the Zext_msmtp.sh script I found on the net. If i use the script to send a mail under the zabbix account on the command line i.e ./zext_msmtp.sh [email protected] test test, this comes through.

    However Zabbix will not send through trigger emails for problems or OK. I have set the media type emails to use a script, and specified the name. I have placed a copy of the scipt in the /zabbix/alert.d/ and ensured in the zabbix_server.conf it is looking for Alert scripts in this location.

    Please someone help me, I think I am going mad trying to get this working
  • henrich
    Junior Member
    • Mar 2015
    • 1

    #2
    No trigger emails using zext_msmtp.sh

    Update zext_msmtp.sh

    sed 's/$/\r/' <<EOF | msmtp --account $MSMTP_ACCOUNT $recipient
    From: <$FROM>
    To: <$recipient>
    MIME-Version: 1.0
    Content-Type: text/html
    Subject: $subject
    Date: $date
    X-Priority: 1
    Message:

    $message
    EOF

    Comment

    • jluvs2ride
      Member
      • Jul 2015
      • 85

      #3
      Did this resolve the issue for you? I am having a similar problem.

      Comment

      Working...