ちなみにmailq に溜っていた理由は不明。
returns.yahoogroups.jp
とか、
hogehoge-bounces@hogehoge.edu
とかが多いな。
Mac の update の後に、postfixのmain.cf を元に戻す script も作るか...
#!/usr/bin/perl
open(Mail, "mailq |");
while(<Mail>) {
# BFA891CB1425* 910 Tue Jun 8 10:56:56 hogehoge@ie.u-ryukyu.ac.jp
my($id,$q,$day,$month,$day,$time,$mail) = split;
next if($mail !~ "@");
$hist{$mail}++;
}
my $sum;
my $count = keys %hist;
foreach my $key ( sort { $hist{$a} <=> $hist{$b} } keys %hist ) {
$sum += $hist{$key};
next if ($count-- > 50);
print " $hist{$key} $key\n";
}
print "Total $sum\n";
No comments:
Post a Comment