Fix util_count_mail_in to update values for every supported plugins
This commit is contained in:
parent
c481de7f61
commit
2a62a32732
|
@ -6,9 +6,7 @@ LOGFILE='/var/log/qpsmtpd/current'
|
||||||
TMPDIR='/var/lib/zabbix/tmp/'
|
TMPDIR='/var/lib/zabbix/tmp/'
|
||||||
|
|
||||||
|
|
||||||
for WHAT in dnsbl rhsbl clamav check_earlytalker check_basicheaders \
|
for WHAT in $($BINDIR/util_parse_mail_in keys); do
|
||||||
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
|
$LOGTAIL $LOGFILE $TMPDIR/mail.in.$WHAT.offset | $PARSER $WHAT > $TMPDIR/mail.in.$WHAT
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
|
@ -42,6 +42,13 @@ my %denied = (
|
||||||
);
|
);
|
||||||
|
|
||||||
my @others = qw(total_denied spam_denied other_denied spam_queued queued total);
|
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;
|
my %cnt;
|
||||||
foreach (keys %denied, @others){
|
foreach (keys %denied, @others){
|
||||||
$cnt{$_} = 0;
|
$cnt{$_} = 0;
|
||||||
|
|
Loading…
Reference in New Issue