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: David Levine
Subject: Re: mhbuild and long header fields
Date: Sun, 27 Aug 2023 22:00:32 -0400

Philipp wrote:

> [2023-08-27 09:29] David Levine <levinedl@acm.org>
> >
> > My only comment on the code itself is that I prefer functions that
> > just do one thing.  So I would implement a fold function that just
> > modifies a string, and leave the fprintf/fwrite to output_headers().
>
> I have thought about this, but this would require fold() to allocate memory.
> Because the plan was to use fold() in output_headers() I though this could
> be avoided.

I don't think that allocating memory is a drawback.

> As far as I see output_message_fp() is currently only used by mhfixmsg
> and mhbuild. For mhfixmsg I though it would be ok to also fold the field.

Good point.  Yes, mhfixmsg should fold also.

> For the blank lines you mentioned: Can you test the attached version of
> my patch. If this don't fix your problem, can you provide a sample mail?

The patch didn't fix it.  The attached sample shows the added line
when run through mhfixmsg:

$ uip/mhfixmsg -file fold_adds_blank_line.txt -out -
From: sender@example.com
DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=example.com;

 b=0123456789012345678901234567890123456789012345678901234567890123456789012345
To: recipient@example.com
Date: Sun, 27 Aug 2023 23:00:00 +0000

test

If the length of that long line is reduced by 1, the blank line is
not created.

David
--- Begin Message --- Date: Sun, 27 Aug 2023 23:00:00 +0000
test

--- End Message ---

reply via email to

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