Utterly Boring dot com

cPanel, ClamAV and MailScanner

This is totally for my information in the future, but might be useful to somebody.

I have MailScanner installed (via this great package) and ClamAV setup to scan mail that comes through this server. The problem is that lately, ClamAV was sucking up a lot of CPU power when scanning messages. After a ton of searching around on the cPanel forums, I basically came up with this solution which dropped my load considerably. But long story short, you're changing Mailscanner to use the clamavmodule virus scanner versus the clamav one.

  • Run these comments from the command line (if you don't know what they do, don't bother with this at all):
    up2date -i bzip2-devel
    up2date -i gdbm-devel
    /scripts/perlinstaller Mail::ClamAV
  • Edit your MailScanner.conf (probably in /usr/mailscanner/etc/MailScanner.conf). Look for "Virus Scanners = clamav" and change it to "Virus Scanners = clamavmodule".
  • Then run "killall MailScanner", wait a bit to make sure all the child processes are killed, and then "/usr/mailscanner/bin/check_mailscanner".
So far, the load on the server has gone down significantly (at least so far) and made pages load faster as now Apache and MySQL have more breathing room.

Posted by Jake on 05/17/07 @ 04:20 PM
Posted in Geekdom, Jake | Permalink

1 Trackback

Random cPanel Link Dump from UtterlyBoring.com on 06/24/07 @ 11:36 PM:
As I've mentioned before, I use cPanel on my Web server. I've posted links before for using clamavmodule in Mailscanner, completely removing boxtrapper, among a few other things. So here... (Read More)

What are you doing down here? Don't you have something better to do? Like Go Back To The Top of the page, or even see who created this site? This site is © 2001 - 2019 by the Utterly Boring folks at UtterlyBoring.com. Steal my content, as I probably did, too, just link to my site or the original site. Batteries not included. One size fits all. Not for off-road use. Not for internal use. Do not taunt Happy Fun Ball.