MS, clam, sanesecurity sigs

Jethro R Binks jethro.binks at strath.ac.uk
Tue Mar 17 20:44:44 GMT 2009


Caveat: I use clamd called directly from the MTA at SMTP-time, not within 
MailScanner.

On Tue, 17 Mar 2009, Jeff A. Earickson wrote:

> I'm trying to get the sanesecurity.co.uk unofficial clam sigs rolled 
> into my MailScanner/clamd setup.  I downloaded script 2 from 
> sanesecurity, and went to work.  The conf file for it wants to know this 
> setting:
> 
>   # Set path to ClamAV database files location.  If unsure, check
>   # your clamd.conf file for the "DatabaseDirectory" path setting.
>   clam_dbs="/opt/clamav/share/clamav"
> 
> Being unsure, I looked at my clamd.conf file and found the 
> DatabaseDirectory entry commented out:
> 
>   # Path to the database directory.
>   # Default: hardcoded (depends on installation options)
>   #DatabaseDirectory /var/lib/clamav
> 
> So I guessed that this setting might be buried in MailScanner someplace,
> but I can't find it.  Any idea what MailScanner thinks it is?

clamd will use the setting given in that DatabaseDirectory, if not set 
then presumably it has a default (which is probably that commented out 
one).  To find out, set "Debug yes" in clamd.conf, start it, and look for 
a line like:

LibClamAV debug: Loading databases from /var/db/clamav

Once you've worked out what that is, and set it to whatever value you want 
it to be, you need to make sure that both the sanesecurity script and 
MailScanner are also told the same location in their respective configs.  
You should probably not rely on a default, and explicitly set it 
everywhere.

>   Virus Scanners = clamd sophos
>   Monitors for ClamAV Updates = /opt/clamav/share/clamav/*.cld /opt/clamav/share/clamav/*.cvd
>   ClamAVmodule Maximum Recursion Level = 8
>   ClamAVmodule Maximum Files = 1000
>   ClamAVmodule Maximum File Size = 20971520 # (20 Mbytes)
>   ClamAVmodule Maximum Compression Ratio = 250

If you are using clamd, presumably the ClamAVmodule settings are 
irrelevant, although there are some equivalent settings in clamd.conf that 
you might want to check.

> My clam database files are in /opt/clamav/share/clamav.  Should the 
> mbl-dbs, msrbl-dbs, si-dbs, and similiar directories end up in the same 
> spot, or can they be elsewhere?

MSRBL-Images.hdb etc also go into the same directory.  I'm not sure if you 
can configure clamd to look in different places.  No need to keep them 
separate really.

> Any hints on how to get sanesecurity to join in with MailScanner?

As long as you've made sure all the settings are consistent, it shouldn't 
be difficult.

Jethro.

.  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .
Jethro R Binks
Computing Officer, IT Services, University Of Strathclyde, Glasgow, UK


More information about the MailScanner mailing list