mrc+uw at panda.com
Sun Sep 27 08:35:53 PDT 2009
On Sun, 27 Sep 2009, Oswald Buddenhagen wrote:
> my MDA uses mail_append() with a mail_string. the string contents are
> not pre-normalized to CRLF upon the call.
Do you really mean an MDA (Message Delivery Agent, called by an incoming
SMTP transmits text newlines in CRLF format. If the text presented to an
MDA is not in CRLF format, then something (most likely the SMTP server)
"normalized" the SMTP CRLFs to (I assume) UNIX LF-only newlines. You need
to tell the SMTP server not to do that. In sendmail, this is usually done
with "E=\r\n" in the Mlocal line in your sendmail.cf (see the tmail man
If you do not really mean an MDA, what do you mean? Do you mean MUA (Mail
User Agent), as in Pine or Alpine?
> the mix driver writes the unix
> line endings literally into the mailbox, and when reading it, it
> delivers the contents literally. of course, this results in the imap
> server being non-compliant with the spec.
I don't know why you think that this results in the IMAP server being
non-compliant with the spec; IMAP has no such requirement upon the data it
processes or transmits. IMAP does, indeed, require CRLF newlines in IMAP
protocol, but protocol and data are two entirely different things. IMAP
*data* is a sequence of zero or more octets from 0x01 to 0xff.
> now i wonder whether my MDA is expected to pre-normalize the data before
> building the mail_string or whether the mix driver is broken?
mix is performing as designed and desired. mix can, among other things,
be used to store binary content. So can IMAP.
If you want to store an RFC 5322-compliant message in mix (and IMAP!) you
must present an RFC 5322-compliant message in the mail_string presented to
Whether this means "your MDA is expected to pre-normalize the data" or
"your MDA should not de-normalize the data from SMTP" or "blurdybloops are
bombastic" is for you to determine. I can't tell you which based upon the
information you gave me. I can tell you the requirements of IMAP,
mail_string(), and mix.
I also made a suggestion as to what may be wrong if you really are talking
about an MDA as opposed to something else. There is no reason for an MDA
to "pre-normalize" since an MDA's data should be in RFC 5322 compliant
format to begin with. If it is not, then something "fixed" it into
non-compliance, and you would be better off telling it not to do that than
to write additional broken code to "fix" a broken "fix". Those who live
by kludge towers ultimately are tossed from them.
-- Mark --
Democracy is two wolves and a sheep deciding what to eat for lunch.
Liberty is a well-armed sheep contesting the vote.
More information about the Imap-uw