Commit 62a38d8f 62a38d8f1d7a70960106cb41f6765f5b10513d48 by Alain Magloire

* pop3d/capa.c : Add UIDL in the capability list.

and update Copyrigth.
* pop3d/pop3d.c : Remove mbox_record register, only need path_record.
* pop3d/retr.c : When retrieve a message should be mark as read.
since we do not strip out the header "Status:".
* pop3d/top.c : Adjust stream_readline().
1 parent 46a65203
/* GNU mailutils - a suite of utilities for electronic mail
Copyright (C) 1999 Free Software Foundation, Inc.
Copyright (C) 1999, 2001 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -29,6 +29,7 @@ pop3_capa (const char *arg)
fprintf (ofile, "+OK Capability list follows\r\n");
fprintf (ofile, "TOP\r\n");
fprintf (ofile, "USER\r\n");
fprintf (ofile, "UIDL\r\n");
fprintf (ofile, "RESP-CODES\r\n");
if (state == TRANSACTION) /* let's not advertise to just anyone */
fprintf (ofile, "IMPLEMENTATION %s %s\r\n", IMPL, VERSION);
......
......@@ -117,7 +117,6 @@ main (int argc, char **argv)
{
list_t bookie;
registrar_get_list (&bookie);
list_append (bookie, mbox_record);
list_append (bookie, path_record);
}
......
......@@ -53,7 +53,7 @@ pop3_retr (const char *arg)
if (buf == NULL)
pop3_abquit (ERR_NO_MEM);
while (stream_readline (stream, buf, buflen - 1, off, &n) == 0
while (stream_readline (stream, buf, buflen, off, &n) == 0
&& n > 0)
{
/* Nuke the trainline newline. */
......@@ -74,6 +74,9 @@ pop3_retr (const char *arg)
off += n;
}
if (!attribute_is_read (attr))
attribute_set_read (attr);
free (buf);
fprintf (ofile, ".\r\n");
......
......@@ -67,7 +67,7 @@ pop3_top (const char *arg)
if (buf == NULL)
pop3_abquit (ERR_NO_MEM);
off = n = 0;
while (stream_readline (stream, buf, buflen - 1, off, &n) == 0)
while (stream_readline (stream, buf, buflen, off, &n) == 0)
{
if (n == 0)
break;
......@@ -92,7 +92,7 @@ pop3_top (const char *arg)
message_get_body (msg, &body);
body_get_stream (body, &stream);
n = off = 0;
while (stream_readline (stream, buf, buflen - 1, off, &n) == 0
while (stream_readline (stream, buf, buflen, off, &n) == 0
&& n > 0 && lines > 0)
{
/* Nuke the trainline newline. */
......