From: Hugh Sasse Date: 2005-12-01T02:01:20+09:00 Subject: Re: Exim mail filter in ruby On Thu, 1 Dec 2005, chrisjroos@gmail.com wrote: > Hi, > > I have a requirement to create a shell script that accepts data on it's > standard input, calls another shell script (out of my control), passing > an amended copy of the original input, and collects anything sent to > stderr and stdout by the external script. This shell script is to be > used as a mail filter being called from exim. I don't find this description very clear. Which part of exim are you using to do this? That might help me understand. > > I got a basic version working using Kernel.open but got very confused > when trying to trap the output of that external script (stderr and > stdout). What about using the shell in popen("/bin/sh command 2>&1", "r+") ? The stdout and stderr are combined, but you can still write to it. Hugh