[Mimedefang] How do I remove infected attachments before bouncing mail (action_bounce)

George Kuetemeyer George.Kuetemeyer at mail.tju.edu
Fri Jun 6 14:49:00 EDT 2003


We're currently bouncing/rejecting infected mail using action_bounce. This
routine appears to send the entire message, including the virus-infected
attachment, back to the sender - which doesn't seem like a good thing to do.
Is there any way to remove infected parts before bouncing the message? We
tried using action_drop_with_warning, but this doesn't appear to modify the
message that gets bounced. Here's a listing of what we tried (within the
filter routine):

        my ($code, $category, $action) = entity_contains_virus($entity);
        if ($category eq "virus") {
            md_log('virus',$VirusName, $RelayAddr);

            # Remove offending part
            action_drop_with_warning("$VirusName infected part removed");

            # Bounce the mail!
            action_bounce("Virus $VirusName found in mail - rejected");

Actually, what we would really like to do is send back a warning notice and
simply discard infected messages. Has anyone developed code to do that? (Might
as well ask before doing my own coding).

Thanks in advance.

GK 

        



More information about the MIMEDefang mailing list