Dennis Peterson escreveu:
Eduardo Reitz wrote:
Hello All,

I have ClamAV+Spamassassin+Postfix in a Debian.

The problem is that I have a lot of clamscan process and they consume to
much cpu and memory of the machine (I have 900M in RAM and 2CPU of 2G).



I'm no expert, but the last thing in the world I'd use for scanning email is clamscan. Each time it's called it has to load all the pattern files then scan what ever file/directory you've told it to scan. If you get 20,000 messages/hour that's a lot of startup costs.

Using clamdscan is more efficient because it uses a running instance of clamd and so already has loaded all the patterns. Even more efficient is to extract any suspicious attachment to a temp file area and call clamd directly via Unix socket or tcp/ip socket, and tell it where to find the file(s) to scan. I don't know if this is possible in Postfix or not as I gave up on it some weeks ago, but certainly in the Sendmail world this is trivial.


How are you calling clamav from postfix ???? If you're seeing 'a lot of clamscan process', then i'll suppose you're NOT using amavisd. And then i will strongly recommend that you use it. You can call clamd as well as spamassassin from amavisd and can also set a LOT of other content filter rules on that. You can also set the max number of processes amavisd can run, so it wont kill your machine altough it can get its usage very high. It's up to you decide what's high usage and what's killing usage.

http://www.ijs.si/software/amavisd/

--


        Atenciosamente / Sincerily,
        Leonardo Rodrigues
        Solutti Tecnologia
        http://www.solutti.com.br

        Minha armadilha de SPAM, NÃO mandem email
        [EMAIL PROTECTED]
        My SPAMTRAP, do not email it




_______________________________________________
http://lurker.clamav.net/list/clamav-users.html

Reply via email to