I had exactly the same problem on my corporate mail gateways I look after, these boxes run RHEL4 & Postfix/MailScanner/ClamAV. Each time I had even a small sized message come in, the CPU usage shot up to 95% plus, (on a 2.8GHz Xeon), the culprit was clamav.
It would seem that there is a large CPU overhead in calling ClamAV to scan individual messages, the solution is to use ClamAV in daemon (clamd) mode.
To do this, you will need to upgrade to MailScanner 4.61 as this supports clamd as a virus scanning option, then reconfigure ClamAV to run in daemon mode, and reconfigure MailScanner to use clamd instead of clamav, make sure clamd is started and that should be it.
As far as I can remember, the MailScanner.conf file has some self explanatory information on configuring MailScanner to use clamd instead of clamav. The clamav website should be able to help with the clamd side of things.
Hope this is of some help to you and it helps you fix the problem. It dramatically reduced the overhead on my mail gateways and mail is flowing much quicker now.
|