<div dir="ltr">What about this code:<div><br></div><div><div> # if quick mode is disabled then consider clamav heuristic</div><div>    if (my $hit = $queue->{clamav_heuristic} && !$enable_quick_av_mode ) {</div><div>        my $score = $queue->{clamav_heuristic_score};</div><div>        my $descr = "ClamAV heuristic test: $hit";</div><div>        my $rule = 'ClamAVHeuristics';</div><div>        $sa_score += $score;</div><div>        $list .= $list ? ",$rule" : $rule;</div><div>        push @$sa_scores, { score => $score, rule => $rule, desc => $descr };</div><div>    }</div><div><br></div><div>   # do not run SA if avast have found virus</div><div>   if (  ($queue->{vinfo_avast} ||  $queue->{vinfo_clamav} ) && $enable_quick_av_mode ) {</div><div>        my $score = 5 ;</div><div>        my $descr = "Virus Scanner Engines have found on or more viruses";</div><div>        my $rule = 'AV_Virus_Found';</div><div>        $sa_score += $score;</div><div>        $list .= $list ? ",$rule" : $rule;</div><div>        push @$sa_scores, { score => $score, rule => $rule, desc => $descr };</div><div>   }</div></div><div><br></div><div>Basically:</div><div><br></div><div>1) add enable_quick_av_mode (1|0)</div><div>2) when is 0 then all works as before: heuristic clamav is detected</div><div>3) when is 1 and clam or avast found virus AND quick_av_mode is 1 score is set to 5 which disable the sa scan </div><div><br></div><div>Thx </div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 18, 2018 at 10:17 AM, Dietmar Maurer <span dir="ltr"><<a href="mailto:dietmar@proxmox.com" target="_blank">dietmar@proxmox.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">> Seems that the sa scan is not triggered ony if clamav heuristic is in place.<br>
> I've added something like just before the if :<br>
> <br>
> <br>
>    if (  $queue->{vinfo_avast} ) {<br>
>         my $score = 5 ;<br>
>         my $descr = "Avast Virus: 1";<br>
>         my $rule = 'AvastVirusFound';<br>
>         $sa_score += $score;<br>
>         $list .= $list ? ",$rule" : $rule;<br>
>         push @$sa_scores, { score => $score, rule => $rule, desc => $descr<br>
> };<br>
>    }<br>
> <br>
> And in this way when avast found eicar the spam scan is not triggered and<br>
> the only rule found is AvastVirusFound.<br>
<br>
</span>You could simply add:<br>
<br>
            return undef if $queue->{vinfo};<br>
<br>
but this also skips user blacklist/whitelist, so the whole rule systems does not<br>
work<br>
as expected in that case ...<br>
<div class="HOEnZb"><div class="h5"><br>
______________________________<wbr>_________________<br>
pmg-devel mailing list<br>
<a href="mailto:pmg-devel@pve.proxmox.com">pmg-devel@pve.proxmox.com</a><br>
<a href="https://pve.proxmox.com/cgi-bin/mailman/listinfo/pmg-devel" rel="noreferrer" target="_blank">https://pve.proxmox.com/cgi-<wbr>bin/mailman/listinfo/pmg-devel</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Got problems with Windows? - ReBooT<br>Got problems with Linux? - Be RooT </div>
</div>