Index your Gmail account to a SQLite DB and play with the data.