Just trying to help get this fixed quick so please excuse me if I overstep but I took a quick look at the Zimbra source last night and saw that there's a FIXME note saying that javamail always returns '-1' for getLineCount() in the MimePart class (Part interface). Then looking at the javamail source (which is now available to the public) and sure enough, the implementation for this method simply says "return -1;". I'm pretty sure I was looking at the latest javamail 1.4 source. I did find something interesting over at the Apache James project which provides a MimeMessageWrapper class which overrides and fixes the getLineCount() implementation. Could this wrapper be used instead of directly calling javamail directly or can you create a similar wrapper class yourself?
Here are some links...