<div dir="ltr"><div><br></div><div>Hi,</div><div><br></div><div>Please see this output. It seems to work.</div><div><br></div><div>[root@mailgw ~]# /opt/kaspersky/klms/bin/kavscanner /tmp/eicar_com.zip</div><div><br>Kaspersky Anti-Virus On-Demand Scanner.<br>Copyright (C) Kaspersky Lab, 1997-2012.<br>There are 21371737 records loaded, the latest update 23-05-2023<br>Config file: /etc/opt/kaspersky/klms/kavscanner_defaults.conf<br>/tmp/eicar_com.zip Archive ZIP<br>/tmp/eicar_com.zip//<a href="http://eicar.com">eicar.com</a> INFECTED EICAR-Test-File<br></div><div><br></div><div><br></div><div>in /etc/amavisd/amavisd.conf, I now only enabled Kaspersky and disabled clamav. </div><div>please see below.</div><div><br></div><div>@av_scanners = (<br></div><div><br></div><div>['Kaspersky Security 8.0 for Linux Mail Server',<br>\&ask_daemon, ["nCONTSCAN {}\n", "/var/run/klms/rds_av"],<br>qr/\bOK$/m, qr/\bFOUND$/m,<br>qr/^.*?: (?!Infected Archive)(.*) FOUND$/m ],<br></div><div><br></div><div> ### <a href="http://www.clamav.net/">http://www.clamav.net/</a><br>## ['ClamAV-clamd',<br>## \&ask_daemon, ["CONTSCAN {}\n", "/run/clamd.amavisd/clamd.sock"],<br>## qr/\bOK$/m, qr/\bFOUND$/m,<br>## qr/^.*?: (?!Infected Archive)(.*) FOUND$/m ],<br></div><div><br></div><div>and </div><div><br></div><div>@av_scanners_backup = (<br><br> ### <a href="http://www.clamav.net/">http://www.clamav.net/</a> - backs up clamd or Mail::ClamAV<br>## ['ClamAV-clamscan', 'clamscan',<br>## "--stdout --no-summary -r --tempdir=$TEMPBASE {}",<br>## [0], qr/:.*\sFOUND$/m, qr/^.*?: (?!Infected Archive)(.*) FOUND$/m ],<br></div><div><br></div><div>Now Kaspersky Security is only running as primary. please see below</div><div><br></div><div> amavis[15811]:Using primary internal av scanner code for Kaspersky Security 8.0 for Linux Mail Server<br></div><div><br></div><div>Here I send a mail</div><div><br></div><div>[root@mailgw ~]# mail -a /tmp/eicar_com.zip root<br>Subject: test<br>.<br>EOT<br>Null message body; hope that's ok<br></div><div><br></div><div>and see the output of tail -f /var/log/mail.log</div><div><br></div><div>amavis[15814]:(15814-01) Blocked INFECTED (EICAR-Test-File) {DiscardedInbound,Quarantined},<br></div><div><br></div><div>Kaspersky seems to work. </div><div><br></div><div>Your ideas are welcome. </div><div><br></div><div><br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jun 6, 2023 at 11:44 AM Olivier <<a href="mailto:Olivier.Nicole@cs.ait.ac.th">Olivier.Nicole@cs.ait.ac.th</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Indunil,<br>
<br>
> I attached a test EICAR file. ClamAV detected. But Kaspersky did NOT.<br>
><br>
> See the log of how clamd detected.<br>
><br>
> clamd<br>
> [1300]:/var/spool/amavisd/tmp/amavis-20230604T171813-16458-RYQrx2PC/parts/p003:<br>
> Win.Test.EICAR_HDB-1 FOUND<br>
><br>
> Primary AV is Kaspersky Security. Please see below.<br>
><br>
> amavis[16978]:Using primary internal av scanner code for Kaspersky Security<br>
> 8.0 for Linux Mail Server<br>
> amavis[16978]:Using primary internal av scanner code for ClamAV-clamd<br>
> amavis[16978]:Found secondary av scanner ClamAV-clamscan at<br>
> /usr/bin/clamscan<br>
<br>
Can you confirm that Kaspersy is working: save the message with EICAR in<br>
a file and submit that file to Kaspersky manually.<br>
<br>
Amavis may need some tweaking to be able to recognise the error message<br>
returned by Kaspersky.<br>
<br>
Best regards,<br>
<br>
Olivier<br>
<br>
><br>
> Hope to hear from you.<br>
><br>
> On Tue, May 23, 2023 at 12:58 PM Matus UHLAR - fantomas<br>
> <<a href="mailto:uhlar@fantomas.sk" target="_blank">uhlar@fantomas.sk</a>> wrote:<br>
><br>
> On 22.05.23 08:33, Indunil Jayasooriya wrote:<br>
> >Has anyone integrated Kaspersky Security with amavis?<br>
> ><br>
> >This is the url I followed.<br>
> ><br>
> ><a href="https://support.kaspersky.com/KLMS/8.2/en-US/62460.htm" rel="noreferrer" target="_blank">https://support.kaspersky.com/KLMS/8.2/en-US/62460.htm</a><br>
> ><br>
> >I did it. But I get below erros.<br>
> ><br>
> >2023 May 22 08:04:56 server amavis[1769]:(01769-04) (!)connect to<br>
> >/var/run/klms/rds_av failed, attempt #1: Can't connect to a UNIX socket<br>
> >/var/run/klms/rds_av: Permission denied<br>
> >2023 May 22 08:04:57 server amavis[1769]:(01769-04) (!)Kaspersky<br>
> Security<br>
> >8.0 for Linux Mail Server: All attempts (1) failed connecting to<br>
> >/var/run/klms/rds_av, retrying (2)<br>
> ><br>
> >2023 May 22 08:11:57 server amavis[1768]:(01768-05) (!)Kaspersky<br>
> Security<br>
> >8.0 for Linux Mail Server av-scanner FAILED: run_av error: Too many<br>
> retries<br>
> >to talk to /var/run/klms/rds_av (All attempts (1) failed connecting to<br>
> >/var/run/klms/rds_av) at (eval 132) line 659.\n<br>
> ><br>
> >Here is the permission.<br>
> ><br>
> >ls -al /var/run/klms/rds_av<br>
> >srw-rw---- 1 kluser klusers 0 May 17 01:35 /var/run/klms/rds_av<br>
><br>
> you must have read/execure permissions for /var/run/klms/ directory too.<br>
> Run:<br>
><br>
> ls -la /var/run/klms/<br>
><br>
> >some additional info.<br>
> ><br>
> ># id amavis<br>
> >uid=996(amavis) gid=993(amavis) groups=993(amavis),991(klusers)<br>
><br>
> this should help if the /var/run/klms/ has 'rx' permissions for group <br>
> klusers.<br>
><br>
> -- <br>
> Matus UHLAR - fantomas, <a href="mailto:uhlar@fantomas.sk" target="_blank">uhlar@fantomas.sk</a> ; <a href="http://www.fantomas.sk/" rel="noreferrer" target="_blank">http://www.fantomas.sk/</a><br>
> Warning: I wish NOT to receive e-mail advertising to this address.<br>
> Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu<br>
> postu.<br>
> "The box said 'Requires Windows 95 or better', so I bought a Macintosh".<br>
<br>
-- <br>
</blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr">cat /etc/motd<br><br>Thank you<br>Indunil Jayasooriya <br><a href="http://www.theravadanet.net/" target="_blank">http://www.theravadanet.net/</a><br><br></div></div></div></div>