Hello ,
I am using Zabbix 1.8 server. I have an authenticated SMTP server. I want to configure a custom script for sending mails through this authenticated SMTP server.Zabbix is triggering my script but due to NULL values of $1,$2,$3 the script is not executing correctly . Following is my script.
************************************************** *********
#!/bin/sh
export [email protected]
export zabbixemailto=$1
export zabbixsubject=$2
export zabbixbody=$3
export smtpserver=smtp.1and1.com
export [email protected]
export smtppass=*****
/usr/bin/sendEmail -f $smtpemailfrom -t $zabbixemailto -u $zabbixsubject -m $zab
bixbody -s $smtpserver:25 -xu $smtplogin -xp $smtppass
************************************************** ******
We can see the script is executing and Zabbix shows success status in event page.
So the problem is the script is not getting the $1,$2,$3 variable .Can anybody help me how to pass variable to this bash script ??
-Thanks
I am using Zabbix 1.8 server. I have an authenticated SMTP server. I want to configure a custom script for sending mails through this authenticated SMTP server.Zabbix is triggering my script but due to NULL values of $1,$2,$3 the script is not executing correctly . Following is my script.
************************************************** *********
#!/bin/sh
export [email protected]
export zabbixemailto=$1
export zabbixsubject=$2
export zabbixbody=$3
export smtpserver=smtp.1and1.com
export [email protected]
export smtppass=*****
/usr/bin/sendEmail -f $smtpemailfrom -t $zabbixemailto -u $zabbixsubject -m $zab
bixbody -s $smtpserver:25 -xu $smtplogin -xp $smtppass
************************************************** ******
We can see the script is executing and Zabbix shows success status in event page.
So the problem is the script is not getting the $1,$2,$3 variable .Can anybody help me how to pass variable to this bash script ??
-Thanks
.
Comment