cPanel Exim How To Clear The Mail Queue

Here’s the proper way 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

  • 2 Users Found This Useful
Was this answer helpful?

Related Articles

How to create a cPanel user account?

To create a new cPanel account go to WHM >> Account Functions >> Create a New...

How can I limit the number of emails a domain can send out per hour?

Click on the "Tweak Settings" link under "Server Setup". Within the "Mail" section is a text box...

How can I limit access to certain directories on my server by requiring a password using cPanel/WHM?

In cPanel, it is very simple to limit access to a directory on your server. This can be used to...

How do I prevent SSL Certificate Warnings when accessing cPanel?

All cPanel servers come with self-signed certificates configured to secure the control panel as a...

How do I create a MySQL database and user in cPanel/WHM? How do I connect them?

To create a MySQL database and user, log into the cPanel interface for the desired domain and...

Powered by WHMCompleteSolution