Re: [EXIM] Problem spawning exim in pipes

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Philip Hazel
Data:  
Para: Julio
CC: exim-users
Assunto: Re: [EXIM] Problem spawning exim in pipes
On Sun, 25 Apr 1999, Julio wrote:

> ---------- 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 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".


What goes wrong? You are not testing for failures in your Perl. I
strongly suspect that

open (SENDMAIL, "| sendmail testuser");

is failing. I would hazard a guess that this a path problem. Try
replacing "sendmail" with "/usr/lib/sendmail".

-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.



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