From: Sunil S. <sh...@bo...> - 2006-05-18 10:14:50
|
Quoting from Matthias Andree's mail on Wed, May 17, 2006: > Frederic Marchal found a problem with POP3 deletes when --flush and > --keep are both unset and UIDL is used for the connection: > > If fetchmail sends a DELE command, but the POP3 connection aborts before > the QUIT command can be sent, then fetchmail will skip the messages on > the server and leaving them there forever. > > The patch below is somewhat intrusive but attempts to fix this. It > changes the .fetchids file format, adding " DELETED" to UID lines of > deleted messages when the QUIT hasn't been acknowledged. This should > make fetchmail retry the delete on the next run. > > Please test. > > Opinions? Let it go in now or wait until 6.4.0? A far safer option is to just redownload the mail. I think, there are issues regarding POP servers recycling UIDs, thereby assigning the same UID of a mail which was deleted to a new mail. For such servers, there could also be a race condition on a socket error. For example, if fetchmail sends a "QUIT" which the POP3 server receives and if the POP3 server sends an "+OK" which fetchmail does not receive due to socket error. In this situation, the server has already expunged the mails but fetchmail does not know that. Now, if the server assigns the same UID to a new mail, fetchmail may end up deleting that mail. This patch should now download the mail when used without 'flush'. This will lead to duplicate mails on socket errors. Frederic, your original query was whether 'flush' is safe or not. It is safe to use 'flush' with 'uidl', unless your mailserver is reassigning the same UIDs of mails which have been deleted recently to new mails received after the deletion. The patch attached also attempts to fix the manpage regarding the 'flush' option. -- Sunil Shetye. |