Thunderbird vs Exchange IMAP

I was having issues with attachments only being partially downloaded in Thunderbird from an IMAP account on a MS Exchange server (2003 I think). Turns out I ran into a very old Thunderbird bug (filed 2001-07-24). MS Exchange by default does not return the actual size to the IMAP4 command “FETCH RFC822.SIZE”. This is deliberate as it provides a nice perfomance advantage.

So… like a good Linux user I should once again blame Microsoft software for being broken? Not this time. It turns out section 3.4.5 of RFC 2683 (IMAP4 Implementation Recommendations) says that the RCF822.SIZE value should only used for things like providing estimates to the user and not for allocating buffers and the like. Bad Thunderbird!

The work around is to go to Preferences > Advanced > Config Editor… and set mail.server.default.fetch_by_chunks to FALSE. Old emails will need to be redownloaded to fix the attachments.

One thought on “Thunderbird vs Exchange IMAP

  1. Haha, this rings bells with me. I had to work around this very same “problem” with the JavaMail library when fetching from Exchange servers using IMAP. The JavaMail documentation was of course trying to pin the problem on faulty servers…even though they aren’t breaking any spec. I’m glad you found the same Microsoft Support link I did regarding the issue.