Should it be easy to connect to a POP3 server, search for a text pattern, manipulate the string, then navigate to the URL (manipulated text string), delete message... then repeat?
How about posting custom HTTP requests with python?
Ive just started reading a few tuts online, probably will go out looking for a cheap book tomorrow.