Recursos para Profissionais de TI > Página Inicial dos Fóruns > Transport > IMAP4 - error in APPEND command with large messages (26 Mb)
Fazer uma PerguntaFazer uma Pergunta
 

PerguntaIMAP4 - error in APPEND command with large messages (26 Mb)

  • quarta-feira, 25 de novembro de 2009 17:28mgsan Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     
    Hi all,
    when trying to upload a message into an Exchange Server 2007 IMAP folder using the APPEND command, the server returns the error "104 BAD Command Argument Error. 11"
    The message is a large message (~26 Mb) in RFC822 format.
    We are using a proprietary email client and the same command works on other IMAP4 servers, so it seems a limitation on the APPEND command in Exchange Server 2007. The message size limits on Exchange Server are configured to 100 Mb.

    Looking at the event viewer on the server I got the following exception:

    An unexpected exception Microsoft.Exchange.Data.Storage.ConversionFailedException occurred while processing a command for user xxxx. Microsoft.Exchange.Data.Storage.ConversionFailedException: Message content has become corrupted. ---> Microsoft.Exchange.Data.Mime.MimeException: Internal Mime error: Number of Header objects (100001) exceeded allowed maximum (100000).
       at Microsoft.Exchange.Data.Mime.MimeReader.StartHeader()
       at Microsoft.Exchange.Data.Mime.MimeReader.RunStateMachine()
       at Microsoft.Exchange.Data.Mime.MimeReader.TryReachNextState()
       at Microsoft.Exchange.Data.Mime.MimeDocument.BuildDom(Byte[] buffer, Int32 offset, Int32 length, Boolean eof)
       at Microsoft.Exchange.Data.Mime.MimeDocument.Load(Stream stream, CachingMode cachingMode)
       at Microsoft.Exchange.Data.Storage.ItemConversion.LoadInboundMimeDocument(Stream mimeIn, InboundConversionOptions inboundOptions)
       at Microsoft.Exchange.Data.Storage.ItemConversion.<>c__DisplayClass6.<ConvertAnyMimeToItem>b__4()
       at Microsoft.Exchange.Data.Storage.ConvertUtils.CallCts(Trace tracer, String methodName, String exceptionString, CtsCall ctsCall)
       --- End of inner exception stack trace ---
       at Microsoft.Exchange.Data.Storage.ConvertUtils.CallCts(Trace tracer, String methodName, String exceptionString, CtsCall ctsCall)
       at Microsoft.Exchange.Data.Storage.ItemConversion.ConvertAnyMimeToItem(Item itemOut, Stream mimeIn, InboundConversionOptions options, MimePromotionFlags promotionFlags)
       at Microsoft.Exchange.Data.Storage.ItemConversion.ConvertAnyMimeToItem(Item itemOut, Stream mimeIn, InboundConversionOptions options)
       at Microsoft.Exchange.Imap4.Imap4RequestAppend.Process()

    Please advise if it's a bug, a limitation or there are other ways to upload such large messages.
    Thanks!

Todas as Respostas

  • quarta-feira, 25 de novembro de 2009 18:11Will Shepherd Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     
    Have you tried changing the "Message MIME format:" option on the IMAP4 protocol on the CAS server?  I looks like it can't read the MIME format correctly if it thinks there are over 100000 Header objects.

    Thanks
    Will
    Will Shepherd - MCSE/MCITP/MCTS (Windows 2008,Exchange 2007,OCS 2007)
  • quarta-feira, 25 de novembro de 2009 19:02mgsan Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     

    Yes, but have the same problem.
    The message is a MIME multipart/mixed, with the first part a normal text/html and the second part a message/rfc822, as follows:

    ------=_NextPart_000_01BC2B74.89D1CCC0
    Content-Type: message/rfc822; name="message0004.eml"
    Content-Transfer-Encoding: base64
    Content-Description: message0004.eml
    Content-Disposition: attachment; filename="message0004.eml"

    RnTgThYuIldlcm5lciBMYXVmIiA8cmVkYWt0aW9uLWxkQGdteC5kZT4NClRvOiA8aW5mb0BuYXR1
    cmJhdS1tZWxkb3JmLmRlPg0KU4ViamVjdDogDQpEYXRlOiBUdWUsIDYgT1N0IDIwMDkgMDY7NDg6
    .... (~26 Mb of data)

    the contents of message0004.eml is an html message with a large PDF file attached

  • quarta-feira, 25 de novembro de 2009 19:20Will Shepherd Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     

    It looks like you are attaching an eml file to the email instead of a pdf file.  I just did a test with OE and here is the text from the eml file.


    From: "Will Shepherd" <wshepherd1@domain.COM>

    Subject:

    Date: Wed, 25 Nov 2009 14:08:12 -0500

    MIME-Version: 1.0

    Content-Type: multipart/mixed;

            boundary="----=_NextPart_000_0037_01CA6DD8.B9521BD0"

    X-Priority: 3

    X-MSMail-Priority: Normal

    X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350

     

    This is a multi-part message in MIME format.

     

    ------=_NextPart_000_0037_01CA6DD8.B9521BD0

    Content-Type: multipart/alternative;

            boundary="----=_NextPart_001_0038_01CA6DD8.B9521BD0"

     

     

    ------=_NextPart_001_0038_01CA6DD8.B9521BD0

    Content-Type: text/plain;

            charset="iso-8859-1"

    Content-Transfer-Encoding: quoted-printable

     

     

    ------=_NextPart_001_0038_01CA6DD8.B9521BD0

    Content-Type: text/html;

            charset="iso-8859-1"

    Content-Transfer-Encoding: quoted-printable

     

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

    <HTML><HEAD>

    <META content=3D"text/html; charset=3Diso-8859-1" =

    http-equiv=3DContent-Type>

    <META name=3DGENERATOR content=3D"MSHTML 8.00.6001.18702">

    <STYLE></STYLE>

    </HEAD>

    <BODY bgColor=3D#ffffff>

    <DIV>&nbsp;</DIV></BODY></HTML>

     

    ------=_NextPart_001_0038_01CA6DD8.B9521BD0--

     

    ------=_NextPart_000_0037_01CA6DD8.B9521BD0

    Content-Type: application/pdf;

            name="EX2010 Transition from 2007 to 2010.pdf"

    Content-Transfer-Encoding: base64

    Content-Disposition: attachment;

            filename="EX2010 Transition from 2007 to 2010.pdf"

     

    JVBERi0xLjUNCiW1tbW1DQoxIDAgb2JqDQo8PC9UeXBlL0NhdGFsb2cvUGFnZXMgMiAwIFIvTGFu

    Zyhlbi1VUykgL1N0cnVjdFRyZWVSb290IDYxIDAgUi9NYXJrSW5mbzw8L01hcmtlZCB0cnVlPj4+
    ...(more data)


    Will Shepherd - MCSE/MCITP/MCTS (Windows 2008,Exchange 2007,OCS 2007)
  • quarta-feira, 25 de novembro de 2009 19:41mgsan Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     

    Yes,
    I'm trying to upload an html message which has an eml file attached. This eml file is another html message with a pdf attched.
    The complete message structure is as follows.
    If I decode the base64 message0004.eml then I got the structure you sent.

    x-sender: <mauricio@xxx.lan>
    x-receiver: <mauricio2@xxx.lan>
    Message-ID: <260423200911224161653630@xxx.lan>
    X-EM-APIVersion: 3, 0, 2, 8
    X-CONV-ID: EC5DF0B4B0200
    X-INT-ID: EC5DF0B4B0200
    X-Mailer: Microsoft Office Outlook 11
    From: "mauricio" <mauricio@xxx.lan>
    To: "Hppc" <mauricio2@xxx.lan>
    Subject: ENC: test
    Date: Tue, 24 Nov 2009 14:16:02 -0200
    MIME-Version: 1.0
    Content-Type: multipart/mixed;
     boundary="----=_NextPart_000_01BC2B74.89D1CCC0"

    This is a multi-part message in MIME format.

    ------=_NextPart_000_01BC2B74.89D1CCC0
    Content-type: text/html; charset="iso-8859-1"
    Content-Transfer-Encoding: quoted-printable

    <html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micro=
    soft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" xm=
    lns=3D"http://www=2Ew3=2Eorg/TR/REC-html40">

    <head>
    <meta http-equiv=3DContent-Type content=3D"text/html; charset=3Diso-8859-1">
    ...
    </head>
    <body bgcolor=3Dwhite lang=3DEN-US link=3Dblue vlink=3Dblue>
    ...
    </body>
    </html>

    ------=_NextPart_000_01BC2B74.89D1CCC0
    Content-Type: message/rfc822; name="message0004.eml"
    Content-Transfer-Encoding: base64
    Content-Description: message0004.eml
    Content-Disposition: attachment; filename="message0004.eml"

    RnJvbTogIldlcm5lciBMYXVmIiA8cmVkYWt0aW9uLWxkQGdteC5kZT4NClRvOiA8aW5mb0BuYXR1
    cmJhdS1tZWxkb3JmLmRlPg0KU3ViamVjdDogDQpEYXRlOiBUdWUsIDYgT2N0IDIwMDkgMDY6NDg6
    ...

    ------=_NextPart_000_01BC2B74.89D1CCC0--

  • quarta-feira, 25 de novembro de 2009 19:55Will Shepherd Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     
    Ok, I think that's the problem the pdf file is base64 not the eml file, since you are attaching an eml file the Content-Transfer-Encoding should be 7bit. At least that's what I get when I attach an eml file. 
    Will Shepherd - MCSE/MCITP/MCTS (Windows 2008,Exchange 2007,OCS 2007)
  • quarta-feira, 25 de novembro de 2009 20:20mgsan Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     
    Hmmm, thanks!
    But isn't it a bug in Exchange? If I upload the same message stream to another IMAP4 server (hMailServer, for instance), using the same APPEND command, the message is stored and decoded properly on the inbox.
  • quarta-feira, 25 de novembro de 2009 20:27Will Shepherd Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     
    I wouldn't say it's a bug, Exchange is just trying to read the header of the attached eml and it's all in base64 so it's not what it is expecting as an eml file.
    Will Shepherd - MCSE/MCITP/MCTS (Windows 2008,Exchange 2007,OCS 2007)
  • terça-feira, 1 de dezembro de 2009 20:07mgsan Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     
    I disagree on this point, as Exchange should decode the base64 content first, and then try to interpret the content type (message/rfc822 in this case).
    Is there a way to open this ticket to Microsoft directly? Or there is another Microsoft database to look for any solution (or to confirm it's a limitation)?

    Thanks!
    Mauricio