Συντάκτης: Jason Martens Ημερομηνία: Προς: exim-users Αντικείμενο: Re: [exim] Help debugging pipe transport
On Thu, 2005-04-14 at 10:25 -0600, Jonathan Briggs wrote: > On Thu, 2005-04-14 at 10:53 -0500, Jason Martens wrote:
> > I have a pipe transport set up to run a specific script, but when an
> > e-mail gets routed to the transport, I get the following error message:
> >
> > 2005-04-14 09:07:38 1DM50L-0005dc-S3 **
> > localpart@??? R=test_router T=test_transport:
> > Child process of test_transport transport returned 127 (could mean
> > unable to exec or command does not exist) from
> > command: /usr/local/bin/testScript
> >
> > I've checked everything I could think of, but I can't figure out why the
> > script won't execute. The permissions are 775. How can I get more
> > debugging information to find out why it refuses to execute?
>
> Usually a permissions problem. Exim runs as user mail, at least on my
> system, so try:
> # su -s /bin/bash mail
> # /usr/local/bin/testScript
>
> and see what happens. Depending on your pipe transport config, it could
> be trying to run as some other user instead.
>
> The other thing to try would be to change the pipe command to
> strace -o /tmp/tracelog -f /usr/local/bin/testScript
Ok, the mystery deepens. I added the "strace -o /tmp/tracelog
-f /myscript" to the transport, and the script executes. However, after
removing it, I get the same error I reported earlier. I tried adding
"sh" to the front of the script and also got 127 error. Why would the
script execute without a problem while strace is there, but not at all
without it?