I am trying to set up a pipe to a shell script.

rt_router:
 driver = accept
 local_part_prefix_optional
 local_part_prefix = rt-
 transport = rt_transport

rt_transport:
 driver = pipe
 command = /usr/local/bin/rtcat

The goal is to have exim dump the email to a shell script if it's prefaced with a 'rt-'.

The router and transport above work - as long as I don't use redirection in the above scrips. As soon as I use redirection, the transport fails.

So for rtcat:

#!/bin/sh

echo 1234567 > /tmp/abc

results in

2011-09-09 20:47:34 1R2EXW-00017z-RW ** [email protected] <[email protected]> R=rt_router T=rt_transport: Child process of rt_transport transport returned 1 from command: /bin/sh

but for rtcat:

#!/bin/sh

echo 1234567

works (there's no error logged) but obviously there's no output.

What am I doing wrong? I want to process the mail through a shell script.....

--
Few people are capable of expressing with equanimity opinions which differ from 
the prejudices of their social environment. Most people are even incapable of 
forming such opinions.
   Albert Einstein


--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

Reply via email to