[pkg-fetchmail-maint] Bug#314509: no success reproducing this timeout bug

Matthias Andree matthias.andree at gmx.de
Sat Oct 29 13:25:01 UTC 2005


tags 314509 + fixed-upstream patch
stop

I haven't had success trying to reproduce this bug with vanilla
fetchmail 6.2.5, but I see where it might come from: the IMAP client
ignores EXPUNGE responses, and this is bound to fail if the client reuses
a previously received EXISTS responses, as it does now. This seems to be
fixed in 6.2.9-rc6 already, so I'm tagging fixed-upstream.

Furthermore, fetchmail assumes it is the only client to receive \Recent
messages, but that's a different problem and will be fixed only after
6.3.0, it's way too late to check this now.

Actually we'd have to know if the expunged message was \Recent and if it
was, decrement recentcount, too.

Try this patch (also tagged to the bug and also attached for attachment
scrubbing) and let me know if that fixes it:

--- ./imap.c.orig	2003-10-15 21:17:41.000000000 +0200
+++ ./imap.c	2005-10-29 15:19:58.000000000 +0200
@@ -105,6 +105,15 @@
 	{
 	    recentcount = atoi(buf+2);
 	}
+	/* servers are not required to update the EXISTS counts,
+	 * so count down by ourselves */
+	else if (strstr(buf, " EXPUNGE"))
+	{
+	    if (atoi(buf+2) > 0) {
+	       if (count > 0)
+		   count --;
+	    }
+	}
 	else if (strstr(buf, "PREAUTH"))
 	    preauth = TRUE;
 	/*

-- 
Matthias Andree
-------------- next part --------------
--- ./imap.c.orig	2003-10-15 21:17:41.000000000 +0200
+++ ./imap.c	2005-10-29 15:19:58.000000000 +0200
@@ -105,6 +105,15 @@
 	{
 	    recentcount = atoi(buf+2);
 	}
+	/* servers are not required to update the EXISTS counts,
+	 * so count down by ourselves */
+	else if (strstr(buf, " EXPUNGE"))
+	{
+	    if (atoi(buf+2) > 0) {
+	       if (count > 0)
+		   count --;
+	    }
+	}
 	else if (strstr(buf, "PREAUTH"))
 	    preauth = TRUE;
 	/*


More information about the pkg-fetchmail-maint mailing list