How to clear exim mail queue


#1

Sometimes it is necessary to remove all frozen messages in exim mail queue immediately. To do this just use:

exim -bpu | grep frozen | awk {'print $3'} | xargs exim -Mrm

command. You can also use specific exiqgrep command for this:

exiqgrep -z -i | xargs exim -Mrm

See also: man exiqgrep

If you want to remove some specific emails from the mail queue, you have to get related message ids first with:

exim -bp

When you know the message id, you can remove it from the queue:

exim -Mrm <message-id>