From: Sunil S. <sh...@bo...> - 2005-12-24 12:47:35
|
A good imap server can handle two email clients accessing the same mailbox and reports the mails deleted by one email client correctly to the other email client. However, fetchmail cannot handle this unexpected deletion of mails. This is because fetchmail caches which mails are new and the size of those new mails. This caching is required to give a better performance, but leads to unexpected results when another email client is writing to the same mailbox: - An old mail could be delivered instead of a recent mail. - fetchmail passes the wrong size to the SMTP server in the MAIL FROM: command. If the SMTP server has size restrictions, a wrong mail will get rejected! - "fetchmail -vv" reports that there is a mismatch in the expected and received message sizes. This patch causes fetchmail to quit the poll if there is a mismatch in the count of mails being deleted. This patch also handles servers which do not report RECENT on EXPUNGE in a better way. Now, recentcount is counted down on EXPUNGE of each mail along with count. This way, recentcount need not be reset to zero if the server does not give a new report of RECENT mails. This patch has been tested by running two fetchmails on the same mailbox! -- Sunil Shetye. |