One way to delete frozen messages:
exim -bpr | grep frozen | awk {'print $3'} | xargs exim -Mrm
Report how many frozen messages are in the queue:
exim -bpr | grep frozen | wc -l
exim -bpr | grep -c frozen
Report the total number of emails in the queue:
exim -bpr | grep "<" | wc -l
exim -bpc
Once messages are frozen, Exim basically refuses to deliver them anymore. When you do an ‘exim -bp’ to list your queue, note the long message id numbers and they can be examined by doing ‘exim -Mb’ and ‘exim -Mh’ to look at message body and header contents respectively. I think ‘exim -Mrm’ will remove the message. With these above exim commands, you must include the message id after the message option.
Clean an exim queue of frozen bounce messages
The -d9 here did not work for me. Anyone know why?
1. Login to your dedicated server via ssh and switch to the root user.
2. At the command line prompt type: exim -qff
That is it. If you need to turn on debugging for a more detailed picture when flushing the mail queue use the following command:
At the command line type: exim -qff -d9
If you have a cPanel server you can also clean the mail queue from the WHM control panel. Login to your WHM control panel and scroll down to “Email”. Click on “Manage Mail Queue” and you will see the current messages in your mail queue. You look at messages, delete messages or try to deliver messages. Very important is the part that shows you how long messages are already sitting in your mail queue. In most cases anything sitting there for more than 30 hours cannot be delivered - period. We usually delete anything older than 24 hours from our servers. In WHM you can choose to delete single messages or all messages at once.
Mailqueue getting stuck - misconfigured iptables?