Exim Remove All messages From the Mail Queue

www.l‮c.iruttua‬om
Exim Remove All messages From the Mail Queue

To delete all messages from the Exim mail queue, you can use the exim -bp command to list the messages in the queue, and then use the exim -Mrm command to delete the messages.

Here is an example of how to delete all messages in the queue:

  1. Open a terminal window and log in to your mail server.
  2. Run the following command to list the messages in the queue:
exim -bp

This will display a list of the messages in the queue, including the message ID, the sender, the recipient, and the size of each message.

  1. Run the following command to delete all messages in the queue:
exim -bp | awk {'print $3'} | xargs exim -Mrm

This command will extract the message IDs from the output of the exim -bp command and pass them to the exim -Mrm command to delete the messages.

Alternatively, you can use the exim -qf command to flush the queue, which will delete all messages that are currently in the queue and stop any further processing of the messages:

exim -qf

This command will delete all messages in the queue and stop any further processing, including delivery attempts.

You can find more information about the exim command and its options in the Exim documentation: https://www.exim.org/exim-html-current/doc/html/spec_html/ch-exim_command_line.html

Keep in mind that you will need to have the appropriate permissions to delete messages from the mail server queue. You may also need to consult the documentation for your mail server or seek assistance from a qualified technician if you encounter any issues.

Created Time:2017-10-28 20:14:16  Author:lautturi