>While POP's LIST does actually include the size of the message in bytes,
>that's prior  to any  CRLF mangling  that happens so  it cannot  be used
>reliably as a method for determining when to stop reading. Unfortunate.

Right, but that's mostly because of the way multiline responses are
handled in POP.  It's never "read X bytes", it's "read lines until you
get a line that is just .\r\n".  With IMAP, it's "the next X bytes are
the data you asked for".  So you're used to dealing with "lines" and
that lends itself to C strings.

>I notice however,  that some components of my  email infrastructure pass
>NULs through without problems and some do not. qmail successfully queued
>a message with  a NUL in both  the header and the body,  but other parts
>(e.g. recipient validation tools) did not fare as well, and of course we
>knew that inc would truncate (and it did because the lines with NUL were
>truncated).

I had an inkling popular MTAs would DTRT.

--Ken

Reply via email to