if you can modify the alias in sendmail for this email address, this
should get you started.

#!/usr/bin/perl
# mailbot.pl

$debug =1;

#invoked from /etc/aliases like this
#mailbot:    [EMAIL PROTECTED], "|/home/cgalpin/bin/mailbot.pl"

open (LOG, ">/tmp/mailbot.log" ) if $debug;
print LOG "Got Message.\n" if $debug;


while(<STDIN>) {
    # do something useful here
    print LOG $_ if $debug;
}

exit 0;


On Fri, 19 Nov 1999, Ward William E PHDN wrote:
> 
> Here's the problem:
> 
> I want to create a web page that I update based on information coming in via
> email messages.  Basically, I'll extract a message ID, the sender's name,
> the time, date, and subject.  No problem on that... I know how to do it, I'm
> doing it in Perl.  Problem is, I've forgotten how to set the .forward to
> pipe my incoming email message to the program.  For testing, I'd actually
> like to pipe it to a file first, then build the full featured pipe to the
> program.


-- 
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.

Reply via email to