E-Mail Problems - MAIL_MESSAGE
- From: "Jamie Allison" <jamie@xxxxxxxxxxxxxxxxxx>
- Date: Wed, 29 Mar 2006 22:16:33 GMT
Hi All,
I have the below script hosted on a website which i run. The problem is
that someone seems to be using it to send SPAM out vie the HTML form i use
for people to input thier details. I have hardcoded the recipient into the
CGI script so does anyone know how they can manage to use this script to
send out mail as SPAM and what i should change to stop it? It is causing us
realy problems. I have removed the script until we can find a fix as we
are receiving hundereds of delivery failures to random addresses a day.
Any help at all would be appreciated.
Regards
Jamie
----------------------Code -------------------------------------------------------
#use lib "/home/username/local/lib/site_perl/5.6.0/i686-linux/";
#use lib "/home/username/local/lib/site_perl/5.6.0/";
use CGI -debug;
use CGI::Carp fatalsToBrowser;
$rgt = new CGI;
$recipient = "jamie\@jamieallison.co.uk";
$subject = $rgt->param("subject");
$redirect = $rgt->param("redirect");
$senderName = $rgt->param("senderName");
$sender = $rgt->param("sender");
$body = $rgt->param("body");
$sendmail = '/usr/lib/sendmail';
email($subject,$recipient,$sender ,$sender ,$body, $senderName);
print "Status: 302 Moved\nLocation: $redirect\n\n";
sub email ($$$$$$)
{
my ($subject, $to, $from, $etitle, $body, $senderName) = @_;
open (MAIL, "| $sendmail -i -t" );
print MAIL <<MAIL_MESSAGE;
Subject:$subject
To:$to
Reply-to:$from
From:$etitle
$senderName sent the below message:-
$body
MAIL_MESSAGE
close MAIL;
}
return 1;
--------------------------------end
code----------------------------------------
.
- Follow-Ups:
- Re: E-Mail Problems - MAIL_MESSAGE
- From: Gunnar Hjalmarsson
- Re: E-Mail Problems - MAIL_MESSAGE
- From: A. Sinan Unur
- Re: E-Mail Problems - MAIL_MESSAGE
- Prev by Date: Re: Telnet to multiple systems, continue on failure
- Next by Date: Re: E-Mail Problems - MAIL_MESSAGE
- Previous by thread: SOAP::Lite creating remote objects
- Next by thread: Re: E-Mail Problems - MAIL_MESSAGE
- Index(es):
Relevant Pages
|
|