• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
The Electric Toolbox Blog

The Electric Toolbox Blog

Linux, Apache, Nginx, MySQL, Javascript and PHP articles

  • Applications
  • FCKEditor
  • Apache
  • Windows
  • Contact Us
Home / Flush the exim mail queue

Flush the exim mail queue

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.

Command to flush the exim 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.

Additional flags to force mail send

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.

Path to exim command

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, the next post will show how to view what’s currently in the exim mail queue.

Check Out These Related posts:

  1. Changing exim4 settings with Debian 5 Lenny
  2. Mac mail queue commands
  3. Show the exim mail queue
  4. Delete messages from the exim mail queue

Filed Under: Email Servers

Primary Sidebar

Categories

  • Apache
  • Applications
  • Article
  • Case Studies
  • Email Servers
  • FCKEditor
  • HTML And CSS
  • Javascript
  • Linux/Unix/BSD
  • Microsoft SQL Server
  • Miscellaneous Postings
  • MySql
  • Networking
  • Nginx Web Server
  • Offsite Articles
  • OSX
  • PHP
  • Quick Tips
  • RFC – Request for Comments
  • SilverStripe
  • VMWare
  • VPN
  • Windows
  • WordPress

Recent Posts

  • Vim Show Line Numbers
  • Add User To Group Linux
  • Chmod 777 Tutorial
  • How to Copy Directory Linux
  • Linux create user

Copyright © 2021. ElectricToolBox. All Rights Reserved.

  • Contact Us
  • Copyright Info
  • Privacy Policy
  • Sitemap