Exim Cheat Sheet

Basics

Print a count of the messages in the queue:
# exim -bpc

Print a listing of the messages in the queue (time queued, size, message-id, sender, recipient):
# exim -bp

Print a summary of messages in the queue (count, volume, oldest, newest, domain, and totals):
# exim -bp | exiqsumm

Print what Exim is doing right now:
# exiwhat

Managing The Queue

Start a queue run:
# exim -q -v

Start a queue run for just local deliveries:
# exim -ql -v

Remove a message from the queue:
# exim -Mrm <message-id>

Freeze a message:
# exim -Mf <message-id>

Thaw a message:
# exim -Mt <message-id>

Deliver a message, regardless:
# exim -M <message-id>

Deliver a message, but only if the retry time has been reached:
# exim -Mc <message-id>
	Finding Stuff

Use -f to search for a specific sender:
# exiqgrep -f [luser]@domain

Use -r to search for a specific recipient:
# exiqgrep -r [luser]@domain

Use -o to print messages older than the specified number of seconds.
# exiqgrep -o 86400 [...]

Use -y to print messages that are younger than the specified number of seconds.
# exiqgrep -y 3600 [...]

Use -s to match the size of a message with a regex. For example, 700-799 bytes:
# exiqgrep -s '^7..$' [...]

Use -z to match only frozen messages:
# exiqgrep -z

Use  -x to match only unfrozen messages.
# exiqgrep -x

Use -i to print just the message-id as a result of one of the above two searches:
# exiqgrep -i [ -r | -f ] ...

Use -c to print a count of messages matching one of the above searches:
# exiqgrep -c ...

Combo’s

Remove all frozen messages:
# exiqgrep -z -i | xargs exim -Mrm	

All credit for awesomeness goes to http://bradthemad.org/tech/notes/exim_cheatsheet.php
Assembled by John Hobbs - 2010 - http://www.velvetcache.org/