#!/usr/bin/perl

use strict;
open F,"mailq |";

while (<F>) {
	if ( $_ =~ m/^......... (\S\S\S\S\S\S-\S\S\S\S\S\S-\S\S) <(.*)>.*$/ ) {
		print "queueid: ".$1."\tmailaddr: ".$2."\n";
	}
}
