Package: munin-node Version: 1.2.6-10 Tags: patch The postfix_mailstats Munin plugin shows a number of causes of rejected e-mail messages, but does not show messages rejected by postfix rules in body_checks, header_checks or mime_header_checks.
The plugin looks for log lines produced by the qmgr and smtpd processes, but as of version 1.2.6 ignores lines produced by postfix/cleanup. A message (e.g. spam) rejected by body_checks will not produce a qmgr line, nor does it get rejected by smtpd. Thus the stacked total if seen as indicative of SMTP sessions may also be shown as misleadingly low. This was previously described as part of bug 302220 - there are example cleanup log lines there. Bug 302220 was only partly solved (the cleanup patch was not included), before being closed. I don't think the intention was ever to deliberately exclude rejection causes handled by the cleanup daemon, as seems to be implied by the changelog. Bug 302220 was reopened by Micah Anderson, but closed again. Hence I am submitting it as a new bug. The patch I've been using on a live mail server for the past 2 years (against version 1.2.5-1 with postfix 2.3.8-2+etch1) is: @@ -138,14 +140,10 @@ } while (<IN>) { - if (/^(\d+):(\d+)$/) + if (/^([0-9a-z.\-]+):(\d+)$/) { $rejects->{$1} = $2; } - elsif (/^OTHER:(\d+)$/) - { - $rejects->{OTHER} = $1; - } } close IN; } @@ -233,11 +231,10 @@ { $delivered++; } - elsif ($line =~ /postfix\/smtpd.*reject: \S+ \S+ \S+ (\S+)/) + elsif ($line =~ /postfix\/smtpd.*reject: \S+ \S+ \S+ (\S+)/ || + $line =~ /postfix\/cleanup.* reject: (\S+)/ ) { - my $cause = $1; - $cause = 'OTHER' unless $1 =/^\d+$/; - $rejects->{$cause} ++; + $rejects->{$1} ++; } } close(LOGFILE); -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org