mail::clamav 0.20 error - SOLVED

Andrei Ioachim andrei at inteligis.ro
Sat Mar 31 10:12:41 CEST 2007


Andrei Ioachim wrote:
> Hello,
>
> i've just moved from clamav to clamavmodule scanner
>
> mailscanner --debug is working ok, but when i start normally
> i get:
> ClamAV Module ERROR:: Could not load databases from 
> /opt/clamav/share/clamav
>
>
> it has something to do with multiple instances of mailscanner
>
> now i have Max Children = 0 in mailscanner.conf to get mailscanner to 
> work
>
> but i would like to use more children
>
>
>
>


i found the problem:
in check_mailscanner there is
# Make it run SpamAssassin out of tmpfs
if [ -d /dev/shm ]; then
  TMPDIR=/dev/shm
  export TMPDIR
fi

clamav uses TMPDIR variable to create temporary directory
so i commented out that code in check_mailscanner and now everything works

also i found that this was the problem by modifying SweepViruses.pm 
(this "patch" should be put in future MailScanner releases)
  $Clam = new Mail::ClamAV(Mail::ClamAV::retdbdir())
    or MailScanner::Log::DieLog("ClamAV Module ERROR:: Could not load " .
       "databases from %s - error: %s", Mail::ClamAV::retdbdir(), 
$Mail::ClamAV::Error);

(added "- error: %s" from $Mail::ClamAV::Error)

$Mail::ClamAV::Error errors should/could be put in other places for 
better debugging




More information about the MailScanner mailing list