#!/usr/bin/perl
$spamhome=$ENV{'SPAMHOME'};
$spamfile=$spamhome . "/spamout";

open FILE, "< $spamfile";
@it=();
while(<FILE>){
	chomp($_) ;
	push @it,$_;
	if ($_ =~ "^200.*\[.*\].*"){
		if ($_ =~ "SENT"){
			foreach $a (@it){
				printf "$a\n";
			}
		}
		splice(@it,0); 
	}
}

