Flush the exim mail queue
Posted September 6th, 2008 in Email Servers
I have the exim mail server running on one of my customer's webservers. Their internal mail server hadn't been accepting mail overnight so they hadn't got a whole bunch of important emails from the webserver and I needed to flush the exim mail queue. A quick read of the exim man page answered my question about how to do this and I thought I'd write a quick post to show how to flush the exim mail queue.
There are two ways to flush the exim mail queue:
runq
or
exim -q
This will then process the mail queue. I had a look at the exim log file and the mail queue itself (I'll be posting how to view what's in the exim mail queue on Tuesday) after flushing the queue and the emails were still stuck there. Another quick look at the exim man page and I discovered the following options:
-qf = If one f flag is present, a delivery attempt is forced for each non-frozen message, whereas without f only those non-frozen addresses that have passed their retry times are tried.
-qff = If ff is present, a delivery attempt is forced for every message, whether frozen or not.
So I then ran this:
exim -qff
And the messages that were stuck in the queue were flushed and delivered. My customer reported back to me a few minutes later that their emails had been received.
Note that the exim command is probably in /usr/sbin and you may need to use the whole path as well as the command to run it. If this is the case then do this:
/usr/sbin/exim -q /usr/sbin/exim -qff etc
As mentioned above, on Tuesday I'll post how to view what's currently in the exim mail queue.
Related posts:
- Show the sendmail mail queue (Sunday, November 2nd 2008)
- Show the exim mail queue (Tuesday, September 9th 2008)
Recent posts:
- MySQL queries for article summaries part 2 of 2 (Tuesday, January 6th 2009)
- Aims for 2009 (Monday, January 5th 2009)
- Weekly Roundup - January 5th 2008 (Monday, January 5th 2009)
- MySQL queries for article summaries part 1 of 2 (Sunday, January 4th 2009)
- 2008 Summary of Posts (Saturday, January 3rd 2009)
- 2008 / 2009 overview (Friday, January 2nd 2009)
Subscribe to RSS Feed / Email / Bookmark / Share
Use the buttons below to subscribe to my RSS feed to be notified next time something is posted, share this post with others, or subscribe by email and have my posts sent in a daily email.
Posts are made using the following schedule (although it may vary some weeks): Mondays & Fridays = PHP; Tuesdays & Saturdays = MySQL; Wednesdays & Sundays = Javascript/jQuery; Thursdays = HTML/CSS.
