Lähettäjä: Pete Naylor Päiväys: Vastaanottaja: exim-users Aihe: Re: [Exim] host_address and smtp
Philip Hazel wrote...
> Oh, wait. As you were. It's a timing problem. The headers_add and
> headers_remove options are expanded at the start of the transport,
> before it starts connecting to different hosts. So yes, at that time
> $host_address won't be set.
Thanks for the reply Philip. In this case, the host (or list of hosts)
has been passed to the transport by a router (just as would happen for a
local transport, where $host_address _is_ defined). While the transport
has not yet connected, surely it knows or has access to a variable
defining where it will connect? It just seems to me that this could be
one of those expansion items that _might_ be defined in a transport
depending on whether it was provided by a director/router. If it wasn't
supplied, the value would be null.
> The only way to do what you want is to use a transport filter. That's
> expensive in resource terms.
I'm considering that, but the resource cost is troubling me. I'm also
considering using a local transport (pipe) to pipe the message back into
the queue via /usr/lib/sendmail.