Kaspersky KLMS 8.0 and amavis - partial success...

Olivier Nicole Olivier.Nicole at cs.ait.ac.th
Tue Jun 24 04:44:12 CEST 2014


Jakob,

> I have been trying to integrate klms 8.0 into amavisd.  Up to now I 
> could not get the client-server version to work, so I tried to use the 

I get the client/server working with:

['Kaspersky Anti-Virus 8.0 for FS',
 '/usr/local/bin/kav4fs-control',
 '--scan-file {}',
 qr/\bThreats found:\s+0\b/m,
 qr/\bThreats found:\s+[1-9]\d*\b/m,
 /./
]

Admitedly, it's Kaspersky for Linux file server (my choice for a long
time since: 1) licences are calculated per server and not per mailbox 2)
I don't need all the fudge about integrating Kaspersky in my MTA as I
an using it with amavisd).

> command line scanner "kavscanner".
> To run this as user amavis (instead of kluser), I needed to
> 
> - adapt the owner and group of the logfile which is by default 
> /var/log/kaspersky/klms/kavscanner.log
> - adapt the owner of the socket file /var/run/klms/facade
> - set the user and group amavis instead of kluser in the app control 
> file /var/opt/kaspersky/apps/1463

I choose this approch as the way of changing amavid user:group is better
documented than the way of changing Kaspersky's.

In fact I aliased all the users, so the various install programs are
happy, they see the user they are used to work for, but in al resolves
to the same user.

> After these changes, I can use the kavscanner from the amavis user when 
> doing this on the command line.
> However, when called from amavisd, the same command does exit with
> 
>   run_av: /opt/kaspersky/klms/bin/kavscanner exit 50, Kaspersky 
> Anti-Virus On-Demand Scanner.\nCopyright (C) Kaspersky Lab, 
> 1997-2012.\n\rLoading bases error(Engine not ready)
> 
> which is the same error I get on the command line when the ownership of 
> /var/run/klms/facade is not set to user/group amavis.

That you get the same error message twice does not mean that it was
triggered by the same error :)

> What is the amavis daemon doing differently from the interactive user? 
> How can I find out more about the environment that amavisd creates? I 
> already used a test script that dumped me the environment; I did not 
> detect anything unusual there. I have the feeling I am missing something 
> small, but am not sure what it is.

Try to have a look at Kaspersky's log files too.

Best regards,

Olivier


More information about the amavis-users mailing list