On Monday 15 Dec 2003 7:46 pm, Johan wrote:
> Hi Derek,
> Thanks for a detailed explanation.
> Johan
> **************
> << snip >>
>
> > Personally I use clamdmail ( in contrib) which I call from procmail.
> > Clamdmail is a neat little utility which will call clamav virus
> > scanner, and spamassassin spam checker.
> >
> > derek


Do you mean you want a detailed explanation?

OK
urpmi clamdmail spamassassin clamav

check spamassassin service is running.

If you also 'urpmi clamd' then clam will run as a continuous service instead 
of being called up for each mail. This will be faster, but consume more 
resource.

In your ~/.procmailrc  config add a recipe like this :-

#Run ClamdMail
:0 fw 
| clamdmail  [EMAIL PROTECTED] --spam  --tnef --quar=~/Maildir/virus 
--mta=/usr/sbin/postfix 

* ^X-Spam-Flag: YES
$JUNKMAIL

where JUNKMAIL is a mail folder and ~/Maildir/virus is  a folder to hold virus 
infected mails.


When you install clamav it will automatically run a daily job to update the 
virus database.  (Make sure anacron is installed) This job will send you an 
error email even if it completes successfully. I found this annoying, and so 
edited /etc/cron.daily/freshclam like this :-

#!/bin/sh

# A simple update script for the clamav virus database. This could as well
# be replaced by a SysV script.

# fix log file if needed
LOG_FILE="/var/log/clamav/freshclam.log"
if [ ! -f ${LOG_FILE} ]; then
    touch $LOG_FILE
    chmod 644 $LOG_FILE
    chown clamav.clamav $LOG_FILE
fi

/usr/bin/freshclam \
    --quiet \
    --datadir=/var/lib/clamav \
    --log=$LOG_FILE \
    --log-verbose \
    --daemon-notify=/etc/clamav.conf 

es=$?
if [ $es="1" ]; then
        exit 0
    else
        exit $es    
fi




Useful links
http://clamav.sourceforge.net/
http://clamdmail.sourceforge.net/

derek



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to