nmh-workers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mhbuild and long header fields


From: Philipp
Subject: Re: mhbuild and long header fields
Date: Sat, 19 Aug 2023 17:39:35 +0200

[2023-08-18 21:48] David Levine <levinedl@acm.org>
> > I have noticed that mhbuild don't implement header field folding.
> > Specialy for the References field this might cause problems, when you
> > use it to feed a mail build by mhbuild to a tool which checks the
> > line length.
>
> Thank you for pointing that out.  Header field folding does need to
> be properly implemented.  It would be a great contribution if someone
> has the bandwidth.

I have looked a bit at it. I found two places where this could be
implemented:

Either as part of encode_rfc2047(), this function does this allready,
but only if a non ascii char is in the field body.

Or in output_headers(). I'm not sure if there an extra options would
be required.

> > Also I don't get the code. In uip/mhbuildsbr.c:359 a LENERR is handled
> > with die(), but I can't create a testcase for this.
>
> A draft with a header field name exceeding 997 bytes in length should
> trigger LENERR.  The only code that sets a LENERR is in m_getfld().
> So the draft would trigger is in any nmh command that reads a message
> header, such as scan(1):

Thanks for pointing this out, but now I'm more confused. Whats the point
of LENERR (in contrast to FMTERR)? But this is a diffrent discussion.

Philipp

> $ (printf '%.sX' {1..997}; printf ': too-long\n') | scan -file -
> scan: field name 
> "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
> XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
> XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
> XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
> XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
> XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
> XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
> XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:"
>  exceeds 997 bytes
> ??Format error (message -1) in component 1
>    1  08/18/23*                   
>
> David
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]