[Mimedefang] received headers ofuscation
ulver
ulver.woeman at gmail.com
Fri Nov 20 14:53:59 EST 2009
i've these code in the sub_filter, the idea is simple, replace
all stuff beetween ( ) [yeah could b capable of improvement] and adyacent spaces, ex (8.13.2) or (Postfix)
the replacement works...i wrote some dump files with the contents of
the vars and the replacent was succesfull, but in the ./HEADERS file
it remains the complete received headers (configuring mimedefang to don't delete the workfiles)
and looking it afterwards
if ( -e "./HEADERS" ) {
%Header = '';
if (open(IN,"<./HEADERS")) {
while(<IN>) {
chomp;
if (/^(\S+): (.*)/) {
my $label = $1;
my $data = $2;
$label = lc($label);
$Header{$label} = $data;
if ($label eq 'received') {
$data =~ s/(\s\(.*\)\s)/ /g;
push(@Received,$data);
}
}
}
}
close(IN);
}
More information about the MIMEDefang
mailing list