From d878633536cadc60e6d836c946673903dbac263a Mon Sep 17 00:00:00 2001 From: John Denker Date: Sun, 3 Jun 2012 16:17:17 -0700 Subject: In qmail-pop3d's reponse to STAT, deleted messages are no longer counted in the total --- in compliance with RFC 1939. Credit: I. Dwayne Koonce --- qmail-pop3d.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qmail-pop3d.c b/qmail-pop3d.c index 0ca4f9c..2228a4d 100644 --- a/qmail-pop3d.c +++ b/qmail-pop3d.c @@ -148,13 +148,13 @@ void getlist() void pop3_stat(arg) char *arg; { - int i; + int i, j=0; unsigned long total; total = 0; - for (i = 0;i < numm;++i) if (!m[i].flagdeleted) total += m[i].size; + for (i = 0;i < numm;++i) if (!m[i].flagdeleted) { total += m[i].size; j++; } puts("+OK "); - put(strnum,fmt_uint(strnum,numm)); + put(strnum,fmt_uint(strnum,j)); puts(" "); put(strnum,fmt_ulong(strnum,total)); puts("\r\n"); -- cgit v1.2.3