Manually Clear from Console / Command Line cPanel Exim Mail Queue

Clearing the Exim Mail Queue From Command Line

 

If the Exim mail queue on your server has accumulated a large number of messages (often from spam or a compromised account), these commands will help you manage it. Root SSH access is required.

 

View Queue Size

exim -bpc

 

View Queue Contents

exim -bp | head -50

 

Delete All Frozen Messages

exiqgrep -z -i | xargs exim -Mrm

 

Delete All Messages in Queue

exiqgrep -i | xargs exim -Mrm

 

Delete Messages From a Specific Sender

exiqgrep -f spammer@domain.com -i | xargs exim -Mrm

 

Important: Before clearing the queue, investigate why it filled up. Check for compromised email accounts (change passwords), hacked PHP scripts (run a malware scan), or misconfigured forms sending to invalid addresses. Clearing the queue without fixing the root cause means it will fill up again.

 

This is a server administrator task. Shared hosting customers should contact support if they suspect mail queue issues.

  • 147 Users Found This Useful

Was this answer helpful?

Related Articles

ModSecurity: collection_store: Failed to access DBM file /var/cpanel/secdatadir/ip: Permission denied

The error Failed to access DBM file /var/cpanel/secdatadir/ip: Permission denied can occur on...

Killing cPanel Backups via Command Line / Shell

Stopping cPanel Backups From the Command Line   From time to time the cPanel backup system...

Error: rpmdb open failed with cPanel

Fixing RPM Database Errors in cPanel   The error "rpmdb open failed" occurs when the RPM...

cPanel Account - PHP Startup: Unable to load dynamic library

PHP Startup Error: Unable to Load Dynamic Library   The error "PHP Startup: Unable to load...

How to convert InnoDB to MyISAM

Although at times faster, you will find InnoDB a very large headache when it comes to table...



Save 30% on web hosting - Use coupon code Hosting30