On Fri, Nov 19, 1999 at 02:48:53PM -0800, Denis Voitenko wrote:
> I have a silly idea of writing a small robot that would accept message
> bodies in format like
> 
> http://www.whateverurlyouwhish.com
> http://... [as many urls as you wish]
> 
> and reply to it with the content of the web page. I have attempted to do so
> by creating an alias like .qmail-robot with content
> 
> | /home/robot/script.pl
>
> but something is not working out. Should I pass messages some other way?

If the script just prints the webpages to stdout then you're doing it wrong. 
You must send the content to a pipe 

like this ($newbody contains your fetched pages):

open MAIL,"| /var/qmail/bin/qmail-inject $ENV{SENDER}";
print MAIL "From: url auto responder <url\@whatever.com>\n";
print MAIL "\n";
print MAIL "$newbody";
close MAIL;

/magnus



Reply via email to