[tpop3d-discuss] Re: Bug in tpop3d

Chris Lightfoot chris at ex-parrot.com
Sun, 27 Jan 2002 15:40:36 +0000

On Sun, Jan 27, 2002 at 09:20:00AM -0300, Everton wrote:
> Hi!
>     I=B4m Everton, from Brasil... and I have a poor english (sorry!) :-=

Firstly, I prefer to keep tpop3d discussion on the list,
to which I have Cc:d this message. Please see the web page
for more about this.

>     Recently, I see a litle bug in tpop3d (working in
> Red Hat Linux 7.2, with vdeliver provided Linuxconf
> 1.26r5):
>     When reading the vmail files (in
> /var/spool/vmail/domain/user), the tpop3d split the
> messages looking for "\n\nFrom "... perfectly!!
>     But, vdeliver write the vmail files like is received
> from server, leaving or not spaces between lines!!
>     So, the tpop3d not found a "\n\nFrom ", and skip one
> or more messages... because only exists, in this case,
> "\nFrom ", understand!?!
>     I=B4m work in this problem, and resolve the bug... maybe!! :-)



talks about this issue, as does various content on the
Exim list (try Google). It appears to me now -- as it did
when I wrote the code in the first place -- that the
consensus is that the separator is `\n\nFrom '.

>     Look for me (... and for us!):
>     File: mailspool.c
>     Replace:
>         p =3D memstr(q, len2 - (q - filemem), "\n\nFrom ", 7);
>     By:
>         p =3D memstr(q, len2 - (q - filemem), "\nFrom ", 6);
>     And Replace:
>         return write_file(M->fd, sck, x->offset, x->length + 1, x->msgl=
ength, n);
>     By:
>         return write_file(M->fd, sck, x->offset, x->length + 1, x->msgl=
ength - 1, n);

If this works for you, fine, but I'm wary of integrating
this into tpop3d to work around a bug in vdeliver.

Does anyone else have further thoughts on this?

 ``Knock hard. Life is deaf.''
   (Arnold Wesker)