Jon Steinhart <[EMAIL PROTECTED]> wrote:

>Hi.  I'm working on some mail filtering software that will work with
>nmh.  I've noticed a few conflicts between the way messages are stored
>in folders and RFC822.  I figure that y'all know something about this,
>so just wanted to check to make sure that this is really the case and
>that it isn't a problem or might be a problem in the future.

> 1.  RFC822 says that header fields end with a CR-LF pair.  That might
>     be true on a Microsoft system but not on Linux of any of the other
>     UNIX-like systems.  Single CR or LF characters are allowed in
>     header field-bodies.  Does this ever occur in real life or might
>     it happen some day?

RFC822 defines what goes out over the network.  It does not define what will
be the message format in a user mailbox.

With most unix email software, line termination is converted to CR-LF
on sending the message.  The receiving software turns the message
back into the unix NL line termination.

For mail received with a single LF in a header, that LF would be
treated as a unix NL (it's the same character), and the header might
then look broken.  A single CR is probably unaffected by most unix
email software.  Practically speaking, problems from this are rare or
non-existent.

> 2.  RFC822 allows the NUL character in header field-bodies.  Code
>     written around the C string functions won't handle this of course.
>     Does this ever occur in real life or might it happen some day?

Both "sendmail" and the version of "mail.local" distributed with the
current sendmail handle NUL correctly.  I have (once) received a
message with NUL characters.  MH, and most other unix software,
bungles this because of the problem you mention with the C string
functions.

This is usually not a serious problem in practice.  But mostly we
won't notice, since the NULs will disappear from our mail.

>Now, I recognize that this stuff is sort of covered by the NETWORK-SPECIFIC
>TRANSFORMATIONS section of RFC822 but I have trouble believing that any
>*NIX mail system actually does it.  Is this true?

Certainly "sendmail" does conversions between network line termination
and unix line termination.  I would assume that most other MTAs
do likewise.

 -NWR

Reply via email to