If you have ever had the need to delete specific email messages out of the queue here are a few commands that will help you out.  Personally on my WHM\cPanel servers I prefer to load ConfigServer’s Mail Queues plugin for cPanel. If your interested in installing CMQ here is a link to their page http://www.configserver.com/cp/cmq.html . We will be adding an article showing how to install it as well.

For you el’ manual people here are the commands to clear messages from the Exim queue.

To print a list of the messages in the queue, enter:

exim -bp

To remove a message from the queue, enter:

exim -Mrm {message-id}

To remove all messages from the queue, enter:

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


exim -bp | exiqgrep -i | xargs exim -Mrm


Leave a Reply

Your email address will not be published. Required fields are marked *

To submit solve the problem below * Time limit is exhausted. Please reload the CAPTCHA.