LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Fetch mail, periodically (https://www.linuxquestions.org/questions/linux-newbie-8/fetch-mail-periodically-703900/)

D-a-a-n 02-11-2009 10:36 AM

Fetch mail, periodically
 
Hi,

I have this following problem:

At my students room we have this server (running Gentoo), which is used to account the down and upload volume (using freeRadius/Chillispot)from all students.
But we also have this messages/post (PHP/mysql) system on the login page, so when users go to the login page, they see the latest messages, and they can post a message as well.

The problem is that the owner of the student's room also wants to post messages, but he doesn't have a computer. Though he can send emails using his digital tv or something.

This is my solution: I make an email address(blabla@gmail.com), the owner just sends a mail to blabla@gmail.com. The server periodically (cron?) checks for new mail at this address, parses the message, and then posts it on the messages system.

How do I achieve this? (checking gmail, retrieving newest message, parsing message so that it can be piped to a script for further processing).

Sorry for my long question, thanks in advance.

Greetz Daan.

P.s. If you have better ideas, tell me please! :)

jstephens84 02-11-2009 10:54 AM

you could use fetchmail to pull down the messages into a mailbox. Then have a cron job run a script afterward that would look at what ever needed parsing then send them to wherever they need to go.


All times are GMT -5. The time now is 10:56 AM.