fetchmail-friends
[Top] [All Lists]

[fetchmail]repolling for imap...

2002-01-01 21:55:15
The repolling for imap seems to be handled slightly incorrectly now.

According to IMAP protocol, the EXISTS response can come any time.
This value is saved in the count variable in the imap_ok() function.
However, during repoll, this is explicitly set to -1 causing the
original information to be lost. Repolling then occurs only if new
mail arrives after EXPUNGE and before NOOP.

fetchmail[32427]: IMAP> A0064 EXPUNGE^M 
fetchmail[32427]: IMAP< * 1 EXPUNGE 
fetchmail[32427]: IMAP< * 1 EXISTS 
[ count == 1 here ]
fetchmail[32427]: IMAP< * 1 RECENT 
fetchmail[32427]: IMAP< A0064 OK Expunged 1 messages 
fetchmail[32427]: selecting or re-polling default folder 
[ count is set to -1 here ]
fetchmail[32427]: IMAP> A0065 NOOP^M 
fetchmail[32427]: IMAP< A0065 OK NOOP completed 
fetchmail[32427]: 0 messages waiting after re-poll 
fetchmail[32427]: IMAP> A0066 LOGOUT^M 

This patch uses the saved value of count.

It also does not send NOOP as that seems to be redundant now!

Sunil Shetye.

Attachment: fetchmail-5.9.6-repoll.patch
Description: Text document

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