How to Delete Pending Emails in the Exim Queue

To delete pending emails in the Exim queue, follow these steps:

1. Check the total count of emails in the queue:

exim -bpc

2. Filter the emails using the exiqgrep command based on your requirements:

Filter all frozen emails:

exim -bp | exiqgrep -z

Filter all unfrozen emails:

exim -bp | exiqgrep -x

Filter by the sender:

exim -bp | exiqgrep -f email@domain.tld

3. Review the emails you want to delete. The output will display the time in queue, size, Exim message ID, sender, if the email is frozen or not, and the recipient.

4. Delete the selected emails using the following commands. Note that these commands will remove all matching emails from the queue, including legitimate ones. Deleted emails cannot be recovered.

Delete all frozen emails:

exim -bp | exiqgrep -iz | xargs exim -Mrm

Delete all unfrozen emails:

exim -bp | exiqgrep -ix | xargs exim -Mrm

Delete all emails by the sender:

exim -bp | exiqgrep -if email@domain.tld | xargs exim -Mrm

Make sure to exercise caution when deleting emails from the Exim queue, as this action is irreversible.

  • 13 Users Found This Useful
Was this answer helpful?

Related Articles

How to fix IP Missing issue on cPanel/WHM

We are here to help you with solving the problem of Missing IP Server in list accounts. The...

Domain names are not showing in WHM

We were unable to see any domains listed under WHM -> List Accounts. However, we can see the...

How to Start/Stop or Restart Apache server

Apache is the HTTP server that is freely available over the internet. It is a kind of software or...

How to install Attracta SEO Tools plugin

RequirementscPanel/WHM needs to be installed on your server. Step 1: SSH into your server and go...

How to Install CpCleaner in cPanel through SSH?

Installation Run the following shell commands as root via SSH: wget -O cpc-1.0.3.tar...