Those of you with Exim will sometimes needs to do some work on it – here’s a list of the commands which I find most useful:

If you want to see what exim is doing right now :

“exiwhat”

if you think you have queue problems then you can print a countof messages in the queue this will often be quite high – so it’s worth running it a few times over a couple of hours to see if you have a queue problem:

“exim -bpc”

If you want more information about what is in the queue then the following command will give you the count, the colume, oldest, newest, domain to be sent to and total summaries.  The oldest and volume parts are often the most informative in this to help you see problem domains.

“exim -bp | exiqsumm”

Below are some commands to help you manage the queue – especially useful if you want to try to purge it or take action.

To tell exim to try to deliver things in the queue according to the rules for a queue run

“exim -q -v”

If you are blocked up with external mail you can tell exim to run the queue to deliver local mail only – this may help you get things such as notifications etc.. if they are delayed by other mail in the queue

“exim -ql -v”

If you have some problems with older mail (maybe spam related) – you can use the following to delete mail that over 7 days old (the time given is in seconds so just take one day 86400 and multiply it by 7)

“exiqgrep -o 604800 -i | xargs exim -Mrm”

There are many many other commands and other examples – some sites have longer lists, but these are all the commands I have needed (or variations thereof) for administrating my servers over the last 9 years.