[ SEA-GHOST MINI SHELL]
#!/bin/bash
if [[ $# -eq 0 ]] ; then
echo 'Plese provide log file path'
exit 1
fi
LOG=$1
EXIMSTATS=/usr/sbin/eximstats
ZABBIX_CONF=/etc/zabbix/zabbix_agentd.conf
TMP1=$(mktemp)
TMP2=$(mktemp)
$EXIMSTATS -t0 -nr -ne $LOG > $TMP1
echo -n > $TMP2
echo "\"-\" exim.received `grep -m 1 Received $TMP1|awk '{print $3}'`" >> $TMP2
echo "\"-\" exim.delivered `grep -m 1 Delivered $TMP1|awk '{print $3}'`" >> $TMP2
echo "\"-\" exim.rejects `grep -m 1 Rejects $TMP1|awk '{print $2}'`" >> $TMP2
/usr/bin/zabbix_sender -vv -c $ZABBIX_CONF -i $TMP2 > /dev/null 2>&1
rm $TMP1
rm $TMP2
SEA-GHOST - SHELL CODING BY SEA-GHOST