How can I see a list of emails in exim’s queue from the command line?
If you already know how many emails are in the queue and want to see certain short information regarding each email in the queue, you can print a list of the emails currently queued by performing this command:
exim -bp |grep "frozen")
Check out this screen shot for an example:
Reviewing an example from that output:
14m 1.5K 1XSY39-0001i8-7z <> *** frozen *** email@example.com
Let’s break down each part of the output:
- ‘14m‘ is the amount of time since it was originally attempted for delivery. ‘m’ standing for minutes, ‘h’ for hours, and ‘d’ for days.
- ‘1.5K‘ is the size of the original message attempted for delivery. ‘K’ standing for Kilobytes.
- ‘1XSY39-0001i8-7z‘ is the email ID for that specific delivery attempt. This is very useful and should be noted for further research (such as viewing the email header and body).
- ‘*** frozen ***‘ is the status of this particular email. Frozen obviously suggesting there’s something from preventing further delivery attempts.
- ‘firstname.lastname@example.org‘ is the email address “TO” or delivery address for the email.