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! :) |
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. |