[Mailman-Developers] Exim bouncedetection hack

Nigel Metheringham Nigel.Metheringham@vdata.co.uk
Fri, 24 Sep 1999 09:40:43 +0100

sgr@rotzorg.org said:
> i've fiddeled around in Bouncer.py and added code to detect bounces
> created by exim.

> It's a bit of a dirty hack, as it is my first attempt at python ;-) 

I hate to criticise since I haven't got around to cutting code to do 
this and its great that you are working on this....

However I think that parsing the text of the exim bounces is the wrong 
way to go - exim provides a header on bounce messages to make this sort 
of function very easy.  You will find that all bounce messages from an 
exim system will have an additional header:-

  X-failed-recipients: fred@flintstone.com

Is there are multiple failed recipients, then they will look like this:-

  X-failed-recipients: fred@flintstone.com,

You need to be slightly careful here though since a few mailers that 
feel it is their duty to rewrite things will munge multiple addresses 
onto a single line, so a general header address reading function should 
be used.

I guess the other thing that should be done to finish up the job is to 
detect exim delayed message warnings and ignore them.  These have 
subjects such as:-

  Warning: message 11SzEO-0004wH-00 delayed 24 hours

The best way to detect these is by a regexp on the subject.

If you are getting a lot of these messages then it may be worth sending 
a polite note to the admin of the system generating them suggesting 
that they set the following config item:-

  delay_warning_condition = "\
    ${if match{$h_precedence:}{(?i)bulk|list|junk}{no}{yes}}"

This prevents exim sending out message delay warnings for messages with 
appropriate precedence header settings.  This change is going to be 
made the default for future versions of exim, but currently unless the 
admin really knows what they are doing, most exim installations have 
their configs for this non-optimal.  Documentation on this option can 
be found at


I'll try and code this stuff up using my appalling python skills soon.
I'll also attempt to add a mailman related section to the exim pages 
soon - if it doesn't appear, bug me!

[ Nigel Metheringham                  Nigel.Metheringham@VData.co.uk ]
[ Phone: +44 1423 850000                         Fax +44 1423 858866 ]