[EXIM] Problem spawning exim in pipes

Top Page
Delete this message
Reply to this message
Author: Julio
Date:  
To: exim-users
Subject: [EXIM] Problem spawning exim in pipes
I've configured a pipe in my /etc/aliases file as:

tst: "|/tmp/xxx"

and made the "/tmp/xxx" file be:

---------- cut here ----------

#!/usr/bin/perl

while (<STDIN>) {
    $message .= $_;
}


open (SENDMAIL, "| sendmail testuser");
open (TEMP, ">/tmp/yyy");
print SENDMAIL $message;
print TEMP $message;

close (TEMP);
close (SENDMAIL);

---------- cut here ----------

If I just execute "/tmp/xxx" with some text in the standard input, the
"testuser" user receives
correctly an e-mail corresponding to the data entered, and this data is
written in "/tmp/yyy". However,
if I send an e-mail to "tst" (that pipes the e-mail data to the
"/tmp/xxx"), the e-mail body is
correctly written to "/tmp/yyy", but no mail is sent to "testuser". Is
this the expected behavior for
pipes in exim (ie. not allowing external exim processes in pipes)? How
do I workaround this to have the
e-mail correctly sent? Thanks,

Julio


--
*** Exim information can be found at http://www.exim.org/ ***