Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a very simple Exim configuration that's just forwarding all mail to a set of destination addresses. When immediate delivery to an address fails, the message is added to the queue (and then processed by the retry rules). I want to change this so that if immediately delivery fails, the message is :blackhole:d. (It's ok if a bounce is generated instead, as I'll just redirect the bounce to the :blackhole:).

This needs to occur for temporary failures (i.e. 4xx) as well as permanent (i.e. 5xx) ones.

I understand that this means that if delivery can't be done immediately the message will be permanently and irretrievably lost. In this particular context, that isn't a problem.

Reading over this, it sounds suspiciously like "how can I improve my spamming Exim server". That really isn't what this is for, and if you can figure out a way I can prove that, I'm happy to do so!

share|improve this question

Exim has extensive configuration for setting the retry times. In your exim.conf, there will be a retry section near the bottom. The retry configuration is three fields, the email address, the error code causing the failure and a list of timing patterns. These are defined as a group of three numbers: a letter behaviour code, the length of time to apply this rule and an interval to retry. For example:


can be read as "For 2 hours, try of a fixed internal every 15 minutes",

You could try setting an empty retry:

begin retry
*    *

It's possible that exim gets upset by this. Instead, you could use a single retry of a minute:

begin retry
*    *    F,1m,1m

This isn't exactly what you asked for, but it's pretty close.

There's also options for changing it for particular email addresses and for different return codes.

share|improve this answer
This doesn't work, because (as you said) the retry time is a minute. That means that there is a retry, and the queuerunner has to go through the queue and do the retry and remove the message. I need to disable retry, not make it short. – Tony Meyer Oct 27 '09 at 9:10
Did you try having an empty retry? – David Pashley Oct 27 '09 at 9:32
Yes, Exim ignores an empty retry. Using 0 for either of the times isn't accepted, either. – Tony Meyer Oct 31 '09 at 8:52
I did wonder if having a short first value with a really long second period, but I suspect Exim might still retry. – David Pashley Oct 31 '09 at 10:08

Set retry to something absurdly long, cron a script to pull message ids from exim -bpu in queue greater than length x, then remove with exim -Mrm <msgid>

You can alternatively run exim as a non-queueing daemon with mua_wrapper = true. Look at Section 48 "Using Exim as a non-queuing client", it may do what you need.

When delivery fails, an error message is written to the standard error stream (as well as to Exim’s log), and Exim exits to the caller with are turn code value 1. The message is expunged from Exim’s spool files. No bounce messages are ever generated.

No retry data is maintained, and any retry rules are ignored.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.