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

Failed to start tailwatchd - Unit tailwatchd service entered failed state

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

Failed to lock proc mutex: Permission denied

The error : Failed to lock proc mutex: Permission denied can occur when using mod_ruid2 with...

Whitelisting Multiple IPs with Mod_Security

Whitelisting Multiple IPs in ModSecurity   If ModSecurity is blocking legitimate requests...

SpamAssassin Command Line Bayesian Learn Command cPanel

Once it is enabled, it is necessary to train spamassassin to learn what is junk mail and what is...

Create CXS Quarantine Directory

Creating a CXS Quarantine Directory   CXS (ConfigServer eXploit Scanner) quarantines...



Save 30% on web hosting - Use coupon code Hosting30