I've got my own LAMP server and I need to be able to check emails as they come into the server. What I need to do is check to see if an email has been received from PayPal, and then if so, extract an item ID from the body of the email then run a script to update a database.
Is there something prebuilt into the OS that could deal with this?
Any information would be great as I'm supposed to launch something tomorrow and I can't until I've resolved this!
There is probably a better way to do this but if I were you I would just parse the mail file every 5 minutes and extract the new id. You can probably do a tail on it to avoid parsing the whole thing. So if the mail is going to root then the mail file is in /var/spool/mail/root and you could write a script to parse that (or the last 1000 lines of it to save time, depending on your volume) every 5 minutes, get the id's, insert any new ones into the db.