To clear the exim mail queue on a cpanel server.
/etc/init.d/exim stop;
sleep 10;
killall -9 exim eximd
sleep 5;
#clean out the mail queue
find /var/spool/exim -mindepth 2 -type f -exec rm -rf {} \;
#clean out the mail db files
find /var/spool/exim/db -type f -exec rm -rf {} \;
#reset the eximstats database tables
echo “truncate table sends;” | mysql eximstats
echo “truncate table defers;” | mysql eximstats
echo “truncate table failures;” | mysql eximstats
echo “truncate table smtp;” | mysql eximstats
/etc/init.d/exim restart
/etc/init.d/exim stop;
sleep 10;
killall -9 exim eximd
sleep 5;
#clean out the mail queue
find /var/spool/exim -mindepth 2 -type f -exec rm -rf {} \;
#clean out the mail db files
find /var/spool/exim/db -type f -exec rm -rf {} \;
#reset the eximstats database tables
echo “truncate table sends;” | mysql eximstats
echo “truncate table defers;” | mysql eximstats
echo “truncate table failures;” | mysql eximstats
echo “truncate table smtp;” | mysql eximstats
/etc/init.d/exim restart
No comments:
Post a Comment