Fix util_count_mail_in to update values for every supported plugins

This commit is contained in:
Daniel Berteaud 2016-04-20 14:34:24 +02:00
parent c481de7f61
commit 2a62a32732
2 changed files with 8 additions and 3 deletions

View File

@ -6,9 +6,7 @@ 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
for WHAT in $($BINDIR/util_parse_mail_in keys); do
$LOGTAIL $LOGFILE $TMPDIR/mail.in.$WHAT.offset | $PARSER $WHAT > $TMPDIR/mail.in.$WHAT
done

View File

@ -42,6 +42,13 @@ my %denied = (
);
my @others = qw(total_denied spam_denied other_denied spam_queued queued total);
# If arg is keys, just print the supported keys and exit
if ($what eq "keys"){
print join "\n", (keys %denied, @others);
exit (0)
}
my %cnt;
foreach (keys %denied, @others){
$cnt{$_} = 0;