in reply to give perl an email

thanks everyone for your help! i found the answer in the article my life with spam as someone graciously pointed out. so i had perl bounce an email back to me, since if i know the info is passed, i can do anything with the data ;)

i have qmail on a freebsd server, so my .qmail file looked like this:

|/usr/home/justin/wwwdev/cgi-bin/mojo/take_mail.cgi

and my little program looks like this: (lots of code... ok almost all the code from the soam article)

 

#!/usr/bin/perl 
#take_mail.cgi
use strict; 
my ($header, $body); 

my $recieved = "/usr/home/justin/wwwdev/cgi-bin/mojo/recieved.html";
my$mailprog = "/usr/sbin/sendmail";
{ local $/ = ""; 
 $header = <STDIN>; 
 undef $/; 
$body = <STDIN>; 
} 

open(MAIL,"|$mailprog -t");
print MAIL "From: <justin\@skazat.com>\n";
print MAIL "To: <justin\@skazat.com>\n";
print MAIL "Subject: perl wants to  says hi to you all\n\n";
print MAIL "header: $header\n";
print MAIL "body: $body\n\n";
close (MAIL);

and thats all there is too it, thanks everyone!