On 24 Feb 2003 at 13:59, Sang Park wrote:

> I know that this isn't necessarily about IMAP but I was wondering if
> anyone here has ever come across a mime validation tool while
> developing an IMAP server or client. The reason I ask is because an
> IMAP/SMTP API that I've developed has come across a bug where in a
> message with only a text/plain body part the Content-Type header of
> the message would read 
> 
> Content-Type: text/plain; boundary="--xxxx--";
> 
> someone notified me that a boundary parameter on a single part message
> is NOT valid mime and causes problems with servers and clients that
> adhere strictly to the RFC. 

Any "properly-written" IMAP parser should simply ignore the "boundary" 
tag, since it won't expect it to be there. Even if it *did* try to do 
something with it, there's the question of what it could possibly mean, 
since text/plain cannot, by definition, have multiple parts.

> Secondly, I was wondering if anyone has come across a tool for 
> validating the MIME of a message that validates it's syntax strictly 
> according to the RFC1521. Ideally, all mail clients and servers would be 
> RFC1521 compliant but this is not the case.

The best thing I've *ever* encountered is Mark Crispin's "torture test" 
mail message. This is a massively complex 1.8MB mail message that 
uses just about every aspect of MIME. If your parser can parse this 
message reliably, then it can parse just about anything. You probably 
think you have a good MIME parser already - well I'm telling you that 
this message will change your mind and will probably get you doing a lot 
of rewriting - I know it did for me.

I'm sure Mark can send you the formal URL for the file; alternatively, if 
he'd prefer, I don't mind ZIPping it up and mailing it to you offline.

Cheers!

-- David --

------------------ David Harris -+- Pegasus Mail ----------------------
  Box 5451, Dunedin, New Zealand | e-mail: [EMAIL PROTECTED]
           Phone: +64 3 453-6880 | Fax: +64 3 453-6612

Chuckle for the day:
  Q:  How many surrealists does it take to change a lightbulb?
  A:  Three: one to hold the giraffe, the other to fill the bathtub
      with the brightly-coloured machine tools.



Reply via email to