Index: [Article Count Order] [Thread]

Date:  Tue, 7 Aug 2007 11:55:48 -0600
From:  "Rodrigo Ordonez Licona" <rodrigo (at mark) xnet.com.mx>
Subject:  [coba-e:10546] Re: Vacation Message and SpamAssasin  LOCKS up Mail & server CPU
To:  <coba-e (at mark) bluequartz.org>
Message-Id:  <200708071754.l77HsI4b027624 (at mark) admin.xnet.com.mx>
In-Reply-To:  <03bb01c7d90d$a7cb0190$1801a8c0@mcs1>
X-Mail-Count: 10546

This script runing from cron every 5 minutes Helped me a lot on this

Credit on this is to Michael Stauber watch out for carriage returns as this
list sometimes wraps text

HTH

Rodrigo O 

===========================================================

#!/bin/bash

LIMIT=`expr 60`
for PROID in `ps auxwf |grep "\_ spamd child"|grep -v root |awk '{print
$2}'`
do
HOURS=`ps -fp $PROID | grep -v STIME | awk '{print $7}'|cut -d":" -f2`
MINS=`ps -fp $PROID | grep -v TIME | awk '{print $7}'|cut -d":" -f3`
USER=`ps -fp $PROID | grep -v TIME | awk '{print $1}'`
#echo $PROID
#echo $MINS
#echo $USER
#echo $HOURS
if [ "$HOURS" = "" ]
then
HOURS=`expr 0`
fi
if [ "$MINS" = "" ]
then
MINS=`expr 1`
fi
ELAPSED=`expr $HOURS \* 60`
ELAPSED=`expr $ELAPSED + $MINS`
if (test $ELAPSED -gt $LIMIT )
then
kill -9 $PROID
echo `date +'%Y-%m-%d at %H:%M'` - Killed SPAMd process $PROID belonging \
to user $USER after $HOURS:$MINS>> /var/log/kill-spamd.log
echo `date +'%Y-%m-%d at %H:%M'` - Killed SPAMd process $PROID belonging \
to user $USER after $HOURS:$MINS
fi
done












==========================================================

-----Original Message-----
From: Maron Internet [mailto:mi2 (at mark) mi2.us] 
Sent: Martes, 07 de Agosto de 2007 10:12 a.m.
To: coba-e (at mark) bluequartz.org
Subject: [coba-e:10544] Vacation Message and SpamAssasin LOCKS up Mail &
server CPU

I know this was talked about and I can't find a Solution when Searching.

Sorry to repeat.

Have SpamAssasin 3.1.8 Updated.

When someone USES Vacation Message, CPU Usage red-lines and Email services
DIE.

Reseting Who SERVER is only way I found to release the LOCK.

Even when I turn off Auto-Reply (Vacatin Msg) and reset SpamAssasin & Email
systems will not correct.

This is the first time encountered (took out 2 of our servers) Shame on them
for taking vacations at same time.

Any help to avoid this in future GREATLY appreciated.

If  I can change some files cool, but detail the changes so I don't screw
up.

Marck