[Mimedefang] Block all DOS EXEs
Frank Doepper
mimedefang at taz.de
Wed Jul 2 11:29:00 EDT 2003
Hi,
FYI, here you can see how I block all EXE attachments not by name, but by
content. Within filter():
if ($type ne "text/plain") {
my $body=$entity->bodyhandle;
if ($body) {
my $B=$body->open("r");
my $exe="";
$B->read($exe,2);
$B->close;
if ($exe eq "MZ") {
md_log("EXE",$fname,$RelayAddr);
return action_bounce("Mail rejected: DOS EXEcutable found.");
}
}
}
--
Frank Doepper taz-EDV +49-30-25902-307
More information about the MIMEDefang
mailing list