Documentation Index

Fetch the complete documentation index at: https://docs.serversaustralia.com.au/llms.txt

Use this file to discover all available pages before exploring further.

How to: Manage your EXIM email queue via SSH

Prev Next

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:

Shell
exim -bpc

View all emails in the EXIM Queue:

Shell
exim -bp

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

Shell
exiqgrep -f email@example.com

View all emails in the queue TO a specific address:

Shell
exiqgrep -r email@example.com

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

Shell
exiqgrep -f email@example.com -i

Remove a single email from the EXIM Queue:

Shell
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:

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

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

Shell
exiqgrep -zi|xargs exim -Mrm

Clear ALL emails from the Queue (Unsent emails will be lost forever - Be Careful!)

Shell
exiqgrep -i|xargs exim -Mrm