--- /usr/sbin/exiqgrep 2007-01-13 14:53:15.000000000 +0100 +++ /var/tmp/exiqgrep 2008-01-11 08:48:28.000000000 +0100 @@ -106,7 +106,26 @@ # Increment message counter. $count++; } else { - print STDERR "Line mismatch: $line\n"; exit 1; + if ($line =~ /^\s*(\w+)\s+(\w{6}-\w{6}-\w{2})\s+(<.*?>)/) { + my $msg = $2; + $id{$msg}{age} = $1; + $id{$msg}{size} = "0K"; + $id{$msg}{from} = $3; + $id{$msg}{birth} = &msg_utc($msg); + $id{$msg}{ages} = time - $id{$msg}{birth}; + if ($line =~ /\*\*\* frozen \*\*\*$/) { + $id{$msg}{frozen} = 1; + } else { + $id{$msg}{frozen} = 0; + } + while( =~ /\s+(.*?\@.*)$/) { + push(@{$id{$msg}{rcpt}},$1); + } + # Increment message counter. + $count++; + } else { + print STDERR "Line mismatch: $line\n"; exit 1; + } } } close(QUEUE) or die("Error closing pipe: $!\n");