fetchmail-friends
[Top] [All Lists]

Re: [fetchmail]fetchmail tries to fetch twice from IMAP

2002-02-27 21:45:49
Quoting from Stefan Frank's mail on Wed, Feb 27, 2002 at 10:12:51PM +0100:
I have a little problem with fetchmail and my IMAP account. Since
version 5.9.7 fetchmail tries to fetch mails twice from my IMAP
account.
Example: If my IMAP-mailbox contains one message, fetchmail downloads the
message to my local inbox, but after that it tells me that there is
again one message on the IMAP-server. After that I receive a
client/server synchronization error.

You can see a logfile created with "fetchmail -vv &> fetchmail.txt" on
<http://www.messimeter.de/fetchmail.txt> where the problem appears.

I've also played with the "idle" and "no idle" option, but no change.

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:

======================================================================
diff -Naur fetchmail-5.9.8.orig/imap.c fetchmail-5.9.8/imap.c
--- fetchmail-5.9.8.orig/imap.c Fri Feb 15 08:57:06 2002
+++ fetchmail-5.9.8/imap.c      Thu Feb 28 10:06:37 2002
@@ -617,6 +617,7 @@
        unseen = -1;
 
     *newp = unseen;
+    count = 0;
     expunged = 0;
     deletions = 0;
======================================================================
 
Sunil Shetye.

P.S.:

The idle option works only when the remote server declares IDLE in its
CAPABILITY. In this case, idle will have no effect.


<Prev in Thread] Current Thread [Next in Thread>