Monday, 20 January 2014

How to Remove All messages From the Mail Queue : Exim

Exim is a (MTA) mail transfer agent used on linux operating systems. It is freely available under the GNU GPL and it aims to be a general and flexible mailer with extensive facilities for checking incoming e-mail.

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


Dallas Marlow, suggested following clean command:

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

No comments:

Post a Comment