Hello Linux Community!

First of all, I want to let everyone know that I've been a long-time lurker and have found this site among other very helpful in fully migrating to Fedora from Windows a couple years ago. I am currently running Fedora 10 and enjoy every minute of it.

Anyway, I have kind of unique project I'm working on. I receive work assignments via email and require me to click a link in the email to accept the assignment. More often than not, the assignment is awarded on a first-guy-to-click-it basis.

My idea is to set up a Gmail IMAP account and have a IMAP client which supports the idle protocol running on my machine, probably in a terminal. Idle support is necessary so that I receive the message immediately upon arrival to the server. Those using push email on their iPhone or Palm Pre are familiar with this concept.

When the email comes in, I have a script or something parse the email, find the URL, and wget the URL so that it is accepted. No need to actually open firefox or opera. Once accepted, they send another email to confirm the assignment was accepted.

I've made some progress, but thought the brilliant minds on this forum could help me further. I've discovered only one linux IMAP client which supports the IDLE protocol. I've tested it and emails come in immediately, sometimes even faster than they appear on the Gmail web browser login screen. The client is called "cone". The files are located in ~/.cone/. My problem is that when a message comes in, a .cache file changes to reflect the "list" of emails, but the actual email's headers are not actually downloaded until I hit Enter within the terminal running cone to download the message. I need to find a way to download the whole message immediately when it's received, then find the URL, then hit that URL with the wget command. When the message is opened, an additional file called 1.tmp is created in this folder containing the whole message.

Anyone have any ideas to help with this project?