Re: [Exim] Exim-4.10 messages vanishing without a trace.

Góra strony
Delete this message
Reply to this message
Autor: Philip Hazel
Data:  
Dla: exim-users
CC: Tom Marazita
Temat: Re: [Exim] Exim-4.10 messages vanishing without a trace.
On Wed, 14 Aug 2002, Philip Hazel wrote:

> I'll look into this. Way back in testing (Exim 3.953) a bug like this
> was supposed to have been fixed:
>
> 55. If an address was redirected to itself more than once (e.g. by two
>     different "redirect" routers, or because of the use of "unseen", it was
>     incorrectly discarded as a duplicate address.

>
> It may be that the bug wasn't sufficiently squashed...


Tests confirm that I screwed up. This is a bug in an area which I've
already noted has got far too contorted and needs proper fixing. That
means that a quick fix to the code isn't easy. At least I now have
another test that the re-designed code will have to pass.

For a workaround, I was going to suggest that you use a rewriting rule
to avoid Exim actually trying to route domains with only a single
component. For example:

\N^[^@]+@[^.]+$\N $local_part@$domain.ucsb.edu

However, I see in your configuration that you actually have two widen
domains:

widen_domains = "engr.ucsb.edu:ucsb.edu"

That rules out a simple rewrite (unless you can do without one of
those).

Basically, to work around this bug you have to find a way of handling
one-component domains without using widen_domains. Here is a dreadful
hack up of a sequence of routers (untested) that might do the trick:

# If the domain has only one component, add .engr.ucsb.edu and move on
# to the next router. Remember we did this by setting $address_data.

fr1:
driver = redirect
domains = ^[^.]+$
address_data = $domain
data = $local_part@$domain.engr.ucsb.edu
redirect_router = fr2

# This is a traditional dnslookup router. It won't ever be presented
# with a single-component address.

fr2:
driver = dnslookup
domains = ! engineering.ucsb.edu
transport = remote_smtp

# If we previously added engr.ucsb.edu, but have arrived here, the
# domain we created doesn't exist. So try the other widening, first
# unsetting $address_data so that we don't loop.

fr3:
driver = redirect
condition = ${if eq{$address_data}{}{no}{yes}}
new_address = $local_parts@$address_data.ucsb.edu
address_data =
redirect router = fr2

# Finally, we need a router to bounce non-local domains that haven't
# been handled by the above.

fr4:
driver = redirect
domains = ! engineering.ucsb.edu
allow_fail
data = :fail:Unknown domain $domain


Phew! What a mess. If my real fix to the code isn't too messy, I'll send
you a patch in due course.

Philip

--
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.