Re: [Exim] pipe outgoing messages

Pàgina inicial
Delete this message
Reply to this message
Autor: Greg Ward
Data:  
A: exim-users
Assumpte: Re: [Exim] pipe outgoing messages
On 22 February 2002, Todd Jagger said:
> Here's the system_filter entry:
>
> if $message_headers contains "X-insert-tag-here" then
>     pipe "/usr/local/bin/python /usr/local/tmda/bin/tmda-sendmail"
> seen finish
> endif


That looks like a sensible way to do it, assuming that your "X-" tag is
a solid guarantee that this really is outgoing mail.

> And the error output by Exim is:
>
>       Child process of address_pipe transport returned 127 from
> command:
>      /usr/local/bin/python

>
> ------ pipe to |/usr/local/bin/python /usr/local/tmda/bin/tmda-sendmail
>         generated by message filter ------

>
> env: python: No such file or directory


Check the first line of tmda-sendmail; I bet it is

#!/usr/bin/env python

which is a lovely hack used in the Python world to avoid having to
hardcode the path to the Python interpreter. Unfortunately, it's not
100% reliable, and really should not be used in a production
environment. Change it to

#!/usr/local/bin/python

and I bet you'll be fine.

However, given your Exim "pipe" command, I don't really understand why
your kernel is even consulting the #! line. Which OS is this?

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