#!/bin/bash BINDIR='/var/lib/zabbix/bin' LOGTAIL=$BINDIR'/logtail.pl' PARSER=$BINDIR'/parse_mail_in.pl' LOGFILE='/var/log/qpsmtpd/current' TMPDIR='/var/lib/zabbix/tmp/' for WHAT in dnsbl rhsbl clamav check_earlytalker check_basicheaders \ check_goodrcptto check_spamhelo total_denied spam_denied \ other_denied spam_queued queued total; do $LOGTAIL $LOGFILE $TMPDIR/mail.in.$WHAT.offset | $PARSER $WHAT > $TMPDIR/mail.in.$WHAT done