Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Spamassassin going crazy
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
SweepingOar
Apprentice
Apprentice


Joined: 31 Dec 2003
Posts: 263
Location: LA

PostPosted: Sun Oct 09, 2005 1:21 am    Post subject: Spamassassin going crazy Reply with quote

I've been using Spamassassin for a few years and all has been well other than the daily spams that slip through and the occasional false positive. About a month ago I emerged rulesdujour and had some server generated emails dissappear so I unmerged it. The problem didn't go away so I did some reading and figured out how to whitelist. Now here is the problem... (by the way, I don't remember if this problem started before or after I installed or uninstalled rulesdujour or if it's been going on for a long time and I just never noticed): The server is getting completely bogged down by spamassassin processes. There are times when there aren't any running, but those times seem to be pretty rare. Most of the time there are about 10 of them running, each of which is taking up around 10% of the cpu. Here's a top:
Code:
top - 18:08:16 up 162 days, 17:51,  3 users,  load average: 12.02, 11.97, 11.79
Tasks: 113 total,  15 running,  97 sleeping,   0 stopped,   1 zombie
Cpu(s):  90.1% user,   9.9% system,   0.0% nice,   0.0% idle
Mem:    904040k total,   827548k used,    76492k free,   191244k buffers
Swap:  5879760k total,    33136k used,  5846624k free,   258072k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND           
24928 sweeper  16   0 22320  21m 1896 R  8.9  2.5   0:03.12 spamassassin       
24850 sweeper  14   0 33284  32m 2236 R  8.3  3.7   0:04.41 spamassassin       
24811 sweeper  14   0 35864  35m 2236 R  7.9  4.0   0:04.66 spamassassin       
24833 sweeper  14   0 34596  33m 2236 R  7.9  3.8   0:04.54 spamassassin       
24946 sweeper  14   0 22416  21m 1896 R  7.9  2.5   0:02.74 spamassassin       
24950 sweeper  14   0 22396  21m 1896 R  7.9  2.5   0:02.62 spamassassin       
24954 sweeper  14   0 22396  21m 1896 R  7.9  2.5   0:02.50 spamassassin       
24969 sweeper  14   0 22048  21m 1896 R  7.9  2.4   0:01.72 spamassassin       
24983 sweeper  14   0 12044  11m 1740 R  7.9  1.3   0:01.06 spamassassin       
24999 root      14   0  3456 3456 1748 R  6.3  0.4   0:00.19 portageq           
25000 sweeper  14   0   912  912  736 R  5.9  0.1   0:00.18 clamscan           
23858 apache    13   0  8052 6672 4016 R  3.0  0.7   0:01.39 apache2           
24538 apache     9   0  7608 6224 4004 S  1.0  0.7   0:00.99 apache2           
24963 victor     12   0  1072 1072  812 R  1.0  0.1   0:00.33 top               
24990 sweeper   9   0  1732 1732 1392 S  0.7  0.2   0:00.02 maildrop           
 1342 mysql      9   0 29416  22m  19m S  0.3  2.5  57:47.51 mysqld             
24988 sweeper   9   0   292  288  244 S  0.3  0.0   0:00.01 qmail-local       
24991 sweeper   9   0   916  916  800 S  0.3  0.1   0:00.01 clamassassin       
25001 mysql     12   0 29416  22m  19m R  0.3  2.5   0:00.01 mysqld             
    1 root       9   0   492  492  440 S  0.0  0.1   1:30.11 init               
    2 root       9   0     0    0    0 S  0.0  0.0   0:00.06 keventd           
    3 root      19  19     0    0    0 S  0.0  0.0   0:02.79 ksoftirqd_CPU0


Does anyone know what I should do? Thanks!
_________________
-SweepingOar
Back to top
View user's profile Send private message
Janne Pikkarainen
Veteran
Veteran


Joined: 29 Jul 2003
Posts: 1143
Location: Helsinki, Finland

PostPosted: Sun Oct 09, 2005 6:45 am    Post subject: Reply with quote

At least regular expressions can cause all kinds of starvation. If you have lots of some custom rulesets like ".*@domain.com", they may be the root of your problem.

Also, have you started spamd in debug mode? In debug mode spamd shows you pretty detailed view about what it does, so you may see what's going on under the hood. Start spamd with -D switch.
_________________
Yes, I'm the man. Now it's your turn to decide if I meant "Yes, I'm the male." or "Yes, I am the Unix Manual Page.".
Back to top
View user's profile Send private message
SweepingOar
Apprentice
Apprentice


Joined: 31 Dec 2003
Posts: 263
Location: LA

PostPosted: Sun Oct 09, 2005 10:01 am    Post subject: Reply with quote

I'm actually a newbie and don't even know how to check which rules are being used. There are two folders so far that I've found with rules in them. Also I'm running spamassassin and not spamd. Is it difficult to use spamd instead of spamassassin? My understanding is that spamassassin uses perl so is slightly less efficient than the spamd / spamc combo. Thanks.
_________________
-SweepingOar
Back to top
View user's profile Send private message
SweepingOar
Apprentice
Apprentice


Joined: 31 Dec 2003
Posts: 263
Location: LA

PostPosted: Mon Oct 10, 2005 7:33 pm    Post subject: Reply with quote

Ok, after doing some reading I'm hoping that this might help the problem. Instead of running spamassassin, I'm going to try the client server version spamd/spamc. The way we've got things set up is to have spamassassin getting called by mailfilter because qmail-scanner was too hard to set up. Is it possible to replace this line in .mailfilter:

xfilter "/usr/bin/spamassassin"

with:

xfilter "/[path]/spamc"

and keep spamd running of course.

Will that work? Thanks.
_________________
-SweepingOar
Back to top
View user's profile Send private message
Janne Pikkarainen
Veteran
Veteran


Joined: 29 Jul 2003
Posts: 1143
Location: Helsinki, Finland

PostPosted: Tue Oct 11, 2005 7:19 am    Post subject: Reply with quote

SweepingOar wrote:
Ok, after doing some reading I'm hoping that this might help the problem. Instead of running spamassassin, I'm going to try the client server version spamd/spamc. The way we've got things set up is to have spamassassin getting called by mailfilter because qmail-scanner was too hard to set up. Is it possible to replace this line in .mailfilter:

xfilter "/usr/bin/spamassassin"

with:

xfilter "/[path]/spamc"

and keep spamd running of course.

Will that work? Thanks.


That should work ok.
_________________
Yes, I'm the man. Now it's your turn to decide if I meant "Yes, I'm the male." or "Yes, I am the Unix Manual Page.".
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum