whateverblog.
So many RFCs, so little time
Tuesday, February 11, 2003 12:29 PM
One of my goals as of last week was to ship Poorman IMAP with as few external lib dependencies as possible--specifically, I wanted to do without JavaMail (and the Java Activation Framework which it needs). JavaMail has a lot of stuff I simply don't need and I don't necessarily trust the code to be efficient--I've heard mixed rumblings about it.

I thought the only things I needed JavaMail for were to retrieve mail from POP mailboxes and to parse RFC822 headers. I was able to implement both of those myself fairly easily. After reading the RFCs on MIME yesterday, JavaMail is back in--it's just too much work right now to write my own MIME parser, especially since the RFC is almost impossible to read. It's something I'd definitely like to revisit before I'm done, but for now I think my time is better spent on other aspects of the server.

I also got an answer about header fields and body structure. According to the one or two responses I got on comp.mail.imap, I don't need to cache header fields (they're cached on the client side by most modern clients) and only need to cache body structure because Netscape Communicator does partial fetches of body parts. I think I'm going to just cache the most recently used body structure for each session, and throw out the cache when the session closes.