Penguin
Note: You are viewing an old revision of this page. View the current version.

Clamd dies at morning maintenance, Debian Woody (0.60-10, backported)

Sometimes, clamd dies during its morning maintenance. I've not found any rhyme or reason to this, however it's a pain for me as I use exim4 + exiscan, and this will stop delivering mail if it can't talk to its virus scanner. Bugger.

My current workaround: A cron script that checks to see if the socket is writeable, and if not it stops clamd, then starts it again.

  1. cat /etc/cron.d/check-clamd

TESTFILE="/var/run/clamd.ctl"

  • * * * * root [ -w $TESTFILE? || \

    (/etc/init.d/clamav-daemon stop; \ /etc/init.d/clamav-daemon start)

Yeah, I know this isn't the prettiest, but I don't have time to track down why its dying just yet -- DanielLawson

A similar script is available at http://mikecathey.com/code/clamdwatch/ and in the contrib/clamdwatch directory -- NERv

clamdscan can't read files (when run from amavis or some other scanner)

Jun 9 10:21:02 firewall amavis[17934?: (17934-02) Clam Antivirus-clamd FAILED - unknown status: /var/lib/amavis/amavis-msg-id/parts: Can't access the file ERROR

clamav-daemon runs as the 'clamav' user (on Debian/Woody anyway), and when amavis unpacks its email for scanning as the 'amavis' user. Add clamav to the amavis group, and restart the clamav daemon.

Another way around this is to run clamav and amavis as the same user. Apparently this change needs to be made for Conectiva Linux.

This worked on Debian with Exim4-daemon-heavy and clamav: find the user Exim runs as using "exim -bP exim_user", in my case Debian_exim. Edit /etc/clamav/clamav.conf to change its user to Debian_exim. Allow Debian_exim access to clamav's files: "adduser Debian_exim clamav". Finally, I had to "chmod /var/run/clamav g+w" for clamav to save its pid file.


CategoryMailNotes

The following authors of this page have not agreed to the WlugWikiLicense. As such copyright to all content on this page is retained by the original authors.
  • JorgeGodoy
  • MarcoVanDenHout
The following authors of this page have agreed to the WlugWikiLicense.

PHP Warning

lib/blame.php:177: Warning: Invalid argument supplied for foreach() (...repeated 2 times)

lib/plugin/WlugLicense.php:99: Warning: Invalid argument supplied for foreach()

lib/plugin/WlugLicense.php:111: Notice: Undefined variable: ignore_authors