dpkg -l |grep zabbix
ii zabbix-agent 1:2.4.4-1+wheezy amd64 network monitoring solution - agent
ii zabbix-frontend-php 1:2.4.4-1+wheezy all network monitoring solution - PHP front-end
ii zabbix-get 1:2.4.4-1+wheezy amd64 network monitoring solution - get
ii zabbix-server-mysql 1:2.4.4-1+wheezy amd64 network monitoring solution - server (using MySQL)
nano /usr/lib/zabbix/alertscripts/mail
#!/bin/bash
to=$1
subject=$2
body=$3
echo $1 $2 $3>/tmp/1
cat <<EOF | mail -s "$subject" "$to"
$body
EOF
После срабатывания действия появляется ожидаемый файл с ожидаемым содержимым файл, письмо приходит на почту, но:
- nano при открытии /tmp/1 говорит «преобразовано из формата Mac»;
- Тело письма приходит в base64 и становится вложением part.bin (см. ниже)
Return-Path: <zabbix@domain.ru>
Delivered-To: petav@domain.ru
Received: from zabbix?domain.ru (unknown [192.168.206.5])
(using TLSv1 with cipher AES128-SHA (128/128 bits))
(No client certificate requested)
(Authenticated sender: zabbix@domain.ru)
by mail.domain.com (Postfix) with ESMTPSA id 4E76623167
for <petav@domain.com>; Mon, 11 May 2015 00:01:34 +0300 (MSK)
Received: by zabbix@domain.ru (sSMTP sendmail emulation); Mon, 11 May 2015 00:01:34 +0300
From: zabbix@domain.ru
Date: Mon, 11 May 2015 00:01:34 +0300
To: petav@domain.com
Subject: PROBLEM: Disk I/O is overloaded on Zabbix server
User-Agent: Heirloom mailx 12.5 6/20/10
MIME-Version: 1.0
Content-Type: application/octet-stream
Content-Transfer-Encoding: base64
VHJsdfpZ2dllHR0VSLk5BTUUgVHJpZ2dlciBzdGF0dXMgVFJJR0TVEFUVVMNClRy
aWdnZXIgVFsdfsdFUi5OQU1FIFRyaWdnZXIgc3RhdHVzIFRSSUdHRVIuU1RBVFVTDQpUcmln
Z2VyIFRSSUdHRVIuTkBUcmlnZ2VyIXR1cyBUUklHR0VUQVRVUw0KVHJpZ2dl
ciBUUklHR0k5BTUUgVHJpZ2dlciBGF0dXMgVFJJRsdfsdi5TVsdsdsdfVVMNClRyaWdnZXIg
VFJJR0dFUi5OQU1RyaWdnZXIgc3RhdHVzIFdHRVIuU1RBVFVTCg==
Мнения!?