Schedule a script to check mail?

Hi,

I'd like to somehow schedule a task on my webserver, such that my account's mail is checked every 10-15 minutes and:

a) any new e-mails received from a particular address are POST-ed to a PHP webpage on my server.

b) any new e-mails received from a different particular address are auto-replied to.

Not being stunning with Unix, and not being the administrator of the server (and it doesn't have ProcMail or anything like that on it) is there any way I can do this, or am I barking up the wrong tree?

Cheers,

Stu

Have a look at the mailcheck utility. Will do quite a bit
of what you want.

"Mailcheck is a simple, configurable tool that allows multiple
mailboxes to be checked for the existence of new mail
messages. It supports both mbox and maildir-style mailboxes,
for compatibility with most mail transport agents. It also
supports remote POP3 and IMAP mailboxes."

Its available for Linux and probably could be ported to
other OSes with minimum effort.

i recently did something similar just for fun. i have a perl script which dumps the messages in a specified mail spool file. then, this script is run via a cron job which dumps that output to a .html file which in turn is a nice small bbs. a semi-dynamic page, without the extra webserver load! (however you could argue running that perl script ever half hour or whatever is just as much load. but actually with a lot of traffic its less load than if apache did it dynamically). anyway here is the script the way i am using it now:

#!/usr/bin/perl

# this is the perl script for the BBS section of farragutmarine.com/~joe

use Mail::Box::Mbox;

my $folder = Mail::Box::Mbox->new( folder => '/var/mail/bbs' );
my $head = Mail::Message::Head->new;

foreach my $msg ( reverse ($folder->messages()) )
{


	print "<div align=\"left\"><table border=\"0\" cellpadding=\"5\" cellspacing=\"1\" bgcolor=\"#000000\" style=\"width: 632px; height: 158px;\"><tbody><tr><td bgcolor=\"#eeeeff\"><table border=\"0\"><tbody><tr><td align=\"right\"><font color=\"#000000\">Message:</font></td><td><font color=\"#000000\">",$msg->replyPrelude($head->get('sender')),"<br></font></td></tr><tr><td align=\"right\"><font color=\"#000000\">Subject:</font></td><td><font color=\"#000000\">",$msg->subject(),"<br></font></td></tr></tbody></table></td></tr><tr><td bgcolor=\"#ffffff\">",$msg->body(),"<br></td></tr></tbody></table></div><br>";

}

as you can see, you need the Mail::Box::Mbox perl module.

here are the threads where the great people here helped me to write this :