Hi all, I posted a few days ago asking if anyone had a way of doing email virus scanning from procmail. I did some tinkering and I've managed to get it going, so I thought I'd let you all know how I did it.
So, first I downloaded clamav (urpmi clamav), then I ran freshclam to get a virus db. I wanted to run it out of my homedir so I had to do this: mkdir ~/.virus-sigs cp /var/lib/clamav/* ~/.virus-sigs freshclam --datadir=~/.virus-sigs/ That last one is the one that updates the virus db. I'll probably set that to run from cron. If there were more than me using this system I'd probably go with the centralised database, but for now that's fine. Then, there was a lot of tinkering with procmail, until I came up with this: CLAMAV=/usr/bin/clamscan :0ci: /home/james/.clam-lockfile | $CLAMAV --stdout --unzip=/usr/bin/unzip --mbox -d $HOME/.virus-sigs/ - > /dev/null :0e $MAILDIR.virii/ mind the linebreaks, but that's pretty much it. I'm no procmail ninja, and fate will probably make that delete thousands of very important emails immediately after I send this, but it might serve as a starting point for someone who knows more about this stuff. HTH, James. -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
