Quoting from Sunil Shetye's mail on Thu, Feb 28, 2002 at 10:13:08AM +0530:
This is happening when the EXISTS is not returned on EXPUNGE. Then,
the old value of count is getting used. This patch should fix it:
Another check is required at the end of the poll also then. This patch
should do that:
===================================================================
diff -Naur fetchmail-5.9.8.orig/imap.c fetchmail-5.9.8/imap.c
--- fetchmail-5.9.8.orig/imap.c Thu Feb 28 10:06:37 2002
+++ fetchmail-5.9.8/imap.c Thu Feb 28 11:54:35 2002
@@ -517,6 +517,9 @@
return(ok);
}
}
+ /* if recentcount is 0, return no mail */
+ if (recentcount == 0)
+ count = 0;
if (outlevel >= O_DEBUG)
report(stdout, GT_("%d messages waiting after re-poll\n"), count);
}
===================================================================
Sunil Shetye.