Hi Im very new to Zabbix, I've Managed to make zabbix email alert using msmtp however whenever it sends a notification its blank doesn't have any content on it.
please enlighten me i followed this http://dev.aperto.fr/projects/3/wiki..._notifications
# account zabbix
# host smtp.example.org
# from [email protected]
#
# advanced account setup (authentication + TLS on Gmail)
# ------------------------------------------------------
# account zabbix
# tls on
# tls_starttls on
# tls_trust_file /etc/ssl/certs/ca-certificates.crt
# host smtp.gmail.com
# port 587
# auth on
# from [email protected]
# user [email protected]
# password ***********
#
# (from, user and password should be replaced with real values).
#
# Dependencies
# It needs msmtp utility
# On Debian and Ubuntu:
# apt-get install msmtp
#
################################################## ##############################
DEBUG=0
if [ $DEBUG -gt 0 ]
then
exec 2>>/tmp/zext_msmtp.log
set -x
fi
# Default parameters
FROM='myemail@mydomain'
MSMTP_ACCOUNT='zabbix'
# Parameters (as passed by Zabbix):
# $1 : Recipient
# $2 : Subject
# $3 : Message
recipient=$1
subject=$2
message=$3
date=`date --rfc-2822`
# Replace linefeeds (LF) with CRLF and send message
#sed 's/$/\r/' <<EOF | msmtp zabbix $MSMTP_ACCOUNT $recipient
#From: <$FROM>
#To: <>
#Subject: $subject
#Date: $date
#$message
#EOF
sed 's/$/\r/' <<EOF | msmtp --account zabbix myemail@mydomain
From: zabbixmonitoring
To: everyone
Subject:
$Message
EOF
TIA!
please enlighten me i followed this http://dev.aperto.fr/projects/3/wiki..._notifications
# account zabbix
# host smtp.example.org
# from [email protected]
#
# advanced account setup (authentication + TLS on Gmail)
# ------------------------------------------------------
# account zabbix
# tls on
# tls_starttls on
# tls_trust_file /etc/ssl/certs/ca-certificates.crt
# host smtp.gmail.com
# port 587
# auth on
# from [email protected]
# user [email protected]
# password ***********
#
# (from, user and password should be replaced with real values).
#
# Dependencies
# It needs msmtp utility
# On Debian and Ubuntu:
# apt-get install msmtp
#
################################################## ##############################
DEBUG=0
if [ $DEBUG -gt 0 ]
then
exec 2>>/tmp/zext_msmtp.log
set -x
fi
# Default parameters
FROM='myemail@mydomain'
MSMTP_ACCOUNT='zabbix'
# Parameters (as passed by Zabbix):
# $1 : Recipient
# $2 : Subject
# $3 : Message
recipient=$1
subject=$2
message=$3
date=`date --rfc-2822`
# Replace linefeeds (LF) with CRLF and send message
#sed 's/$/\r/' <<EOF | msmtp zabbix $MSMTP_ACCOUNT $recipient
#From: <$FROM>
#To: <>
#Subject: $subject
#Date: $date
#$message
#EOF
sed 's/$/\r/' <<EOF | msmtp --account zabbix myemail@mydomain
From: zabbixmonitoring
To: everyone
Subject:
$Message
EOF
TIA!
Comment