Re: [Exim] PATH oddity in pipe transport

Pàgina inicial
Delete this message
Reply to this message
Autor: Philip Hazel
Data:  
A: Glenn Carver
CC: exim-users
Assumpte: Re: [Exim] PATH oddity in pipe transport
On Fri, 19 Jul 2002, Glenn Carver wrote:


> The problem appears to be that the transport_filter program I specify
> always wants an absolute path.


Yes, I'm afraid that's the way transport filters work.

> If I make it relative and use the 'path =
> /usr/bin' then the router fails. It's quite possible that I've set
> something up wrong but if I have it's a little obscure.


Transport filters can be applied to any transport. "path=" is an option
of the pipe tranport (and no others). It applies only to the command
that is being run by the pipe. That's basically why it works the way it
does.

> Now if I change the transport_filter line to read:
> transport_filter = /usr/bin/tee -a /tmp/spamcheck.log
>
> ..it works! The log file shows a clean delivery and as expected I get a copy of the message in /tmp/spamcheck.log.


But note that you'll get interleaved messages if two arrive at once...

> The spec clearly says that the path option specifies the string setup

in the PATH env. variable of the subprocess. If the 'command' path is
not absolute then it should look for the tee command in path. So I think
my first attempt should work.


This is the documentation for the pipe transport. It's talking
exclusively about the subprocess that is run by the pipe, and the
"command" argument of the pipe transport. It is not talking about the
transport filter subprocess, which is something that happens up at a
higher level (because it can apply to all transports, not just pipes).

I'll make this clearer in the next edition (which won't be for a while,
because I've just released a new edition this morning).

Philip


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