[Top][All Lists]

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

Re: inc and non-compliant long lines redux

From: Andy Bradford
Subject: Re: inc and non-compliant long lines redux
Date: 21 Nov 2022 19:35:25 -0700

Thus said Ken Hornstein on Wed, 16 Nov 2022 09:19:11 -0500:

> I think  the correct solution  is when nmh is  doing a RETR  inside of
> POP  we  should use  netsec_read()  and  perform the  necessary  CR-LF
> translations on the returned buffer.  The only complicated thing I see
> is dealing with  the case where a CR  is at the end of  one buffer and
> the  LF  is  at  the  start  of the  next  buffer;  I  think  that  is
> straightforward.

I have a  working prototype that I'm testing that  uses netsec_read(). I
had  to expand  the function  declaration for  netsec_read() because  it
didn't return the number of bytes  that the caller received. Not sure if
that was intentional and I'm just misunderstanding netsec_read().

I pretty much just stuffed all the logic into traverse() for now just to
simplify the flow, though, I imagine  it's still more complicated than I
should like. I  tested it with 5  emails that I have  received that were
known to cause  problems, and have been receiving  other "normal" emails
since I put it into production.

The patch  is currently  against 1.7.1 since  that is what  I run  on my
system, so  I'll rework it  for master when I  get more free  time. I've
attached the  patch so others can  review for correctness, though,  as I
said, it's for 1.7.1 so it won't apply cleanly to master yet.



Attachment: nmh-1.7.1-amb-2.patch
Description: nmh-1.7.1-amb-2.patch

reply via email to

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