From: Sunil S. <sh...@bo...> - 2006-05-23 15:11:17
|
While debugging the code, I have found a minor problem which causes some of the flags not being set properly on the old uid list. Here it is: ================================================================================ Index: fetchmail-6.3/pop3.c =================================================================== --- fetchmail-6.3/pop3.c (revision 4851) +++ fetchmail-6.3/pop3.c (working copy) @@ -1019,8 +1019,9 @@ * the same mail will not be downloaded again. */ old = save_str(&ctl->oldsaved, id, UID_UNSEEN); - old->val.status.num = unum; } + /* save the number */ + old->val.status.num = unum; } else return PS_ERROR; } /* multi-line loop for UIDL reply */ ================================================================================ The above patch is not actually related to any of our patches! Quoting from Matthias Andree's mail on Sun, May 21, 2006: > Well - fetchmail does not currently save the deleted status to its > .fetchids file, so there will be a difference between daemon mode and > "fetchmail without daemon option from cron" that I would like to avoid - > and my patch is supposed to address this. > > I am attaching a revised patch (against UIDL) that drops the UIDs (marks > them UID_EXPUNGED) before sending the QUIT command. I think this assumes that the server necessarily receives the QUIT. What if the server does not receive the QUIT at all due to socket error? This will cause the mails to be downloaded again. > My patch saves the "DELETED" flag, and this should help when the > connection goes away, for instance, when downloading a message, when > there is not the slightest chance the server might have seen a "QUIT" > request, so there is no chance of recycled UIDs. > > In that case, fetchmail would then safely retry the deletion. Undoubtedly, saving the flag is required. However, to keep things simpler, it would have been better if this issue was fixed separately. -- Sunil Shetye. |