Knowledgebase: SSH Access > SSH commands
Remove all emails in the exim mail queue using SSH
Posted by Sam Thomas, Last modified by Sam Thomas on 16 March 2016 03:33 PM

Remove all emails in the exim mail queue using SSH

On occasion the mail queue may be extremely large and as such in WHM viewing the mail queue is just not possible because of this.

When this happens you will have to clear the exim queue from the command line.

To do this enter the following in SSH and press return.

exim -bp | awk '/^ *[0-9]+[mhd]/{print "exim -Mrm " $3}' | bash

As shown below:

Clear Exim Queue In SSH

 

Once you press return you will see each email like the following listed until it is complete, Be patient as sometimes depending on the amount of emails it can take a while to start and some time to finish!

 

SSH Clearing Exim Mail Queue

 

Once it has finished it will return you back to the command line and you're done! 

Thanks

Sam Thomas
PAC Web Hosting

(0 vote(s))
Helpful
Not helpful

Comments (0)