Remove outdated virus/check_for_hi_virus plugin

This commit is contained in:
Ask Bjørn Hansen 2009-02-26 23:50:50 -08:00
parent afa7efb98d
commit b1cbe6a9be
3 changed files with 2 additions and 40 deletions

View File

@ -25,6 +25,8 @@
plugins/require_resolvable_fromhost: check all MX hosts, not just the first plugins/require_resolvable_fromhost: check all MX hosts, not just the first
remove outdated virus/check_for_hi_virus plugin
prefork, forkserver: restart on SIGHUP (reload all modules, with register() / prefork, forkserver: restart on SIGHUP (reload all modules, with register() /
init() phase). init() phase).

View File

@ -107,7 +107,6 @@ plugins/tls_cert
plugins/uribl plugins/uribl
plugins/virus/aveclient plugins/virus/aveclient
plugins/virus/bitdefender plugins/virus/bitdefender
plugins/virus/check_for_hi_virus
plugins/virus/clamav plugins/virus/clamav
plugins/virus/clamdscan plugins/virus/clamdscan
plugins/virus/hbedv plugins/virus/hbedv

View File

@ -1,39 +0,0 @@
#!/usr/bin/perl -w
sub hook_data_post {
my ($self, $transaction) = @_;
# make sure we read from the beginning;
$transaction->body_resetpos;
my $line_number = 0;
my $seen_file = 0;
my $ct_filename = '';
my $cd_filename = '';
while ($_ = $transaction->body_getline) {
last if $line_number++ > 40;
if (/^Content-Type: (.*)/) {
my $val = $1;
if ($val =~ /name="(.*?)"/) {
$seen_file = 1;
$ct_filename = $1;
}
}
if (/^Content-Disposition: (.*)/) {
my $val = $1;
if ($val =~ /filename="(.*?)"/) {
$seen_file = 1;
$cd_filename = $1;
}
}
}
if ($seen_file and $ct_filename and $cd_filename) {
if ($ct_filename ne $cd_filename) {
return (DENY, "Probably the 'Hi' virus");
}
}
return DECLINED;
}