So I've been pretty bored lately and came across libgmail, a Python library to access Gmail. It's very much a hack in that emulates a web client.
But I was thinking, why don't I use this to write an IMAP interface to Gmail? So a few days ago I started working on such a hack. I'm sort of working backwards on this. Normally people would read the RFC. But instead, I configured mutt for IMAP, and started looking at some packet captures. I figure mutt's probably the cleanest IMAP client. I made my proxy behave how mutt expected from a normal IMAP client. Every now and then I'd refer to the RFC, but not much
. In the backend, my proxy uses libgmail to get the needed info.
It's nowhere near completion, but I did get it to load up my inbox index in mutt. Here's a screenshot of my gmail account:

And here's a screenshot of mutt:

There are major problems in that when the message list is retrieved, all new messages are marked as seen. I don't see a way around this, since I need to get info on all messages to generate a proper index. I don't actually fetch the raw message to generate the message list, but instead 'fake' them by looking at the various info from the web interface (message date, from, to, subject, etc).
I'll probably post the code as soon as its in some usable state. But at that point, Google may have already released IMAP support
. It's a fun project nonetheless.
Update: A few people have asked about this, and unfortunately I've had no time to work on it. It's in a pretty much unusable state. It only works with mutt and you can only view messages in the Inbox (cannot send, change folders, etc). I've posted the code here, but be warned it's unusable.
Donate to keep this site going!
| Mon | Tue | Wed | Thu | Fri | Sat | Sun |
|---|---|---|---|---|---|---|
| << < | > >> | |||||
| 1 | 2 | 3 | 4 | 5 | ||
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 27 | 28 | 29 | 30 | |||