* 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().
Showing
4 changed files
with
8 additions
and
5 deletions
1 | /* GNU mailutils - a suite of utilities for electronic mail | 1 | /* GNU mailutils - a suite of utilities for electronic mail |
2 | Copyright (C) 1999 Free Software Foundation, Inc. | 2 | Copyright (C) 1999, 2001 Free Software Foundation, Inc. |
3 | 3 | ||
4 | This program is free software; you can redistribute it and/or modify | 4 | This program is free software; you can redistribute it and/or modify |
5 | it under the terms of the GNU General Public License as published by | 5 | it under the terms of the GNU General Public License as published by |
... | @@ -29,6 +29,7 @@ pop3_capa (const char *arg) | ... | @@ -29,6 +29,7 @@ pop3_capa (const char *arg) |
29 | fprintf (ofile, "+OK Capability list follows\r\n"); | 29 | fprintf (ofile, "+OK Capability list follows\r\n"); |
30 | fprintf (ofile, "TOP\r\n"); | 30 | fprintf (ofile, "TOP\r\n"); |
31 | fprintf (ofile, "USER\r\n"); | 31 | fprintf (ofile, "USER\r\n"); |
32 | fprintf (ofile, "UIDL\r\n"); | ||
32 | fprintf (ofile, "RESP-CODES\r\n"); | 33 | fprintf (ofile, "RESP-CODES\r\n"); |
33 | if (state == TRANSACTION) /* let's not advertise to just anyone */ | 34 | if (state == TRANSACTION) /* let's not advertise to just anyone */ |
34 | fprintf (ofile, "IMPLEMENTATION %s %s\r\n", IMPL, VERSION); | 35 | fprintf (ofile, "IMPLEMENTATION %s %s\r\n", IMPL, VERSION); | ... | ... |
... | @@ -117,7 +117,6 @@ main (int argc, char **argv) | ... | @@ -117,7 +117,6 @@ main (int argc, char **argv) |
117 | { | 117 | { |
118 | list_t bookie; | 118 | list_t bookie; |
119 | registrar_get_list (&bookie); | 119 | registrar_get_list (&bookie); |
120 | list_append (bookie, mbox_record); | ||
121 | list_append (bookie, path_record); | 120 | list_append (bookie, path_record); |
122 | } | 121 | } |
123 | 122 | ... | ... |
... | @@ -53,7 +53,7 @@ pop3_retr (const char *arg) | ... | @@ -53,7 +53,7 @@ pop3_retr (const char *arg) |
53 | if (buf == NULL) | 53 | if (buf == NULL) |
54 | pop3_abquit (ERR_NO_MEM); | 54 | pop3_abquit (ERR_NO_MEM); |
55 | 55 | ||
56 | while (stream_readline (stream, buf, buflen - 1, off, &n) == 0 | 56 | while (stream_readline (stream, buf, buflen, off, &n) == 0 |
57 | && n > 0) | 57 | && n > 0) |
58 | { | 58 | { |
59 | /* Nuke the trainline newline. */ | 59 | /* Nuke the trainline newline. */ |
... | @@ -74,6 +74,9 @@ pop3_retr (const char *arg) | ... | @@ -74,6 +74,9 @@ pop3_retr (const char *arg) |
74 | off += n; | 74 | off += n; |
75 | } | 75 | } |
76 | 76 | ||
77 | if (!attribute_is_read (attr)) | ||
78 | attribute_set_read (attr); | ||
79 | |||
77 | free (buf); | 80 | free (buf); |
78 | fprintf (ofile, ".\r\n"); | 81 | fprintf (ofile, ".\r\n"); |
79 | 82 | ... | ... |
... | @@ -67,7 +67,7 @@ pop3_top (const char *arg) | ... | @@ -67,7 +67,7 @@ pop3_top (const char *arg) |
67 | if (buf == NULL) | 67 | if (buf == NULL) |
68 | pop3_abquit (ERR_NO_MEM); | 68 | pop3_abquit (ERR_NO_MEM); |
69 | off = n = 0; | 69 | off = n = 0; |
70 | while (stream_readline (stream, buf, buflen - 1, off, &n) == 0) | 70 | while (stream_readline (stream, buf, buflen, off, &n) == 0) |
71 | { | 71 | { |
72 | if (n == 0) | 72 | if (n == 0) |
73 | break; | 73 | break; |
... | @@ -92,7 +92,7 @@ pop3_top (const char *arg) | ... | @@ -92,7 +92,7 @@ pop3_top (const char *arg) |
92 | message_get_body (msg, &body); | 92 | message_get_body (msg, &body); |
93 | body_get_stream (body, &stream); | 93 | body_get_stream (body, &stream); |
94 | n = off = 0; | 94 | n = off = 0; |
95 | while (stream_readline (stream, buf, buflen - 1, off, &n) == 0 | 95 | while (stream_readline (stream, buf, buflen, off, &n) == 0 |
96 | && n > 0 && lines > 0) | 96 | && n > 0 && lines > 0) |
97 | { | 97 | { |
98 | /* Nuke the trainline newline. */ | 98 | /* Nuke the trainline newline. */ | ... | ... |
-
Please register or sign in to post a comment