RE: [Exim] Solaris 2.6, Perl 5.6.1, exim 3.22 - Can't open p…

Top Page
Delete this message
Reply to this message
Author: Gustav H Meyer
Date:  
To: Suresh Ramasubramanian, exim-users
Subject: RE: [Exim] Solaris 2.6, Perl 5.6.1, exim 3.22 - Can't open pipe
>>> Is it possible that the message you're piping to Exim from
>>> within your CGI script contains headers that only trusted
>>> users are allowed to provide?
>>
>> Which headers are trusted and which are untrusted.
>
> I wasn't following this thread - but are you trying to do a
> sendmail -f by any chance? Untrusted users are not, by default,
> allowed to set the envelope sender in exim.


Nope I'm not doing a sendmail -f. I'm doing a 13 line perl script like this:
     1  #!/usr/bin/perl -w
     2  use CGI;
     3  use CGI::Carp 'fatalsToBrowser';
     4  my $mailprog = "/usr/local/bin/exim";
     5  my $recipient = "gustav\@gcis.pwv.gov.za";
     6  open (MAIL, "|$mailprog $recipient") or die "Can't open $mailprog:
$!";
     7  print MAIL <<"EOM";
     8  From: Gustav H Meyer <gustav\@gcis.pwv.gov.za>
     9  To: $recipient
    10  Subject: Test mail from webserver
    11  Anything here....
    12  EOM
    13  close MAIL or die "Can't close pipe to $mailprog: $!\n";


I get the following in the browser:
Can't close pipe to /usr/local/bin/exim:

> In exim 3.20 onwards, the option you need is
>
>untrusted_set_sender=yes


Tested "untrusted_set_sender=yes" and get same result.
Tested "trusted_users = nobody" and get same result.

>> Great now we're onto something. If I execute the script on
>> the commandline as nobody I get the following:
>> 2001-06-28 14:41:18 15Fb6k-00071E-00 Failed to create spool file
>> /var/spool/exim/input//15Fb6k-00071E-00-D: Permission denied
>> Why didn't I try this before. :(
>
>Permissions problem?


Clearly it is something to do with permissions and I bet you it's
because I run an old version of Apache. Version 1.3.0 (Ouch!!)
I'll upgrade ASAP. But then again it does not make sense.

Regards,
Gustav