Wow, I love the idea. I have always wanted to manage my mail via terminal, but didn't want to set up Mutt or something similar.
Setting up mutt for GMail these days is no harder than setting up vmail. This is a complete config file for mutt that will connect to your gmail account: set folder=imaps://imap.gmail.com:993 set spoolfile=+INBOX set imap_user='your_username@gmail.com' set smtp_url = "smtp://your_username@smtp.gmail.com:587/" If you don't want to enter your password every time, you can set it as imap_pass (for reading) and smtp_pass…
Note also that you must use caution when using Google's smtp and other network services, as they tend to do whatever they want, regardless of RFCs and standards[1].