How to clear Exim queue using ssh
Sometimes if an account on your server is compromised. The Exim mail queue will quickly fill up with thousands of spam emails and clear Exim queue. The Exim queue will start to slow the server down. Eventually, the server will fall over due to the huge processing power required to service the queue.
The Exim queue can be cleared in a number of ways. If there are thousands of emails waiting to be processed in the queue the best way is by using ssh.
Left, the emails will keep building up in the queue and eventually, the server will stop working. After the queue is clear you should secure the server or any account that has been compromised.
As the root user or a user with root privileges login to your server and issue the below command
exim -bp | awk '/^ *[0-9]+[mhd]/{print "exim -Mrm " $3}' | bash
You should follow our guide on Compromised accounts to find out which account is sending the spam emails and suspend it as soon as you have run the above command to clear the queue. If you don’t the mail queue will just fill up again.
Get free cPanel server management with each cPanel VPS Server.
How was this article? Clear Exim Queue
You might also like
More from cPanel
Shared cPanel Servers – Distributing the cost of cPanel and other software licenses
The cost of software that runs on servers is at a record high. In many cases where cPanel is used …
How To Install Memcached PHP Cache In cPanel Servers
Memcached is an in-memory caching function that allows fast access and low-latency caching for PHP applications. Used by major companies …
How To Install A Cloudflare Origin SSL Certificate In cPanel
Free SSL Certificates from places like cPanel or Let's Encrypt are great. When Let's Encrypt first introduces free SSL Certificates …