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:
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.
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.