Koozali.org: home of the SME Server

Problems with clamav and "malformed database"

Offline purpaboo

  • ***
  • 48
  • +0/-0
    • http://www.kush-t.co.uk
Problems with clamav and "malformed database"
« on: April 01, 2008, 01:53:45 PM »
Hi

I've had issues with sending mail over the last 18 hours or so, and managed to track the problem down to clamav (I think).

The problem seems to be a corrupt clamav database.

I'd log this in the bug tracker, but while my email is down I can't create a login.

Here's what I get when I try to restart clamav. Any tips appreciated:

Code: [Select]
[root@www ~]# /etc/init.d/clamd restart
Stopping Clam AntiVirus Daemon:                            [  OK  ]
Starting Clam AntiVirus Daemon: clamd daemon 0.91.2 (OS: linux-gnu, ARCH: i386, CPU: i386)
Running as user clamav (UID 407, GID 402)
Log file size limited to 1048576 bytes.
Reading databases from /var/clamav
Not loading PUA signatures.
LibClamAV Error: Empty database file
LibClamAV Error: Can't load /var/clamav/daily.inc/daily.zmd: Malformed database
ERROR: Malformed database


Thanks

Pete

Offline purpaboo

  • ***
  • 48
  • +0/-0
    • http://www.kush-t.co.uk
Re: Problems with clamav and "malformed database"
« Reply #1 on: April 01, 2008, 02:30:31 PM »
Digging further, how can I stop clamd?

What process calls clamd?

Thanks

Pete

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Problems with clamav and "malformed database"
« Reply #2 on: April 01, 2008, 03:04:18 PM »
Here's what I get when I try to restart clamav. Any tips appreciated:

In SME server, clamd is a supervised service. You can stop it via:

sv d /service/clamd

and start it via:

sv u /service/clamd.

Do not use /etc/rc.d/init.d/clamd.

I'd suggest you read the Developers Guide to learn more about SME server internals.

Offline purpaboo

  • ***
  • 48
  • +0/-0
    • http://www.kush-t.co.uk
Re: Problems with clamav and "malformed database"
« Reply #3 on: April 01, 2008, 03:22:16 PM »
Thanks for your help Charlie. Much appreciated.

I've had a look through the developer's guide and can't find any reference to using "sv u" or "sv d" and very little reference to clamav at all.