From: Matthias A. <mat...@gm...> - 2006-05-08 15:54:37
|
Frederic Marchal <fre...@wo...> writes: > Hello, > > I quote the man page of version 6.3.2: > > -F | --flush > POP3/IMAP only. Delete old (previously retrieved) messages > from the mailserver before retrieving new mes- > sages. This option does not work with ETRN or ODMR. > Warning: if your local MTA hangs and fetchmail is > aborted, the next time you run fetchmail, it will delete > mail that was never delivered to you. What you > probably want is the default setting: if you don't > specify `-k', then fetchmail will automatically delete > messages after successful delivery. > > Is it still true that a mail is lost if the MTA hangs ? It sounds like > a known bug and may have been fixed in the code but not in the man page. Even if the code behaves better than the documentation suggests, describing the "--flush" option in a scary way looks correct to me. > I explain my situation: if the connection with the pop3 server drops, > all the DELE commands are forgotten (as required by the pop3 protocol if > I understand it right) and the mails reappear on the next poll. But > since fetchmail knows about those messages, it ignores them and doesn't > delete them either. Well, that's an interesting scenario and fetchmail should probably be fixed instead of fixing the potential workarounds. Only I need to think how to handle servers that recycle UIDs (unfortunately, these are only unique while the message is on the server, so fetchmail needs to know if the server deletes the message or now). Does this patch help your problem (without your adding --flush, that is)? It is against fetchmail 6.3.4 but may also work against 6.3.2: Index: driver.c =================================================================== --- driver.c (Revision 4818) +++ driver.c (Arbeitskopie) @@ -781,7 +781,7 @@ else if (ctl->server.base_protocol->delete_msg && !suppress_delete && ((msgcode >= 0 && !ctl->keep) - || (msgcode == MSGLEN_OLD && ctl->flush) + || (msgcode == MSGLEN_OLD && (ctl->flush || !ctl->keep)) || (msgcode == MSGLEN_TOOLARGE && ctl->limitflush))) { (*deletions)++; -- Matthias Andree |