Re: [Exim] piping problem

Etusivu
Poista viesti
Vastaa
Lähettäjä: Greg Ward
Päiväys:  
Vastaanottaja: Marc Perkel
Kopio: exim-users
Aihe: Re: [Exim] piping problem
On 10 December 2001, Marc Perkel said:
> This pipe isn't working for some reason. Other pipe programs seem to
> work. It's being run from the /etc/aliases file.
>
> test1234: "| /bin/cat >> /var/mail/test1234"
>
> The results are:
>
> This message was created automatically by mail delivery software (Exim).
>
> A message that you sent could not be delivered to one or more of its
> recipients. This is a permanent error. The following address(es) failed:
>
>   pipe to | /bin/cat >> /var/mail/test1234
>     generated by test1234@???
>     Child process of address_pipe transport returned 1 from command:
>     /bin/cat

>
> What am I doing wrong?


I believe Exim does *not* run your pipe through a shell by default, so
your pipe is the moral equivalent of

% cat ">>" /var/mail/test1234

cat is presumably failing because there's no such file as ">>".

You could either set use_shell on the pipe transport used for your alias
file, or set the alias to this:

test1234: "| /bin/sh -c /bin/cat >> /var/mail/test1234"

...or words to that effect. Untested, YMMV.

        Greg
--
Greg Ward - software developer                gward@???
MEMS Exchange                            http://www.mems-exchange.org