Show the exim mail queue
Posted September 9th, 2008 in Email Servers
The exim mail server has a number of command line options including being able to see what's currently in the mail queue. Last week I looked at how to flush the exim mail queue and in this post look at how to view the exim mail queue.
To view the exim mail queue issue the following command:
mailq
OR
exim -bp
If exim is in /usr/sbin and /usr/sbin is not in your path, you'll need to prefix the command with the full path like so:
/usr/sbin/exim -bp
The outut from the above commands will look something like so:
4d 1.2K 1Ka6u5-00032Z-Eb <from@example.com>
to@example.com
62h 1.2K 1KaRH0-0007QZ-B5 <from@example.com>
to@example.com
3h 22K 1KbLHr-0004ev-An <from@example.com>
to@example.com
In the above example "from@example.com" is the email address the email is being sent from and to@example.com is the address being sent to. Normally these would be real email addresses but I've changed them for the purposes of this post.
The 4d, 62h and 3h values indicate how long the email message has been in the queue: 4 days, 62 hours and 3 hours respectively.
The x.xK values are the message size.
And the 1Ka6u5-00032Z-Eb etc is the message id and is also the filename of the message on disk, which you will find in /var/spool/exim/msglog and /var/spool/exim/input (the directories may vary depending on your Linux/Unix distribution and/or compiled in settings).
Using the "find" command you could do this to locate all the relevent files:
find /var/spool/exim -name "1Ka6u5-00032Z-Eb*"
which would display something like this:
/var/spool/exim/msglog/1Ka6u5-00032Z-Eb /var/spool/exim/input/1Ka6u5-00032Z-Eb-D /var/spool/exim/input/1Ka6u5-00032Z-Eb-H
Refer also to my post on how to flush the exim mail queue to then flush the mail queue after you've had a look at it.
Related posts:
- Prevent sender header being added with Exim (Wednesday, February 25th 2009)
- Show the sendmail mail queue (Sunday, November 2nd 2008)
- Flush the exim mail queue (Saturday, September 6th 2008)
Share or Bookmark
Share or Bookmark this page using the following services. You will need to have an account with the selected service in order to post links or bookmark this page.
Subscribe or Follow
Subscribe via RSS or email, or follow me on Facebook or Twitter below. The RSS icon takes you through to Feedburner where you can select the service or application to use.

