LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 06-24-2007, 10:11 AM   #1
mrlucio79
Member
 
Registered: Jun 2003
Posts: 55

Rep: Reputation: 15
Question Mailscanner Taking to long to Process Incoming Email


Hello Everyone,
I currently have the current setup:

Fedora Core 5
MailScanner
Spamassassin
ClamAV

All Messages are forwarded to my internal exchange server. I noticed that all messages are taking at least 250 seconds or more to process:

Jun 24 09:57:20 localhost MailScanner[9392]: Batch (1 message) processed in 277.04 seconds
Jun 24 09:57:36 localhost MailScanner[9155]: Batch (1 message) processed in 273.49 seconds
Jun 24 09:57:46 localhost MailScanner[9160]: Batch (1 message) processed in 269.35 seconds

This all started after a couple of weeks when I created a cron job to learn spam every 8 hours:

user --showdots --mbox --spam /var/mail/usermailbox

I since then disabled the cron job and now I want to lower the process time. Your help is appreciated.
 
Old 06-24-2007, 10:50 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,470
Blog Entries: 54

Rep: Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901
Your SA database is OK? Tried (backing up and) rebuilding the database? Anything got upgraded in the mean time? Any (seemingly unrelated) errors in application or system logs?
 
Old 06-24-2007, 11:21 AM   #3
mrlucio79
Member
 
Registered: Jun 2003
Posts: 55

Original Poster
Rep: Reputation: 15
Found the culprit. It was the ClamAV slowing down the flow of email. It was spiking my cpu 100%. THis system has not been touched for about a month. I wonder why that would start? Any ideas?
 
Old 06-24-2007, 11:45 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,470
Blog Entries: 54

Rep: Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901
I don't know for sure if it's a recent change or not because I didn't check before but I recently ran some AV scans (scanning malware while working on Rootkit Hunter's 'suspscan') and I found ClamAV was busy for ages unpacking its own signature databases before it started to scan. Maybe not the same as with the daemonized scanner, but if the process doesn't keep its db's open in memory (what one could maybe expect) then this will kill performance each time it starts up.
 
Old 07-15-2007, 06:20 PM   #5
RJ76
LQ Newbie
 
Registered: Sep 2004
Location: UK
Distribution: RHEL 4; RHEL 5; CentOS 4; Slackware 10.2
Posts: 28

Rep: Reputation: 15
Lightbulb

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.
 
  


Reply

Tags
clam, clamav, mailscanner


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Filesystem check taking TOO LONG springshades Mandriva 2 08-10-2005 02:02 AM
Hotplug is taking so long longnam Slackware 3 03-28-2005 08:16 AM
Why is Resolving taking so long? DevilDust Linux - Networking 11 08-08-2004 11:55 PM
why is x taking so long to get desktop up camp freddie Debian 5 05-15-2004 06:58 AM
Seriously this is taking a long time!! Omega Linux - Newbie 13 04-25-2003 05:46 AM


All times are GMT -5. The time now is 09:11 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration