From 3e7efb888306ccd18d1023c8da0dc4fc8a54b789 Mon Sep 17 00:00:00 2001 From: Matt Simerson Date: Thu, 25 Apr 2013 21:40:09 -0400 Subject: [PATCH] summarize: strip out unprintable chars --- log/summarize | 2 ++ 1 file changed, 2 insertions(+) diff --git a/log/summarize b/log/summarize index 51270c3..ba82291 100755 --- a/log/summarize +++ b/log/summarize @@ -57,6 +57,7 @@ my %formats = ( check_badmailfrom => "%-3.3s", sender_permitted_from => "%-3.3s", resolvable_fromhost => "%-3.3s", + dont_require_anglebrackets => "%-3.3s", 'queue::qmail-queue' => "%-3.3s", connection_time => "%-4.4s", ); @@ -82,6 +83,7 @@ my %formats3 = ( while (defined(my $line = $fh->read)) { chomp $line; + $line =~ s/[^[ -~]]//g; # strip out binary/unprintable next if !$line; my ($type, $pid, $hook, $plugin, $message) = parse_line($line); next if !$type;