Sometimes it's easier and faster to manage your EXIM mail queue via SSH, rather than through WHM or cPanel.
This is especially true when resolving issues with an exceptionally large email queue.
Listed below are the most common commands for managing your EXIM email queue.
Check EXIM Queue Size:
exim -bpcView all emails in the EXIM Queue:
exim -bpView all emails in the queue FROM a specific email address:
exiqgrep -f email@example.comView all emails in the queue TO a specific address:
exiqgrep -r email@example.comView the MESSAGE_ID of all emails from a specific email address:
exiqgrep -f email@example.com -iRemove a single email from the EXIM Queue:
exim -Mrm MESSAGE_IDThe 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 -MrmClear all 'Frozen' (undeliverable) emails from the queue:
exiqgrep -zi | xargs exim -MrmClear ALL emails from the Queue (Unsent emails will be lost forever - Be Careful!)
exiqgrep -i | xargs exim -Mrm