Good day.
I am need help with my email script.
My email service works with the next settings
postfix via yandex SMTP. MRA - Mutt
messages from shell like this work great
echo "message" | mutt -s "header" [email protected]
my alert script:
!/bin/bash
to=$1
subject=$2
body=$3
cat <<EOF | echo "$body" | mutt -s "$subject" $to
EOF
If I run this script from shell like this
./script.sh $1 [email protected] $2 header $3 message
all work great. I reciave the message.
Zabbix dont send me any messages via this script. The actions, users, etc. all is fine in zabbix. I`m not a noody in it. The action gives me OK in Audit.
This is a creen
the permition rights for the script is 777
I have the alert script for the sms - he is working fine.
################################
Доброго дня , форумчане. Нужна помощь.
Система Ubuntu 13.04. Стоит zabbix сервер с postfix через SMTP Yandexa. Клиент - mutt. Из консоли и из скриптов - сообщения шлет на ура.
Сделал скрипт для заббикса (см. англ версию топика) - не работает. Причем в Аудите действий показывает. Что сообщение отослано. В логах postfix и mutt - ничего нет. Даже ошибок
Такой же скрипт, с такими же правами и владельцем (root), но для отправки SMS - работает нормально.
Подозреваю, что проблема именно в системе и скорее всего в правах. Поиграл с правами - ничего не выходит. ЗАшел под zabbix юзером - скрипт работает. Сообщения отсулает.
I am need help with my email script.
My email service works with the next settings
postfix via yandex SMTP. MRA - Mutt
messages from shell like this work great
echo "message" | mutt -s "header" [email protected]
my alert script:
!/bin/bash
to=$1
subject=$2
body=$3
cat <<EOF | echo "$body" | mutt -s "$subject" $to
EOF
If I run this script from shell like this
./script.sh $1 [email protected] $2 header $3 message
all work great. I reciave the message.
Zabbix dont send me any messages via this script. The actions, users, etc. all is fine in zabbix. I`m not a noody in it. The action gives me OK in Audit.
This is a creen
the permition rights for the script is 777
I have the alert script for the sms - he is working fine.
################################
Доброго дня , форумчане. Нужна помощь.
Система Ubuntu 13.04. Стоит zabbix сервер с postfix через SMTP Yandexa. Клиент - mutt. Из консоли и из скриптов - сообщения шлет на ура.
Сделал скрипт для заббикса (см. англ версию топика) - не работает. Причем в Аудите действий показывает. Что сообщение отослано. В логах postfix и mutt - ничего нет. Даже ошибок
Такой же скрипт, с такими же правами и владельцем (root), но для отправки SMS - работает нормально.
Подозреваю, что проблема именно в системе и скорее всего в правах. Поиграл с правами - ничего не выходит. ЗАшел под zabbix юзером - скрипт работает. Сообщения отсулает.
Comment