Hi,
I am trying to configure zabbix to send mail on a server that requires smtp authentication.
Looking at the file zabbix_server.log found that when the zabbix try to send an email via script it displays the following error:
Error executing [/etc/zabbix/scripts//zabbix_sendemail.sh] [Exec format error]
Anyone know what can be? When I run the script from the command line works. Below is the script.
#!/bin/bash
export smtpemailfrom=monitoracao@dominio
export zabbixemailto="$1"
export zabbixsubject="$2"
export zabbixbody="$3"
export smtpserver="smtp.dominio"
export smtplogin=monitoracao@dominio
export smtppass=*****
export smtpauth="tls=yes"
export smtplog=/tmp/zabbix_sendmail.log
/usr/bin/sendEmail -f $smtpemailfrom -t $zabbixemailto -u $zabbixsubject -m $zabbixbody -s $smtpserver -o $smtpauth -xu $smtplogin -xp $smtppass -l $smtplog
Thanks,
Raphael
I am trying to configure zabbix to send mail on a server that requires smtp authentication.
Looking at the file zabbix_server.log found that when the zabbix try to send an email via script it displays the following error:
Error executing [/etc/zabbix/scripts//zabbix_sendemail.sh] [Exec format error]
Anyone know what can be? When I run the script from the command line works. Below is the script.
#!/bin/bash
export smtpemailfrom=monitoracao@dominio
export zabbixemailto="$1"
export zabbixsubject="$2"
export zabbixbody="$3"
export smtpserver="smtp.dominio"
export smtplogin=monitoracao@dominio
export smtppass=*****
export smtpauth="tls=yes"
export smtplog=/tmp/zabbix_sendmail.log
/usr/bin/sendEmail -f $smtpemailfrom -t $zabbixemailto -u $zabbixsubject -m $zabbixbody -s $smtpserver -o $smtpauth -xu $smtplogin -xp $smtppass -l $smtplog
Thanks,
Raphael
Comment