You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by saqariden <sa...@ac-montpellier.fr> on 2018/02/21 15:11:33 UTC
action_drop_with_warning called outside of filter context
Hello,
We are running mimedefang with Spamassassin and Clamav to secure our
mailling server.
but actually, i have a probleme with mimedefang-filter. the following
error appear when a virus is detected:
mimedefang.pl[10245]: w1K87JOB027594: Detected virus
PUA.Win.Trojan.EmbeddedPDF-1
mimedefang.pl[10245]: w1K87JOB027594: action_drop_with_warning called
outside of filter context
then the attachment was not dropped.
here is my filter:
sub filter_begin {
my($entity) = @_;
if ($SuspiciousCharsInHeaders) {
md_graphdefang_log('suspicious_chars');
return action_discard();
}
md_copy_orig_msg_to_work_dir_as_mbox_file();
# Scan for viruses if any virus-scanners are installed
my($code, $category, $action) = message_contains_virus();
# Lower level of paranoia - only looks for actual viruses
$FoundVirus = ($category eq "virus");
# Higher level of paranoia - takes care of "suspicious" objects
# $FoundVirus = ($action eq "quarantine");
if ($FoundVirus) {
md_graphdefang_log('virus', $VirusName, $RelayAddr);
md_syslog('warning', "Detected virus $VirusName");
return action_drop_with_warning("An attachment of type $type,
named $fname was removed from this document as it\nconstituted$
}
the action discard work correctly but it's not what i'm looking for, i
want to drop just the infected file and make a warning on the email,
Please, how can i correct this? thank you.
Re: action_drop_with_warning called outside of filter context
Posted by Dianne Skoll <df...@roaringpenguin.com>.
Hi,
> mimedefang.pl[10245]: w1K87JOB027594: action_drop_with_warning called
> outside of filter context
> then the attachment was not dropped.
> here is my filter:
Please read mimedefang-filter man page very carefully.
Regards,
Dianne.