You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by FC Mario Patty <fc...@gmail.com> on 2008/03/12 03:31:43 UTC

SpamAssassin hogs the CPU

Guys,

I updated my spamassassin to SpamAssassin version 3.2.4 that running on Perl
version 5.8.5 in a hope that spamd wouldn't kill my CPU again. Once in
less-or-more an hour user cannot send email and have to wait until the
99.9%process finished. When I ran 'top' I got:

 PID    USER      PR  NI    VIRT     RES    SHR   S   %CPU   %MEM    TIME+
 COMMAND
1905   spamd      25   0    41984    35m    2828   R      99.9       1.8
  4:24.58       spamd

And when I tail-ed my /var/log/maillog I got:

Mar 12 09:05:10 mail spamd[1905]: spamd: identified spam (7.8/4.0) for
simscan:604 in *265.8 seconds*, 2820 bytes.
Mar 12 09:05:10 mail spamd[1905]: spamd: result: Y 7 -
AWL,BAYES_80,FH_HELO_EQ_D_D_D_D,HELO_DYNAMIC_IPADDR,
HTML_IMAGE_ONLY_24,HTML_MESSAGE,MIME_HTML_ONLY,MISSING_DATE,RCVD_IN_SORBS_DUL,RDNS_NONE,
SPF_SOFTFAIL,URIBL_AB_SURBL,URIBL_BLACK,URIBL_JP_SURBL,URIBL_OB_SURBL,URIBL_SBL,
URIBL_SC_SURBL,URIBL_WS_SURBL scantime=*265.8*
,size=2820,user=simscan,uid=604,required_score=4.0,rhost=mail.my-domain.com
,raddr=127.0.0.1,
rport=41698,mid=<
20080312075757.17432.qmail@ppp91-77-189-172.pppoe.mtu-net.ru>,bayes=0.918852
,autolearn=spam


FYI, I have this in my /etc/mail/spamassassin/local.cf:

required_score 4.0
use_pyzor       0
use_razor2      0

Is there anything that I shouldn't do with the filter? And if there was, how
should I do that? Thank you in advance for your help.

Regards,

Re: SpamAssassin hogs the CPU

Posted by Rubin Bennett <rb...@thatitguy.com>.
On Wed, 2008-03-12 at 09:31 +0700, FC Mario Patty wrote:
> Guys,
> 
> I updated my spamassassin to SpamAssassin version 3.2.4 that running
> on Perl version 5.8.5 in a hope that spamd wouldn't kill my CPU again.
> Once in less-or-more an hour user cannot send email and have to wait
> until the 99.9% process finished. When I ran 'top' I got:
> 
>  PID    USER      PR  NI    VIRT     RES    SHR   S   %CPU   %MEM
>  TIME+    COMMAND
> 1905   spamd      25   0    41984    35m    2828   R      99.9
> 1.8       4:24.58       spamd
> 
> And when I tail-ed my /var/log/maillog I got:
> 
> Mar 12 09:05:10 mail spamd[1905]: spamd: identified spam (7.8/4.0) for
> simscan:604 in 265.8 seconds, 2820 bytes.
> Mar 12 09:05:10 mail spamd[1905]: spamd: result: Y 7 -
> AWL,BAYES_80,FH_HELO_EQ_D_D_D_D,HELO_DYNAMIC_IPADDR,
> HTML_IMAGE_ONLY_24,HTML_MESSAGE,MIME_HTML_ONLY,MISSING_DATE,RCVD_IN_SORBS_DUL,RDNS_NONE,
> SPF_SOFTFAIL,URIBL_AB_SURBL,URIBL_BLACK,URIBL_JP_SURBL,URIBL_OB_SURBL,URIBL_SBL,
> URIBL_SC_SURBL,URIBL_WS_SURBL
> scantime=265.8,size=2820,user=simscan,uid=604,required_score=4.0,rhost=mail.my-domain.com,raddr=127.0.0.1,
> rport=41698,mid=<20...@ppp91-77-189-172.pppoe.mtu-net.ru>,bayes=0.918852,autolearn=spam
> 
> 
> FYI, I have this in my /etc/mail/spamassassin/local.cf:
> 
> required_score 4.0
> use_pyzor       0
> use_razor2      0
> 
> Is there anything that I shouldn't do with the filter? And if there
> was, how should I do that? Thank you in advance for your help.
> 
> Regards,
> 
> 
The first thing to do any time you're troubleshooting SpamAssassin is
run something through it with the -D flag set, and read the output, *all
of it*, very carefully.  There's a crapload of information in there and
it's easy to get overwhelmed by the sheer volume, but if you scroll
through it, the answer is very often right there in front of you.

For what it's worth, it smells very much like a networking or DNS issue
to me.

Good luck!

-- 
Rubin Bennett
rbTechnologies, LLC
rbennett@thatitguy.com
http://thatitguy.com
(802)223-4448

"Those who would give up essential liberty to purchase a little
temporary safety deserve neither liberty nor safety."
        -Ben Franklin, Historical Review of Pennsylvania, 1759


Re: SpamAssassin hogs the CPU

Posted by FC Mario Patty <fc...@gmail.com>.
Thank-you for the response. By the way, I don't use RBL checking, at least
in my /var/qmail/control/qmail-smtpd.rules. FYI, this is a qmail-ldap
installation with simscan, spamassassin, and clamav. Here a snip of my
qmail-smtpd.rules

127.:allow,RELAYCLIENT="",SMTPAUTH="",AUTHREQUIRED="",QMAILQUEUE="/var/qmail/bin/simscan"


Regards,


On Mon, Mar 17, 2008 at 5:09 PM, --[ UxBoD ]-- <ux...@splatnix.net> wrote:

> What RBL lookup lists are you using ?
>
> Regards,
>
> --
> --[ UxBoD ]--
> // PGP Key: "curl -s http://www.splatnix.net/uxbod.asc | gpg --import"
> // Fingerprint: F57A 0CBD DD19 79E9 1FCC A612 CB36 D89D 2C5A 3A84
> // Keyserver: www.keyserver.net Key-ID: 0x2C5A3A84
> // Phone: +44 845 869 2749 SIP Phone: uxbod@sip.splatnix.net
>
>

Re: SpamAssassin hogs the CPU

Posted by "--[ UxBoD ]--" <ux...@splatnix.net>.
What RBL lookup lists are you using ?

Regards,

-- 
--[ UxBoD ]--
// PGP Key: "curl -s http://www.splatnix.net/uxbod.asc | gpg --import"
// Fingerprint: F57A 0CBD DD19 79E9 1FCC A612 CB36 D89D 2C5A 3A84
// Keyserver: www.keyserver.net Key-ID: 0x2C5A3A84
// Phone: +44 845 869 2749 SIP Phone: uxbod@sip.splatnix.net

----- "FC Mario Patty" <fc...@gmail.com> wrote:

> Guys,
> 
> I've followed the instruction in
> http://wiki.apache.org/spamassassin/FasterPerformance and run
> `sa-compile` (after installed re2c), but the problem still exists.
> Since some-one had said that it might be a DNS problem, I stopped
> using Mail::SpamAssassin::Plugin::DNSEval plugin (put a # character in
> the v320.pre file). Is there something that I can do to prevent spamd
> eat my CPU to 99.9%? FYI, below is how I configured spamassassin:
> 
> #!/bin/sh
> ./configure --enable-ripmime --enable-attach=y \

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


Re: SpamAssassin hogs the CPU

Posted by FC Mario Patty <fc...@gmail.com>.
Guys,

I've followed the instruction in
http://wiki.apache.org/spamassassin/FasterPerformance and run `sa-compile`
(after installed re2c), but the problem still exists. Since some-one had
said that it might be a DNS problem, I stopped using
Mail::SpamAssassin::Plugin::DNSEval plugin (put a # character in the
v320.pre file). Is there something that I can do to prevent spamd eat my CPU
to 99.9%? FYI, below is how I configured spamassassin:

#!/bin/sh
./configure --enable-ripmime --enable-attach=y \
--enable-quarantinedir=y --enable-spam=y --enable-spam-hits=4 \
--enable-custom-smtp-reject=n --enable-clamdscan=/usr/bin/clamdscan \
--enable-dropmsg=n --enable-qmaildir=/var/qmail \
--enable-qmail-queue=/var/qmail/bin/qmail-queue \
--enable-clamavdb-path=/var/lib/clamav/db
--enable-sigtool-path=/usr/bin/sigtool \
--enable-per-domain=y --enable-received=y --enable-spam-auth-user=y

I believe restarting spamassassin each 5 minutes is not a clever solution -
or is it(?).  Thank-you for your help.

Regards,

Re: SpamAssassin hogs the CPU

Posted by FC Mario Patty <fc...@gmail.com>.
Well Justin, actually I have. I just don't understand the sa-compile thing
or where to replace spamassassin with spamc, since I cannot find the phrase
'spamassassin'  in my /etc/init.d/spamassassin or in
/etc/sysconfig/mail/spamassassin (also in the qmail/smtpd's run file). I do
have used dnscache from the beginning of the installation and yesterday I
installed perl-Net-DNS because 'spamassassin -D' said it couldn't find one.
Do you guys have any clue? Thank you in advance.


Regards,


On Wed, Mar 12, 2008 at 4:29 PM, Justin Mason <jm...@jmason.org> wrote:

>
> have you read the FAQ?
> http://wiki.apache.org/spamassassin/FasterPerformance
>
> --j.