tmpMsgIn = new TeeInputStream(msgIn, out);
bIn = new BodyOffsetInputStream(tmpMsgIn);
// Disable line length... This should be handled by the smtp server component and not the parser itself
// https://issues.apache.org/jira/browse/IMAP-122
MimeEntityConfig config = new MimeEntityConfig();
config.setMaximalBodyDescriptor(true);
config.setMaxLineLen(-1);
final ConfigurableMimeTokenStream parser = new ConfigurableMimeTokenStream(config);
parser.setRecursionMode(MimeTokenStream.M_NO_RECURSE);
parser.parse(bIn);
final Header header = new Header();