Pls share this page

Remove All email messages From the Mail Queue Administration

December 9th, 2011 by Tanbir Leave a reply »

Question: I’m using Exim mail server under CentOS Linux. How do I remove all mail messages from the Exim mail queue Administration using a shell prompt (SSH)?

Answer: Exim is a mail transfer agent (MTA) used on Unix-like operating systems. It aims to be a general and flexible mailer with extensive facilities for checking incoming e-mail.

In this very small tutorial I will provide you a one line command that allows you to completely clear your Mail Queue Administration of directadmin. This is a list of mails which still has to be sent. The list has to be cleared once in a while since it can get really stuffed. I had about 110 pages of mails that still needed to be send and I think that a bit too much.

You just have to run the command below in SSH:

To remove all messages from the queue, enter:

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

Dallas Marlow, suggested following clean command:
# exim -bp | exiqgrep -i | xargs exim -Mrm

Thanks to

%d bloggers like this: