>David D. Kilzer <[EMAIL PROTECTED]> writes:
>: 2. Some email clients (like Sun's mailtool) are broken and will send
>: messages with '\n\nFrom ' in the body of the message anyway. IMHO,
>: nmh should be savvy enough to deal with this instead of generating
>: 'BAD MSG' errors.
>:
>: Using the 'Content-Length' header was the best way I knew how to do
>: this (aside from attempting to parse the 'From ' line itself.
Andrew D. Kailhofer <[EMAIL PROTECTED]> wrote:
>Hmmmm... I would have though that the only tool that should even be
>scanning for that pattern should be inc (since it parses a message
>stream and might need to see several successive messages in one
>session, which is also why I use procmail to throw them into a
>pseudo-inbox folder from which I draw them later---one message, one
>procmail, no confusion). The rest of the tools know when they're done
>with the header and shouldn't expect to see anything about the headers
>in that message.
>
>I don't have anything against Content-Length, I just don't see why
>anything but inc should even care. What am I missing?
Any command that uses the scan() function found in uip/scansbr.c will
care about Content-Length. When i touch uip/scansbr.c and recompile,
the following functions are rebuilt: inc, msh, scan, rcvtty.
The inc command uses it when incorporating mail from an mbox-formatted
file. The scan command uses it when scanning an mbox-formatted file
using the "-file" argument. The other two, msh and rcvtty, I don't use
on a regular basis, so I'm not sure how they use scan().
I think I'm missing the point of your confusion. :^) Did you think
that only uip/inc.c should be modified to look at Content-Length? I
originally approached the problem this way, but found that all the
mbox file parsing was being done within scan() (and then within
m_getfld()), and thus had to move my focus to changing their behavior.
Dave
--
David D. Kilzer \ ``I do not fear computers.
Software Designer / I fear the lack of them.''
Raytheon Systems Company \
[EMAIL PROTECTED] / -- Isaac Asimov