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

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

Killing cPanel Backups via Command Line / Shell

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

Failed to start tailwatchd - Unit tailwatchd service entered failed state

Failed to start tailwatchd. Unit tailwatchd.service entered failed state.  tailwatchd.service...

VPS Time not Correct with Time Server

VPS Time Not Syncing With Time Server   If the time on your VPS is incorrect or drifting,...



Save 30% on web hosting - Use coupon code Hosting30