Today we will learn how to delete Exim Mail Queue from the command line. Stuck in a long mail queue due to some spam and it’s taking forever to load in the WHM UI? Well, everyone has been there once.
Delete Exim Mail Queue
For WHM-based servers only there is a quick way to clear the mail queue from the command. Log in to your server as root and execute the following command:
exiqgrep -o 360 -i | xargs exim -Mrm
This will remove emails older than 6 minutes (360 seconds). Adjust your time accordingly. The reason for setting the timer is to accidentally save recent emails that should have been delivered when you did the deletion process. Buy cPanel Hosting From Oudel Inc. Learn how to show hidden dotfiles and folders in the cPanel file manager.



