[Mailman-Users] HELP my qrunner log file is HUGE!
Bob Weissman
rlw at rlw.best.vwh.net
Fri Jul 26 17:08:38 CEST 2002
At 11:13 PM 7/25/02, Anthony Carmody wrote:
>I have an huge qurunner file in my mailman/logs directory. what can i do to
>clear it and ensure it wont get this bloody huge again?
Mailman doesn't rotate its own logs. You have to do it yourself. There are many ways to do this. I use the following simple script called once a day from cron.
#!/bin/sh
# Rotate the Mailman logs
# Bob Weissman 7/11/02
# keep this many versions of each log
KEEP_VERSIONS=7
LOG_DIR=$HOME/logs
LOGS='bounce error qrunner subscribe digest post smtp vette'
cd $LOG_DIR
umask 002
for LOG in $LOGS
do
# Only rotate a log if it is non-empty
if test -s $LOG
then
J=`expr $KEEP_VERSIONS - 1`
while [ $J -gt 0 ]
do
I=`expr $J - 1`
test -s $LOG.$I && mv -f $LOG.$I $LOG.$J
J=$I
done
mv -f $LOG $LOG.0
> $LOG
fi
done
exit 0
More information about the Mailman-Users
mailing list