fetchmail-friends
[Top] [All Lists]

[fetchmail]UIDL of processed messages not stored in case of error

2001-03-27 00:29:49
Let's consider a situation (POP3 server, local UIDL
management on) when there are 5 new messages on the
server. Let's say 3 of them get downloaded
successfully and they get delivered ok. Then there is
some problem afterwards that causes fetchmail finish
with some error code (e.g., Protocol (4)).  In such a
case, the procedure uid_swap_lists is not called which
basically means that the .fetchids file will remain
the same as it was before fetchmail's execution. This
is despite the fact that several messages were
successfully retrieved and delivered.  This results in
these messages being re-fetched and re-delivered next
time fetchmail is run.

My question is, would it be possible to mark the
delivered messages as SEEN even though there was an
unrelated error encountered during the same session? 
I see two ways of doing it:
a) we can modify the code in driver.c (roughly line
2350 in 5.7.5) so that when the SEEN flag is set in
'ctl->newsaved', the same entry is also inserted into
'newsaved' - for instance by adding the following
line:
  save_str(&ctl->oldsaved, sdp->id, UID_SEEN);
This way, the fact that this message was seen will be
preserved for the next session regardless of whether
.fetchids will be created from 'oldsaved' or
'newsaved'

b) If we cannot do uid_swap_lists because of errors
(fetchmail.c, line 627 in 5.7.5), we could copy all
entries from 'newsaved' marked as SEEN to 'oldsaved'
if they are not already there.

F

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/?.refer=text


<Prev in Thread] Current Thread [Next in Thread>
  • [fetchmail]UIDL of processed messages not stored in case of error, Frantisek Brabec <=