Hello,
One of my customers flooded the Courier mail queue (10K mails on only one
address !)
To clean it, I used the following script:
#/bin/bash
USAGE="Usage: $0 STRING"
if [ $# -ne 1 ]
then
echo "$USAGE"
exit 1
fi
/etc/init.d/courier-mta stop
cd /var/lib/courier
rgrep -l $1 msgs/*/D* | while read DATAFILE
do
CTLFILE=`basename $DATAFILE | sed 's/^D/C/g'`
rm $DATAFILE
find msg* -name "${CTLFILE}*" | xargs rm
done
/etc/init.d/courier-mta start
Beware, this script is particularly violent. It won't warn you if you are
doing such things as ./purge_courier.sh To !
You have to adapt it to change paths and use grep -rl if you don't have
rgrep alias.
Hope this helps...
Jerome Blion.
------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
courier-users mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users