R
R
Roman2014-11-20 12:51:47
Email
Roman, 2014-11-20 12:51:47

Why doesn't email notification work in Zabbix?

Ubuntu server 14.04. Zabbix 2.4.2.
Set up alerts through an external script.

#!/bin/sh
export smtpemailfrom="[email protected]"
export zabbixemailto="$1"
export zabbixsubject="$2"
export zabbixbody="$3"
export smtpserver=smtp.yandex.ru
export [email protected]
export smtppass=MegaPass
export logfile=/var/log/mail.log
 
/usr/local/bin/sendEmail -l $logfile -f $smtpemailfrom -t $zabbixemailto 
-u $zabbixsubject -m $zabbixbody -s $smtpserver -xu 
$smtplogin -xp $smtppass

The script is where it should be. The rights 755 are given
. If to start through the console, then everything sends and comes. But through zabbix, no way. Shows that "sent", but there are no letters and nothing in the logs either.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Puma Thailand, 2014-11-20
@opium

Because zabbix already has built-in email alerts and you don't need to fence your bike when the standard option works.

S
Sergey Petrikov, 2014-11-20
@RicoX

And what did not suit: administration - Notification methods - email?
In general, if something is sent, then the script is called, turn on debugging in it and see where the side is.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question