So this past week or so I've been pretty bored. With school out it is rather lame. I decided to torture myself further and try hacking again at making an IMAP interface to Gmail.
I didn't really get much further along, but I did manage to get it working with Thunderbird:
I don't really recommend using this at all. It's more of a proof of concept and something to keep me busy. The code is absolutely horrible. It fetches ALL mail from your Gmail inbox at startup no matter what. I found that the hardest thing for me to do and what took the most time (and probably is buggy as hell) was trying to parse a string such as:
a0004 FETCH 1:1 (UID FLAGS INTERNALDATE RFC822.SIZE BODY.PEEK[HEADER.FIELDS (DATE FROM SUBJECT TO CC MESSAGE-ID REFERENCES CONTENT-TYPE IN-REPLY-TO REPLY-TO LINES X-LABEL)])
The parentheses and brackets can be nested, so above might also have '.. FLAGS (\Seen) ..' etc. That's what makes this difficult. I'd appreciate any algorithms
. I also got to see how the various IMAP clients work. I found that mutt is the cleanest IMAP client. I could not get it working with Apple Mail and may try again later. I probably spent more time looking at tcpdumps when sane people would look at the IMAP RFC
. Go here if you are feeling brave. Don't blame me if you lose all your mail. I don't see how that can happen, but you've been warned.
This is my personal blog. The views expressed on these pages are mine alone and not those of my employer.
| 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 | 31 | |||||