How to: Manage your EXIM email queue via SSH

Follow

 

Sometimes it's easier to manage your EXIM mail queue via SSH, rather than through WHM or cPanel.

 

This is especially true when resolving issues with exceptionally large email queue.

 

Here are the most common commands for managing your EXIM email queue:

 

Check EXIM Queue Size:

exim -bpc

View all emails in the EXIM Queue:

exim -bp

View all emails in the queue FROM a specific email address:

exiqgrep -f email@example.com

View all emails in the queue TO a specific address:

exiqgrep -r email@example.com

View the MESSAGE_ID of all emails from a specific email address:

exiqgrep -f email@example.com -i

Remove a single email from the EXIM Queue:

exim -Mrm MESSAGE_ID

The message ID is a unique identifier, which looks like this:  (example) 1ePN2j-000pzx-RB

Remove all emails from a certain email address from the queue:

exiqgrep -f email@example.com -i | xargs exim -Mrm

Clear all 'Frozen' (undeliverable) emails from the queue:

exiqgrep -zi | xargs exim -Mrm

Clear ALL emails from the Queue (Unsent emails will be lost forever - be careful)

exiqgrep -i | xargs exim -Mrm

Have more questions? Submit a request

Comments

Powered by Zendesk