Re: [Exim] queryprogram problem

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Philip Hazel
Data:  
Para: Chris Keane
CC: exim-users
Asunto: Re: [Exim] queryprogram problem
On 6 Jul 2000, Chris Keane wrote:

> addrcheck eth0 1.2.3.4 && echo "OK some_transport" && exit 0
> addrcheck ppp0 5.6.7.8 && echo "OK remote_smtp smtp.host.ispA bydns_a" && exit 0
> addrcheck ppp0 9.8.7.6 && echo "OK remote_smtp smtp.host.ispB bydns_a" && exit 0
> echo "DEFER no external link at present"
> exit 0
>
> Unfortunately this doesn't work. Running with -d9 shows that
> /path/to/mail-route is giving the output I'd expect, and exim says that
> the message passed okay, but it seems to ignore the transport being given,
> and goes on to fail with "xxx unrouteable".


Hmm. I would expect some other error if it didn't find the transport,
like "unknown transport name".

However, taking a look at the code suggests there may be a small bug. I
will set up a test as soon as I can, but in the meanwhile you might like
to test it yourself. Starting at line 313 of src/routers/queryprogram.c
you should see

/* Second field was empty or "+"; get the transport for this router, if
any. It might be expanded, or it might be unset (which is not an error). */

  if (!route_get_transport(rblock->transport, rblock->expand_transport,
        addr, &transport, rblock->name, NULL))
    return ERROR;


The bug is that there should be an "else" immediately before that "if",
so that it reads

else if (!route_get_transport(rblock->transport, rblock->expand_transport,

Please let me know if this fixes the problem.

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