I appear to have built this properly...but it is discarding the email instead of stipping off the virus and notifying the recipient...

I copied the example from one of the web pages and here is the relevant part of mimedefang-filter:


# test for CLAMD sub filter_begin () {

my ($code, $category, $action) = message_contains_virus_clamd();

if ($category eq 'virus' and $VirusName ne 'Eicar-Test-Signature') {

$FoundVirus = 1;

action_change_header('Subject', '*** VIRUS *** ' . $Subject);
action_delete_all_headers('X-Virus-Status');
action_add_header('X-Virus-Status', "Yes, name=$VirusName");

} elsif ($category ne 'ok') {

md_syslog('err',
"$QueueID: clamd error: code=$code, category=$category, action=$action");
action_tempfail("error: problem running virus scanner");
return;

}

}

sub filter ($$$$) {
my ($entity, $fname, $ext, $type) = @_;
return if message_rejected();

if ($FoundVirus) {
my ($code, $category, $action);
$VirusScannerMessages = "";

($code, $category, $action) = entity_contains_virus_clamd($entity);

if ($category eq "virus") {
return action_drop_with_warning(
"Dropped $fname ($type) containing virus $VirusName.");

} elsif ($category ne 'ok') {

md_syslog('err',
"$QueueID: clamd error: code=$code, category=$category, action=$action"
);
action_tempfail("error: problem running virus scanner");
return;

}
}

}

# END CLAMD TEST

..I didnt change anything else in the default mimedefang-filter and think I need to do that, but dont know what to comment out?

Ideally, I would like the program to scan ANY attachments and if clean indicate that on the X- header and if a virus, remove the attachment but yet tell the actual recipient....

Can anyone help me point to what I need to do?

..since it does drop the virus, I feel confident that I have the clam program built fine and running well and have MIMEDefang correctly using it at least.

- Thanks!





--
J.D. Bronson
Aurora Health Care // Information Services // Milwaukee, WI USA
Office: 414.978.8282 // Email: [EMAIL PROTECTED] // Pager: 414.314.8282

_______________________________________________
Visit http://www.mimedefang.org and http://www.canit.ca
MIMEDefang mailing list
[EMAIL PROTECTED]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

Reply via email to