Re: [exim] Help debugging pipe transport

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Nigel Wade
Date:  
À: Exim users list
Sujet: Re: [exim] Help debugging pipe transport
Jason Martens wrote:
> 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?
>
> Thanks again,
>
> Jason Martens
>


The most likely reason I can think of is that your script is returning exit
status 127. When strace runs the script the exit status returned to exim is
the exit status of strace, not that of your script.

If you run your script from the command line, what's the exit status?


-- 
Nigel Wade, System Administrator, Space Plasma Physics Group,
             University of Leicester, Leicester, LE1 7RH, UK
E-mail :    nmw@???
Phone :     +44 (0)116 2523548, Fax : +44 (0)116 2523555